Обсуждение: pgsql: Add pg_depend.refobjversion.
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: https://postgr.es/m/CAEepm%3D0uEQCpfq_%2BLYFBdArCe4Ot98t1aR4eYiYTe%3DyavQygiQ%40mail.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(-)
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? 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: https://postgr.es/m/CAEepm%3D0uEQCpfq_%2BLYFBdArCe4Ot98t1aR4eYiYTe%3DyavQygiQ%40mail.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(-) >
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
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.
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/
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
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/