Re: pg_basebackup, pg_receivexlog and data durability (was: silent data loss with ext4 / all current versions)
От | Peter Eisentraut |
---|---|
Тема | Re: pg_basebackup, pg_receivexlog and data durability (was: silent data loss with ext4 / all current versions) |
Дата | |
Msg-id | afe38fe0-11f6-6ccd-9606-222e8aefaa68@2ndquadrant.com обсуждение исходный текст |
Ответ на | pg_basebackup, pg_receivexlog and data durability (was: silent data loss with ext4 / all current versions) (Michael Paquier <michael.paquier@gmail.com>) |
Ответы |
Re: pg_basebackup, pg_receivexlog and data durability (was:
silent data loss with ext4 / all current versions)
|
Список | pgsql-hackers |
On 5/13/16 2:39 AM, Michael Paquier wrote: > So, attached are two patches that apply on HEAD to address the problem > of pg_basebackup that does not sync the data it writes. As > pg_basebackup cannot use directly initdb -S because, as a client-side > utility, it may be installed while initdb is not (see Fedora and > RHEL), I have refactored the code so as the routines in initdb.c doing > the fsync of PGDATA and other fsync stuff are in src/fe_utils/, and > this is 0001. Why fe_utils? initdb is not a front-end program. > Patch 0002 is a set of fixes for pg_basebackup: > - In plain mode, fsync_pgdata is used so as all the tablespaces are > fsync'd at once. This takes care as well of the case where pg_xlog is > a symlink. > - In tar mode (no stdout), each tar file is synced individually, and > the base directory is synced once at the end. > In both cases, failures are not considered fatal. Maybe there should be --nosync options like initdb has? -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления: