Re: making relfilenodes 56 bits
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Simon Riggs <simon.riggs@enterprisedb.com>
Cc: Matthias van de Meent <boekewurm+postgres@gmail.com>,
Andres Freund <andres@anarazel.de>, Robert Haas <robertmhaas@gmail.com>, Dilip Kumar <dilipbalaut@gmail.com>, Heikki Linnakangas <hlinnaka@iki.fi>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-06-30T02:42:25Z
Lists: pgsql-hackers
On Thu, Jun 30, 2022 at 12:41 AM Simon Riggs <simon.riggs@enterprisedb.com> wrote: > The reason to mention this now is that it would give more space than > 56bit limit being suggested here. Isn't 2^56 enough, though? Remembering that cluster time runs out when we've generated 2^64 bytes of WAL, if you want to run out of 56 bit relfile numbers before the end of time you'll need to find a way to allocate them in less than 2^8 bytes of WAL. That's technically possible, since SMgr CREATE records are only 42 bytes long, so you could craft some C code to do nothing but create (and leak) relfilenodes, but real usage is always accompanied by catalogue insertions to connect the new relfilenode to a database object, without which they are utterly useless. So in real life, it takes many hundreds or typically thousands of bytes, much more than 256.
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