aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistbuild.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2019-03-19 10:48:03 +0100
committerPeter Eisentraut <peter@eisentraut.org>2019-03-19 11:15:50 +0100
commit590a87025b0aa9ebca53c7b71ddf036e5acd8f08 (patch)
tree0f435656ebdd8de843f8bfd2162778e70da90427 /src/backend/access/gist/gistbuild.c
parente537ac5182f8cfa7244a8c8ae772b787b2288605 (diff)
downloadpostgresql-590a87025b0aa9ebca53c7b71ddf036e5acd8f08.tar.gz
postgresql-590a87025b0aa9ebca53c7b71ddf036e5acd8f08.zip
Ignore attempts to add TOAST table to shared or catalog tables
Running ALTER TABLE on any table will check if a TOAST table needs to be added. On shared tables, this would previously fail, thus effectively disabling ALTER TABLE for those tables. On (non-shared) system catalogs, on the other hand, it would add a TOAST table, even though we don't really want TOAST tables on some system catalogs. In some cases, it would also fail with an error "AccessExclusiveLock required to add toast table.", depending on what locks the ALTER TABLE actions had already taken. So instead, just ignore attempts to add TOAST tables to such tables, outside of bootstrap mode, pretending they don't need one. This allows running ALTER TABLE on such tables without messing up the TOAST situation. Legitimate uses for ALTER TABLE on system catalogs include setting reloptions (say, fillfactor or autovacuum settings). (All this still requires allow_system_table_mods, which is independent of this.) Discussion: https://www.postgresql.org/message-id/flat/e49f825b-fb25-0bc8-8afc-d5ad895c7975@2ndquadrant.com
Diffstat (limited to 'src/backend/access/gist/gistbuild.c')
0 files changed, 0 insertions, 0 deletions