Re: making relfilenodes 56 bits

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>
Cc: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: making relfilenodes 56 bits
Date: 2022-06-30 02:42:25
Message-ID: CA+hUKG+ZrDms7gSjckme8YV2tzxgZ0KVfGcsjaFoKyzQX_f_Mw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 30, 2022 at 12:41 AM Simon Riggs
<simon(dot)riggs(at)enterprisedb(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2022-06-30 03:28:43 Backup command and functions can cause assertion failure and segmentation fault
Previous Message Justin Pryzby 2022-06-30 02:24:37 Re: Add test of pg_prewarm extenion