pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Shruthi Gowda <gowdashru@gmail.com>
Cc: Julien Rouhaud <rjuju123@gmail.com>
Cc: Sadhuprasad Patro <b.sadhu@gmail.com>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Andres Freund <andres@anarazel.de>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Tom Kincaid <tomjohnkincaid@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: PostgreSQL Development <pgsql-hackers@postgresql.org>
Cc: Masahiko Sawada <masahiko.sawada@2ndquadrant.com>
Subject: Re: preserving db/ts/relfilenode OIDs across pg_upgrade (was Re: storing an explicit nonce)
Date: Fri, 21 Jan 2022 13:57:18 -0500
Message-ID: <1203379.1642791438@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoYpSWZoLLf94RwZro-QYtrUkDX-_U4VbT0rpCZsObgR3w@mail.gmail.com>
References: <CA+TgmoZtbAnybMwni-u-9LArqYhsvpeF48itsJP=otrvE_ZzSQ@mail.gmail.com>
	<CAASxf_Mj3SSXFmtd9O6sf-+y4PJz+oZ57RAi0bRKKLAOBDcorA@mail.gmail.com>
	<CA+TgmoZhgeXfrT5zOUkVisPQ-cuYRg2M9MBG7WrE0sgcUKQVWg@mail.gmail.com>
	<CAASxf_P+EFr++8Vmfjb88HMEcCRS6NbXXQhFath0oXLnoHwJSA@mail.gmail.com>
	<CA+TgmoZ9ee+RHdFXvJ9obHfwJvpxRMN=dxrJNWoktc+QBj=XVw@mail.gmail.com>
	<CAASxf_Nzsprv-JxO=8QDzK226iYMu0fspgRD4RoYQ=ddcO0Xqw@mail.gmail.com>
	<CAFF0-CEPkpnc+SbPxqm0Q6A6cKjmNN+PndYf21+T+gQtiM0BGg@mail.gmail.com>
	<CA+TgmoYbCSQzwBsn-33Pk=Y34uovR_bt9dVrZVMX0jHgZMWG1A@mail.gmail.com>
	<CAASxf_Pqp44ERghe3JkiDoxNhf7DCDg-=emq1ZV3TVKTKajLmA@mail.gmail.com>
	<CAASxf_Nmjh-Do92L6RXjjYGMnUZKx7RK1D266xRWhKjPA_7Egw@mail.gmail.com>
	<20220115054719.yeqoy2mdllbc7wq2@jrouhaud>
	<CAASxf_OL+GtnnfHJ6-KtgHFFskv_btd5_wn_B39HvOyQTMXNBw@mail.gmail.com>
	<CA+TgmoaOFR=3eWScWrDDw0m9u-a+CaFXrZNwgnJfo7g9_mP_nA@mail.gmail.com>
	<CAASxf_O4+cZeGb=W98=WEp0R=d+=Um7PM=8h7Ec-qZ=tJR1EEQ@mail.gmail.com>
	<CA+Tgmobqtiq13Td2ZaV1tMk2U8mi4=tAA2P! AhpigP1NHDqzj9Q@mail.gmail.com>
	<CAASxf_Oj8cSJonwsWMtGyUTkK-EhmygW0HGTSXb1jCq_beAwkQ@mail.gmail.com>
	<CA+TgmoaHQqzeGE++XoxqLnHbwT2pSnB=Ci9qsWyfgwfdpBkXdg@mail.gmail.com>
	<CAASxf_Oo38X3GyxHbpjRc=b9WEwZMsA3hsZx-YQwqMkwH84_ig@mail.gmail.com>
	<CA+TgmoYpSWZoLLf94RwZro-QYtrUkDX-_U4VbT0rpCZsObgR3w@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> It seems to me that what this comment is saying is that OIDs in the
> second and third categories are doled out by counters. Therefore, we
> can't know which of those OIDs will get used, or how many of them will
> get used, or which objects will get which OIDs. Therefore, I think we
> should go back to the approach that you were using for template0 and
> handle both that database and postgres using that method. That is,
> assign an OID manually, and make sure unused_oids knows that it should
> be counted as already used.

Indeed.  If you're going to manually assign OIDs to these databases,
do it honestly, and put them into the range intended for that purpose.
Trying to take short-cuts is just going to cause trouble down the road.

			regards, tom lane





view thread (90+ messages)  latest in thread

Message-ID: <1203379.1642791438@sss.pgh.pa.us>
Permalink:  ../1203379.1642791438@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1203379.1642791438@sss.pgh.pa.us

 · 

reply

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, robertmhaas@gmail.com, gowdashru@gmail.com, rjuju123@gmail.com, b.sadhu@gmail.com, sfrost@snowman.net, bruce@momjian.us, andres@anarazel.de, alvherre@alvh.no-ip.org, sawada.mshk@gmail.com, tomjohnkincaid@gmail.com, amit.kapila16@gmail.com, thomas.munro@gmail.com, masahiko.sawada@2ndquadrant.com
  Subject: Re: preserving db/ts/relfilenode OIDs across pg_upgrade (was Re: storing an explicit nonce)
  In-Reply-To: <1203379.1642791438@sss.pgh.pa.us>
  References: <CA+TgmoZtbAnybMwni-u-9LArqYhsvpeF48itsJP=otrvE_ZzSQ@mail.gmail.com> <CAASxf_Nzsprv-JxO=8QDzK226iYMu0fspgRD4RoYQ=ddcO0Xqw@mail.gmail.com> <CAFF0-CEPkpnc+SbPxqm0Q6A6cKjmNN+PndYf21+T+gQtiM0BGg@mail.gmail.com> <CA+TgmoYbCSQzwBsn-33Pk=Y34uovR_bt9dVrZVMX0jHgZMWG1A@mail.gmail.com> <CAASxf_Pqp44ERghe3JkiDoxNhf7DCDg-=emq1ZV3TVKTKajLmA@mail.gmail.com> <CAASxf_Nmjh-Do92L6RXjjYGMnUZKx7RK1D266xRWhKjPA_7Egw@mail.gmail.com> <20220115054719.yeqoy2mdllbc7wq2@jrouhaud> <CAASxf_OL+GtnnfHJ6-KtgHFFskv_btd5_wn_B39HvOyQTMXNBw@mail.gmail.com> <CA+TgmoaOFR=3eWScWrDDw0m9u-a+CaFXrZNwgnJfo7g9_mP_nA@mail.gmail.com> <CAASxf_O4+cZeGb=W98=WEp0R=d+=Um7PM=8h7Ec-qZ=tJR1EEQ@mail.gmail.com> <CAASxf_Oj8cSJonwsWMtGyUTkK-EhmygW0HGTSXb1jCq_beAwkQ@mail.gmail.com> <CA+TgmoaHQqzeGE++XoxqLnHbwT2pSnB=Ci9qsWyfgwfdpBkXdg@mail.gmail.com> <CAASxf_Oo38X3GyxHbpjRc=b9WEwZMsA3hsZx-YQwqMkwH84_ig@mail.gmail.com> <CA+TgmoYpSWZoLLf94RwZro-QYtrUkDX-_U4VbT0rpCZsObgR3w@mail.gmail.com> <1203379.1642791438@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