pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Don't set a fast default for anything but a plain table
5+ messages / 2 participants
[nested] [flat]

* pgsql: Don't set a fast default for anything but a plain table
@ 2021-06-18 11:54  Andrew Dunstan <andrew@dunslane.net>
  0 siblings, 1 reply; 5+ messages in thread

From: Andrew Dunstan @ 2021-06-18 11:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Don't set a fast default for anything but a plain table

The fast default code added in Release 11 omitted to check that the
table a fast default was being added to was a plain table. Thus one
could be added to a foreign table, which predicably blows up. Here we
perform that check.

In addition, on the back branches, since some of these might have
escaped into the wild, if we encounter a missing value for
an attribute of something other than a plain table we ignore it.

Fixes bug #17056

Backpatch to release 11,

Reviewed by: Andres Freund, Álvaro Herrera and Tom Lane

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/306c318043a9c977a248b0fbef7ca091ff863ef1

Modified Files
--------------
src/backend/catalog/heap.c                 |  9 ++++++++-
src/backend/commands/tablecmds.c           |  7 ++++---
src/backend/utils/cache/relcache.c         | 19 ++++++++++++++++++-
src/test/regress/expected/fast_default.out | 19 +++++++++++++++++++
src/test/regress/sql/fast_default.sql      | 14 ++++++++++++++
5 files changed, 63 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Don't set a fast default for anything but a plain table
@ 2021-06-18 11:54  Andrew Dunstan <andrew@dunslane.net>
  0 siblings, 0 replies; 5+ messages in thread

From: Andrew Dunstan @ 2021-06-18 11:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Don't set a fast default for anything but a plain table

The fast default code added in Release 11 omitted to check that the
table a fast default was being added to was a plain table. Thus one
could be added to a foreign table, which predicably blows up. Here we
perform that check.

In addition, on the back branches, since some of these might have
escaped into the wild, if we encounter a missing value for
an attribute of something other than a plain table we ignore it.

Fixes bug #17056

Backpatch to release 11,

Reviewed by: Andres Freund, Álvaro Herrera and Tom Lane

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0a4efdc7ebf2584257b166c87e82797eb92815b5

Modified Files
--------------
src/backend/catalog/heap.c                 | 10 +++++++++-
src/test/regress/expected/fast_default.out | 19 +++++++++++++++++++
src/test/regress/sql/fast_default.sql      | 14 ++++++++++++++
3 files changed, 42 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Don't set a fast default for anything but a plain table
@ 2021-06-18 11:54  Andrew Dunstan <andrew@dunslane.net>
  0 siblings, 0 replies; 5+ messages in thread

From: Andrew Dunstan @ 2021-06-18 11:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Don't set a fast default for anything but a plain table

The fast default code added in Release 11 omitted to check that the
table a fast default was being added to was a plain table. Thus one
could be added to a foreign table, which predicably blows up. Here we
perform that check.

In addition, on the back branches, since some of these might have
escaped into the wild, if we encounter a missing value for
an attribute of something other than a plain table we ignore it.

Fixes bug #17056

Backpatch to release 11,

Reviewed by: Andres Freund, Álvaro Herrera and Tom Lane

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5b6b5e5ee598ced2dc8e1d08a34d499860a4d15b

Modified Files
--------------
src/backend/catalog/heap.c                 | 10 +++++++++-
src/backend/commands/tablecmds.c           |  5 +++--
src/backend/utils/cache/relcache.c         | 19 ++++++++++++++++++-
src/test/regress/expected/fast_default.out | 19 +++++++++++++++++++
src/test/regress/sql/fast_default.sql      | 14 ++++++++++++++
5 files changed, 63 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Don't set a fast default for anything but a plain table
@ 2021-06-18 11:54  Andrew Dunstan <andrew@dunslane.net>
  0 siblings, 0 replies; 5+ messages in thread

From: Andrew Dunstan @ 2021-06-18 11:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Don't set a fast default for anything but a plain table

The fast default code added in Release 11 omitted to check that the
table a fast default was being added to was a plain table. Thus one
could be added to a foreign table, which predicably blows up. Here we
perform that check.

In addition, on the back branches, since some of these might have
escaped into the wild, if we encounter a missing value for
an attribute of something other than a plain table we ignore it.

Fixes bug #17056

Backpatch to release 11,

Reviewed by: Andres Freund, Álvaro Herrera and Tom Lane

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6432bfe8a372a1c1d4ee8edc91be7fe9910bf51d

Modified Files
--------------
src/backend/catalog/heap.c                 | 10 +++++++++-
src/backend/commands/tablecmds.c           |  5 +++--
src/backend/utils/cache/relcache.c         | 19 ++++++++++++++++++-
src/test/regress/expected/fast_default.out | 19 +++++++++++++++++++
src/test/regress/sql/fast_default.sql      | 14 ++++++++++++++
5 files changed, 63 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: pgsql: Don't set a fast default for anything but a plain table
@ 2021-06-18 13:26  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Andrew Dunstan <andrew@dunslane.net>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2021-06-18 13:26 UTC (permalink / raw)
  To: Andrew Dunstan <andrew@dunslane.net>; +Cc: pgsql-committers@lists.postgresql.org

Andrew Dunstan <andrew@dunslane.net> writes:
> Don't set a fast default for anything but a plain table

Buildfarm's not happy with the v11 version.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2021-06-18 13:26 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18 11:54 pgsql: Don't set a fast default for anything but a plain table Andrew Dunstan <andrew@dunslane.net>
2021-06-18 11:54 pgsql: Don't set a fast default for anything but a plain table Andrew Dunstan <andrew@dunslane.net>
2021-06-18 11:54 pgsql: Don't set a fast default for anything but a plain table Andrew Dunstan <andrew@dunslane.net>
2021-06-18 11:54 pgsql: Don't set a fast default for anything but a plain table Andrew Dunstan <andrew@dunslane.net>
2021-06-18 13:26 ` Tom Lane <tgl@sss.pgh.pa.us>

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