Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, "Bossart, Nathan" <bossartn@amazon.com>, Tom Lane <tgl@sss.pgh.pa.us>, Julien Rouhaud <rjuju123@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-02-04T00:03:40Z
Lists: pgsql-hackers
On Thu, Feb 03, 2022 at 09:45:08AM +0530, Bharath Rupireddy wrote: > On Thu, Feb 3, 2022 at 12:07 AM Nathan Bossart <nathandbossart@gmail.com> wrote: >> If there is a problem reading the directory, we will LOG and then exit the >> loop. If we didn't scan through all the entries in the directory, there is >> a chance that we didn't fsync() all the files that need it. > > Thanks. I get it. For syncing map files, we don't want to tolerate any > errors, whereas removal of the old map files (lesser than cutoff LSN) > can be tolerated in CheckPointLogicalRewriteHeap. LGTM. Andres noted upthread [0] that the comment above sscanf() about skipping editors' lock files might not be accurate. I don't think it's a huge problem if sscanf() matches those files, but perhaps we can improve the comment. [0] https://postgr.es/m/20220120194618.hmfd4kxkng2cgryh%40alap3.anarazel.de -- Nathan Bossart Amazon Web Services: https://aws.amazon.com
Commits
-
Expand the use of get_dirent_type(), shaving a few calls to stat()/lstat()
- bfb9dfd93720 16.0 landed
-
fsync pg_logical/mappings in CheckPointLogicalRewriteHeap().
- fd48e5f5d3a1 13.6 landed
- f862cc09fad1 10.20 landed
- 2c15b29f7c22 11.15 landed
- 2b7dbe4bd587 14.2 landed
- 1c6d055ba77a 12.10 landed
- 1fabec7d7c38 15.0 landed
-
Introduce logical decoding.
- b89e151054a0 9.4.0 cited