pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedPostgres and fsync
3+ messages / 2 participants
[nested] [flat]
* Postgres and fsync
@ 2018-04-22 22:30 Tim Cross <theophilusx@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Tim Cross @ 2018-04-22 22:30 UTC (permalink / raw)
To: pgsql-general
Hi all,
the recent article in LWN regarding issues with fsync and error
reporting in the Linux kernel and the potential for lost data has
prompted me to ask 2 questions.
1. Is this issue low level enough that it affects all potentially
supported sync methods on Linux? For example, if you were concerned
about this issue and you had a filesystem which supports open_sync or
open_datasync etc, is switching to one of these options something which
should be considered or is this issue low level enough that all sync
methods are impacted?
2. If running under xfs as the file system, what is the preferred sync
method or is this something which really needs to be benchmarked to make
a decision?
For background, one of our databases is large - approximately 7Tb with
some tables which have large numbers of records with large inserts per
day i.e. approx 1,600,000,000 new records per day added and a similar
number deleted (no updates), maintaining a table size of about 3Tb,
though it is expected we will be increasing the number of retained
records and will see the table grow to about 6Tb. This represents a fair
amount of I/O and we want to ensure we have the fastest I/O we can
achieve with highest data reliability we can get. The columns in the
table are small i.e. 7 double precision, 2 integer, 1 date and 2
timestamp.
Platform is RHEL, Postgres 9.6.8, filesystem xfs backed by HP
SAN. Current wal_sync_method is fsync.
Tim
--
Tim Cross
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Postgres and fsync
@ 2018-04-23 00:05 Andres Freund <andres@anarazel.de>
parent: Tim Cross <theophilusx@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Andres Freund @ 2018-04-23 00:05 UTC (permalink / raw)
To: Tim Cross <theophilusx@gmail.com>; +Cc: pgsql-general
Hi,
On 2018-04-23 08:30:25 +1000, Tim Cross wrote:
> the recent article in LWN regarding issues with fsync and error
> reporting in the Linux kernel and the potential for lost data has
> prompted me to ask 2 questions.
Note that you need to have *storage* failures for this to
happen. I.e. your disk needs to die, and there's no raid or such to fix
the issue.
> 1. Is this issue low level enough that it affects all potentially
> supported sync methods on Linux? For example, if you were concerned
> about this issue and you had a filesystem which supports open_sync or
> open_datasync etc, is switching to one of these options something which
> should be considered or is this issue low level enough that all sync
> methods are impacted?
No, the issue is largely about datafiles whereas the setting you refer
to is about the WAL.
Greetings,
Andres Freund
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Postgres and fsync
@ 2018-04-23 22:05 Tim Cross <theophilusx@gmail.com>
parent: Andres Freund <andres@anarazel.de>
0 siblings, 0 replies; 3+ messages in thread
From: Tim Cross @ 2018-04-23 22:05 UTC (permalink / raw)
To: Andres Freund <andres@anarazel.de>; +Cc: pgsql-general
Andres Freund <andres@anarazel.de> writes:
> Hi,
>
> On 2018-04-23 08:30:25 +1000, Tim Cross wrote:
>> the recent article in LWN regarding issues with fsync and error
>> reporting in the Linux kernel and the potential for lost data has
>> prompted me to ask 2 questions.
>
> Note that you need to have *storage* failures for this to
> happen. I.e. your disk needs to die, and there's no raid or such to fix
> the issue.
>
>
>> 1. Is this issue low level enough that it affects all potentially
>> supported sync methods on Linux? For example, if you were concerned
>> about this issue and you had a filesystem which supports open_sync or
>> open_datasync etc, is switching to one of these options something which
>> should be considered or is this issue low level enough that all sync
>> methods are impacted?
>
> No, the issue is largely about datafiles whereas the setting you refer
> to is about the WAL.
>
> Greetings,
>
> Andres Freund
OK, thanks.
--
Tim Cross
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2018-04-23 22:05 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-04-22 22:30 Postgres and fsync Tim Cross <theophilusx@gmail.com>
2018-04-23 00:05 ` Andres Freund <andres@anarazel.de>
2018-04-23 22:05 ` Tim Cross <theophilusx@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox