Re: Make relfile tombstone files conditional on WAL level
Dilip Kumar <dilipbalaut@gmail.com>
From: Dilip Kumar <dilipbalaut@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, Heikki Linnakangas <hlinnaka@iki.fi>, Thomas Munro <thomas.munro@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-02-21T07:51:31Z
Lists: pgsql-hackers
Attachments
- v4-0001-Preliminary-refactoring-for-supporting-larger-rel.patch (text/x-patch) patch v4-0001
- v4-0003-Don-t-delay-removing-Tombstone-file-until-next-ch.patch (text/x-patch) patch v4-0003
- v4-0002-Use-56-bits-for-relfilenode-to-avoid-wraparound.patch (text/x-patch) patch v4-0002
On Thu, Jan 6, 2022 at 1:43 PM Dilip Kumar <dilipbalaut@gmail.com> wrote: 2) GetNewRelFileNode() will not loop for checking the file existence > and retry with other relfilenode. While working on this I realized that even if we make the relfilenode 56 bits we can not remove the loop inside GetNewRelFileNode() for checking the file existence. Because it is always possible that the file reaches to the disk even before the WAL for advancing the next relfilenode and if the system crashes in between that then we might generate the duplicate relfilenode right? I think the second paragraph in XLogPutNextOid() function explain this issue and now even after we get the wider relfilenode we will have this issue. Correct? I am also attaching the latest set of patches for reference, these patches fix the review comments given by Robert about moving the dbOid, tbsOid and RelNode directly into the buffer tag. Open Issues- there are currently 2 open issues in the patch 1) Issue as discussed above about removing the loop, so currently in this patch the loop is removed. 2) During upgrade from the previous version we need to advance the nextrelfilenode to the current relfilenode we are setting for the object in order to avoid the conflict. -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com
Commits
-
Fix typos in comments, code and documentation
- 33ab0a2a527e 16.0 cited
-
Increase width of RelFileNumbers from 32 bits to 56 bits.
- 05d4cbf9b6ba 16.0 landed
-
Move RelFileNumber declarations to common/relpath.h.
- 2f47715cc864 16.0 landed
-
Include RelFileLocator fields individually in BufferTag.
- 82ac34db2036 16.0 landed
-
Convert macros to static inline functions (buf_internals.h)
- 3ac88fddd92c 16.0 landed
-
Remove the restriction that the relmap must be 512 bytes.
- d8cd0c6c95c0 16.0 landed
-
Change internal RelFileNode references to RelFileNumber or RelFileLocator.
- b0a55e43299c 16.0 landed
-
Reorder subskiplsn in pg_subscription to avoid alignment issues.
- 79b716cfb7a1 15.0 cited
-
Fix DROP {DATABASE,TABLESPACE} on Windows.
- 4eb2176318d0 15.0 cited
-
Restructure smgr API as per recent proposal. smgr no longer depends on
- 87bd95638552 8.0.0 cited