Re: making relfilenodes 56 bits
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>, Heikki Linnakangas <hlinnaka@iki.fi>, Thomas Munro <thomas.munro@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-07-11T23:21:57Z
Lists: pgsql-hackers
On 2022-07-11 16:11:53 -0400, Robert Haas wrote: > On Mon, Jul 11, 2022 at 3:34 PM Andres Freund <andres@anarazel.de> wrote: > > Seems pretty simple to do. Have write_relmapper_file() write to a .tmp file > > first (likely adding O_TRUNC to flags), use durable_rename() to rename it into > > place. The tempfile should probably be written out before the XLogInsert(), > > the durable_rename() after, although I think it'd also be correct to more > > closely approximate the current sequence. > > Something like this? Yea. I've not looked carefully, but on a quick skim it looks good. > I chose not to use durable_rename() here, because that allowed me to > do more of the work before starting the critical section, and it's > probably slightly more efficient this way, too. That could be changed, > though, if you really want to stick with durable_rename(). I guess I'm not enthused in duplicating the necessary knowledge in evermore places. We've forgotten one of the magic incantations in the past, and needing to find all the places that need to be patched is a bit bothersome. Perhaps we could add extract helpers out of durable_rename()? OTOH, I don't really see what we gain by keeping things out of the critical section? It does seem good to have the temp-file creation/truncation and write separately, but after that I don't think it's worth much to avoid a PANIC. What legitimate issue does it avoid? Greetings, Andres Freund
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