Re: pg_basebackup -F t fails when fsync spends more time than tcp_user_timeout
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: "r.takahashi_2@fujitsu.com" <r.takahashi_2@fujitsu.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2019-09-03T01:58:18Z
Lists: pgsql-hackers
Attachments
- v2-0001-Delay-fsync-of-pg_basebackup-tar-format-until-the.patch (text/x-diff) patch v2-0001
On Mon, Sep 02, 2019 at 05:38:56PM +0900, Michael Paquier wrote: > Thinking wider, don't we have the same problem with wal_sender_timeout > in the case where a sync request takes longer than the time it would > take the backend to terminate the connection? I have been able to work more on that, and that can indeed happen with wal_sender_timeout. While reviewing the code, I have noticed that there is little point to enable do_sync when fetching WAL segments. This actually led to too many fsyncs done for the plain format as each WAL segment is fsync'd first by walmethods.c, then fsync'd again by fsync_pgdata() in pg_wal/. Attached is an updated patch, which needs to go down to v10. -- Michael
Commits
-
Delay fsyncs of pg_basebackup until the end of backup
- dbbae33bcd33 10.11 landed
- 996c92b27dfe 11.6 landed
- 64eb426afc34 12.0 landed
- 522baf14847a 13.0 landed