Re: pgsql: Remove WITH OIDS support, change oid catalog columnvisibility.
Re: pgsql: Remove WITH OIDS support, change oid catalog columnvisibility.
От:
Christoph Berg <myon@debian.org>
Дата:
Re: Andres Freund 2018-11-21
> The biggest user of WITH OID columns was postgres' catalog. This
> commit changes all 'magic' oid columns to be columns that are normally
> declared and stored.
postgres=# \d+ pg_class
[...]
Indexe:
"pg_class_oid_index" UNIQUE, btree (oid)
Now that oid is a proper column, shouldn't that be a PRIMARY KEY?
(Just for the looks.)
Christoph
Re: pgsql: Remove WITH OIDS support, change oid catalog columnvisibility.
От:
Gavin Flower <GavinFlower@archidevsys.co.nz>
Дата:
On 21/11/2018 21:20, Christoph Berg wrote: > Re: Andres Freund 2018-11-21 >> The biggest user of WITH OID columns was postgres' catalog. This >> commit changes all 'magic' oid columns to be columns that are normally >> declared and stored. > postgres=# \d+ pg_class > [...] > Indexe: > "pg_class_oid_index" UNIQUE, btree (oid) > > Now that oid is a proper column, shouldn't that be a PRIMARY KEY? > (Just for the looks.) > > Christoph > Curious, is there a reason 'Index' is spelt with a trailing 'e'? Cheers, Gavin
Re: pgsql: Remove WITH OIDS support, change oid catalog columnvisibility.
От:
Christoph Berg <myon@debian.org>
Дата:
Re: Gavin Flower 2018-11-21 > Curious, is there a reason 'Index' is spelt with a trailing 'e'? LANG=de_DE.UTF-8 Christoph
Re: pgsql: Remove WITH OIDS support, change oid catalog columnvisibility.
От:
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Дата:
On 21/11/2018 09:20, Christoph Berg wrote: > Re: Andres Freund 2018-11-21 >> The biggest user of WITH OID columns was postgres' catalog. This >> commit changes all 'magic' oid columns to be columns that are normally >> declared and stored. > > postgres=# \d+ pg_class > [...] > Indexe: > "pg_class_oid_index" UNIQUE, btree (oid) > > Now that oid is a proper column, shouldn't that be a PRIMARY KEY? > (Just for the looks.) This is an independent consideration. There was nothing before that prevented an index on an oid column from being a primary key that isn't still there. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Re: pgsql: Remove WITH OIDS support, change oid catalog column visibility.
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
I noticed that this patch has broken restores of existing dump files: psql:testbed.public.backup:82: ERROR: unrecognized configuration parameter "default_with_oids" Quite aside from the fact that this won't work if the user tries to restore in single-transaction or no-error mode, this is really really unhelpful because it's impossible to tell whether the error is ignorable or not, except by digging through the dump file. What you should do is restore that GUC, but add a check-hook that throws an error for an attempt to set it to "true". regards, tom lane
Re: pgsql: Remove WITH OIDS support, change oid catalog columnvisibility.
От:
Andres Freund <andres@anarazel.de>
Дата:
Hi, On 2019-01-03 13:40:42 -0500, Tom Lane wrote: > I noticed that this patch has broken restores of existing dump files: > > psql:testbed.public.backup:82: ERROR: unrecognized configuration parameter "default_with_oids" > > Quite aside from the fact that this won't work if the user tries to > restore in single-transaction or no-error mode, this is really really > unhelpful because it's impossible to tell whether the error is > ignorable or not, except by digging through the dump file. > > What you should do is restore that GUC, but add a check-hook that throws > an error for an attempt to set it to "true". Makes sense, I (or a colleague) will look into that next week. Wanna get my head out of pluggable storage first... Greetings, Andres Freund
Re: pgsql: Remove WITH OIDS support, change oid catalog column visibility.
On Sat, 5 Jan 2019 at 02:09, Andres Freund wrote: > > Hi, > > On 2019-01-03 13:40:42 -0500, Tom Lane wrote: > > I noticed that this patch has broken restores of existing dump files: > > > > psql:testbed.public.backup:82: ERROR: unrecognized configuration parameter "default_with_oids" > > > > Quite aside from the fact that this won't work if the user tries to > > restore in single-transaction or no-error mode, this is really really > > unhelpful because it's impossible to tell whether the error is > > ignorable or not, except by digging through the dump file. > > > > What you should do is restore that GUC, but add a check-hook that throws > > an error for an attempt to set it to "true". Attached is a patch that does this. > > Makes sense, I (or a colleague) will look into that next week. Wanna get my > head out of pluggable storage first... > > Greetings, > > Andres Freund > -- Thanks, -Amit Khandekar EnterpriseDB Corporation The Postgres Database Company
Re: pgsql: Remove WITH OIDS support, change oid catalog columnvisibility.
От:
Andres Freund <andres@anarazel.de>
Дата:
Hi, On 2019-01-07 17:03:20 +0530, Amit Khandekar wrote: > On Sat, 5 Jan 2019 at 02:09, Andres Freund wrote: > > On 2019-01-03 13:40:42 -0500, Tom Lane wrote: > > > I noticed that this patch has broken restores of existing dump files: > > > > > > psql:testbed.public.backup:82: ERROR: unrecognized configuration parameter "default_with_oids" > > > > > > Quite aside from the fact that this won't work if the user tries to > > > restore in single-transaction or no-error mode, this is really really > > > unhelpful because it's impossible to tell whether the error is > > > ignorable or not, except by digging through the dump file. > > > > > > What you should do is restore that GUC, but add a check-hook that throws > > > an error for an attempt to set it to "true". > > Attached is a patch that does this. Thanks! I've pushed this, after some minor editorialization (hiding the GUC, shortened description, shortened error message). Regards, Andres