Re: pg_basebackup -F t fails when fsync spends more time thantcp_user_timeout - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: pg_basebackup -F t fails when fsync spends more time thantcp_user_timeout
Date
Msg-id 20190903015818.GB3765@paquier.xyz
Whole thread Raw
In response to Re: pg_basebackup -F t fails when fsync spends more time thantcp_user_timeout  (Michael Paquier <michael@paquier.xyz>)
Responses Re: pg_basebackup -F t fails when fsync spends more time thantcp_user_timeout
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: [HACKERS] [WIP] Effective storage of duplicates in B-tree index.
Next
From: "Tsunakawa, Takayuki"
Date:
Subject: RE: SIGQUIT on archiver child processes maybe not such a hot idea?