From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Cc: Rushabh Lathia <rushabh.lathia@gmail.com>
Cc: Tomas Vondra <tomas.vondra@enterprisedb.com>
Subject: Re: Replacing pg_depend PIN entries with a fixed range check
Date: Thu, 15 Apr 2021 12:37:48 -0400
Message-ID: <3784992.1618504668@sss.pgh.pa.us> (raw)
In-Reply-To: <3737988.1618451008@sss.pgh.pa.us>
References: <3737988.1618451008@sss.pgh.pa.us>
[ connecting up two threads here ]
I wrote:
> Hence, what this patch does is to establish a manually-managed cutoff
> point akin to FirstBootstrapObjectId, and make initdb push the OID
> counter up to that once it's made the small number of pinned objects
> it's responsible for. With the value I used here, a couple hundred
> OIDs are wasted, but there seems to be a reasonable amount of headroom
> still beyond that. On my build, the OID counter at the end of initdb
> is 15485 (with a reasonable number of glibc and ICU locales loaded).
> So we still have about 900 free OIDs there; and there are 500 or so
> free just below FirstBootstrapObjectId, too. So this approach does
> hasten the day when we're going to run out of free OIDs below 16384,
> but not by all that much.
In view of the discussion at [1], there's more pressure on the OID supply
above 10K than I'd realized. While I don't have any good ideas about
eliminating the problem altogether, I did have a thought that would remove
the extra buffer zone created by my first-draft patch in this thread.
Namely, let's have genbki.pl write out its final OID assignment counter
value in a command in the postgres.bki file, say "set_next_oid 12036".
This would cause the bootstrap backend to set the server's OID counter to
that value. Then the initial part of initdb's post-bootstrap processing
could assign pinned OIDs working forward from there, with no gap. We'd
still need a gap before FirstBootstrapObjectId (which we might as well
rename to FirstUnpinnedObjectId), but we don't need two gaps, and so this
patch wouldn't make things any worse than they are today.
I'm not planning to put more effort into this patch right now, but
I'll revise it along these lines once v15 development opens.
regards, tom lane
[1] https://www.postgresql.org/message-id/flat/CAGPqQf3JYTrTB1E1fu_zOGj%2BrG_kwTfa3UcUYPfNZL9o1bcYNw%40m...
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, rushabh.lathia@gmail.com, tomas.vondra@enterprisedb.com
Subject: Re: Replacing pg_depend PIN entries with a fixed range check
In-Reply-To: <3784992.1618504668@sss.pgh.pa.us>
References: <3737988.1618451008@sss.pgh.pa.us> <3784992.1618504668@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox