Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work

Nathan Bossart <bossartn@amazon.com>

From: "Bossart, Nathan" <bossartn@amazon.com>
To: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, Julien Rouhaud <rjuju123@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-01-20T20:41:16Z
Lists: pgsql-hackers

Attachments

On 1/20/22, 12:24 PM, "Bossart, Nathan" <bossartn@amazon.com> wrote:
> On 1/20/22, 11:47 AM, "Andres Freund" <andres@anarazel.de> wrote:
>>> +     /* persist directory entries to disk */
>>> +     fsync_fname("pg_logical/mappings", true);
>>
>> This is probably worth backpatching, if you split it out I'll do so.
>
> Sure thing, will do shortly.

Here's this part.

Nathan

Commits

  1. Expand the use of get_dirent_type(), shaving a few calls to stat()/lstat()

  2. fsync pg_logical/mappings in CheckPointLogicalRewriteHeap().

  3. Introduce logical decoding.