Hi,
We are a small company that uses postgres database in a Windows environment (Windows server 2012 R2). Our database has a lot of I/O transactions due to many devices that collects data and send them to the database through a central server, as well as clients
that query these data and elaboration software that process them.
Recently we migrated the whole infrastructure in Azure, and we put the DBMS in an Azure Virtual Machine (size A3) from a standard Windows server 2012 R2 image. We created an additional data disk (E:) to store postgres data.
The problem is: after some hours (even days) of regular work postgres crashes with the following error:
PANIC: could not write to log file 00000001000000AD0000002F at offset 1163264, length 40960: Invalid argument
(file, offset and length values are different at each crash). If we restared postgres service manually, it starts successfully but the problem recurs over and over again.
So we tried to move the database to the OS disk (C:), in this case postgres works fine for months. But the OS disk has a fixed size of 126GB by Azure constraints, and the Database is growing quickly, the OS disk is almost full.
Yesterday we tried to create a new fresh Data Disk (F:), and move postgres database to this new disk, but the same problem occurs after some hours of work (there's no particular query/action that causes this error).
Data disks are with host cache set to none, and stored in a storage account with replication set to locally redundant (in the same container of the OS disk).
The VM event viewer doesn't show any particular error in any log around the postgres error datetime.
To create the F: disk, we follow the best practices of this article:
http://msdn.microsoft.com/en-us/library/azure/dn133149.aspx
They are referred to SQL Server but we try to follow the steps that can be common to any DBMS.
What could be the reason of these errors that appears only for non-OS drives? Any suggestion to solve this problem?
Thanks,
Luca Wiegand