RE: Speed up the removal of WAL files - Mailing list pgsql-hackers

From Tsunakawa, Takayuki
Subject RE: Speed up the removal of WAL files
Date
Msg-id 0A3221C70F24FB45833433255569204D1F8D0DB4@G01JPEXMBYT05
Whole thread Raw
In response to Re: Speed up the removal of WAL files  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Speed up the removal of WAL files
List pgsql-hackers
From: Michael Paquier [mailto:michael@paquier.xyz]
It seems to me that you would reintroduce partially the problems that
> 1d4a0ab1 has fixed.  In short, if a crash happens in the code paths calling
> RemoveXlogFile with durable = false before fsync'ing pg_wal, then a rename
> has no guarantee to be durable, so you could finish again with a file that
> as an old name, but new contents.  A crucial thing which matters for a rename

Hmm, you're right.  Even during recovery, RemoveOldXlogFiles() can't skip fsyncing pg_wal/ because new WAL records
streamedfrom the master are written to recycled WAL files.
 

After all, it seems to me that we have to stand with the current patch which only handles RemoveNonParentXlogFiles().


Regards
Takayuki Tsunakawa





pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Speed up the removal of WAL files
Next
From: Kyotaro HORIGUCHI
Date:
Subject: Re: [HACKERS] asynchronous execution