pgsql: Add pg_depend.refobjversion.

Started by Thomas Munroover 5 years ago7 messagescomitters
Jump to latest
#1Thomas Munro
thomas.munro@gmail.com

Add pg_depend.refobjversion.

Provide a place for the version of referenced database objects to be
recorded. A follow-up commit will use this to record dependencies on
collation versions for indexes, but similar ideas for other kinds of
objects have also been mooted.

Author: Thomas Munro <thomas.munro@gmail.com>
Reviewed-by: Julien Rouhaud <rjuju123@gmail.com>
Reviewed-by: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Discussion: /messages/by-id/CAEepm=0uEQCpfq_+LYFBdArCe4Ot98t1aR4eYiYTe=yavQygiQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/cd6f479e79f3a33ef7a919c6b6c0c498c790f154

Modified Files
--------------
doc/src/sgml/catalogs.sgml | 11 +++++++++++
src/backend/catalog/dependency.c | 14 ++++++++++----
src/backend/catalog/pg_depend.c | 14 ++++++++++----
src/include/catalog/catversion.h | 2 +-
src/include/catalog/dependency.h | 1 +
src/include/catalog/pg_depend.h | 4 ++++
src/include/catalog/toasting.h | 1 +
src/test/regress/expected/misc_sanity.out | 4 ++--
8 files changed, 40 insertions(+), 11 deletions(-)

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Thomas Munro (#1)
Re: pgsql: Add pg_depend.refobjversion.

This commit assigns OIDs from the reserved range:

+DECLARE_TOAST(pg_depend, 8888, 8889);

Do you want to try the renumber_oids.pl script to fix this?

Show quoted text

On 2020-11-02 13:27, Thomas Munro wrote:

Add pg_depend.refobjversion.

Provide a place for the version of referenced database objects to be
recorded. A follow-up commit will use this to record dependencies on
collation versions for indexes, but similar ideas for other kinds of
objects have also been mooted.

Author: Thomas Munro <thomas.munro@gmail.com>
Reviewed-by: Julien Rouhaud <rjuju123@gmail.com>
Reviewed-by: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Discussion: /messages/by-id/CAEepm=0uEQCpfq_+LYFBdArCe4Ot98t1aR4eYiYTe=yavQygiQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/cd6f479e79f3a33ef7a919c6b6c0c498c790f154

Modified Files
--------------
doc/src/sgml/catalogs.sgml | 11 +++++++++++
src/backend/catalog/dependency.c | 14 ++++++++++----
src/backend/catalog/pg_depend.c | 14 ++++++++++----
src/include/catalog/catversion.h | 2 +-
src/include/catalog/dependency.h | 1 +
src/include/catalog/pg_depend.h | 4 ++++
src/include/catalog/toasting.h | 1 +
src/test/regress/expected/misc_sanity.out | 4 ++--
8 files changed, 40 insertions(+), 11 deletions(-)

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#2)
Re: pgsql: Add pg_depend.refobjversion.

Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:

This commit assigns OIDs from the reserved range:
+DECLARE_TOAST(pg_depend, 8888, 8889);

Do you want to try the renumber_oids.pl script to fix this?

AFAIK the agreed-on process is to do that once per release cycle.
Is there some reason why it needs to be done now?

regards, tom lane

#4Peter Eisentraut
peter_e@gmx.net
In reply to: Tom Lane (#3)
Re: pgsql: Add pg_depend.refobjversion.

On 2020-11-05 15:50, Tom Lane wrote:

Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:

This commit assigns OIDs from the reserved range:
+DECLARE_TOAST(pg_depend, 8888, 8889);

Do you want to try the renumber_oids.pl script to fix this?

AFAIK the agreed-on process is to do that once per release cycle.
Is there some reason why it needs to be done now?

Ah, okay, then nevermind.

#5Magnus Hagander
magnus@hagander.net
In reply to: Tom Lane (#3)
Re: pgsql: Add pg_depend.refobjversion.

On Thu, Nov 5, 2020 at 3:50 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:

Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:

This commit assigns OIDs from the reserved range:
+DECLARE_TOAST(pg_depend, 8888, 8889);

Do you want to try the renumber_oids.pl script to fix this?

AFAIK the agreed-on process is to do that once per release cycle.
Is there some reason why it needs to be done now?

Did we ever actually document this process somewhere? I went looking
for it some time ago and failed to find it (and eventually found the
old email thread(s) around it, but that's not really documentation),
but that could definitely be my searching....

--
Magnus Hagander
Me: https://www.hagander.net/
Work: https://www.redpill-linpro.com/

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Magnus Hagander (#5)
Re: pgsql: Add pg_depend.refobjversion.

Magnus Hagander <magnus@hagander.net> writes:

On Thu, Nov 5, 2020 at 3:50 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:

AFAIK the agreed-on process is to do that once per release cycle.
Is there some reason why it needs to be done now?

Did we ever actually document this process somewhere? I went looking
for it some time ago and failed to find it (and eventually found the
old email thread(s) around it, but that's not really documentation),
but that could definitely be my searching....

Yeah, it's documented here:

https://www.postgresql.org/docs/devel/system-catalog-initial-data.html#SYSTEM-CATALOG-OID-ASSIGNMENT

and there is an entry in src/tools/RELEASE_CHANGES to remind us
to actually do the cleanup work.

regards, tom lane

#7Magnus Hagander
magnus@hagander.net
In reply to: Tom Lane (#6)
Re: pgsql: Add pg_depend.refobjversion.

On Thu, Nov 5, 2020 at 8:17 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:

Magnus Hagander <magnus@hagander.net> writes:

On Thu, Nov 5, 2020 at 3:50 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:

AFAIK the agreed-on process is to do that once per release cycle.
Is there some reason why it needs to be done now?

Did we ever actually document this process somewhere? I went looking
for it some time ago and failed to find it (and eventually found the
old email thread(s) around it, but that's not really documentation),
but that could definitely be my searching....

Yeah, it's documented here:

https://www.postgresql.org/docs/devel/system-catalog-initial-data.html#SYSTEM-CATALOG-OID-ASSIGNMENT

and there is an entry in src/tools/RELEASE_CHANGES to remind us
to actually do the cleanup work.

Ha! Thanks.

I did find the RELEASE_CHANGES ones, but for some reason managed to
miss the other one.

--
Magnus Hagander
Me: https://www.hagander.net/
Work: https://www.redpill-linpro.com/