postgresql/src/backend
Michael Paquier 7b565843a9 Add call to object access hook at the end of table rewrite in ALTER TABLE
ALTER TABLE .. SET {LOGGED,UNLOGGED,ACCESS METHOD} would never do a
table-level object access hook, which was inconsistent with SET
TABLESPACE.  Note that contrary to SET TABLESPACE, the no-op case is
left off for those commands as this requires tracking if commands have
been called, but they may not execute a physical rewrite.  Another thing
worth noting is that the physical file swap at the end of a rewrite
does a couple of access calls for internal objects created for the swap
operation (internal objects are for example skipped by the tests of
sepgsql), but this does not trigger the hook for the table on which the
operation is done.

f41872d, that added support for SET LOGGED/UNLOGGED in ALTER TABLE,
visibly forgot to consider that.

Based on what I checked, two regression tests of sepgsql in ddl.sql are
going to log more information with this test, something that buildfarm
member rhinoceros will tell soon enough.  I am not completely sure of
their format though, so these are not refreshed yet.

This is arguably a bug, but no backpatch is done as this could cause a
behavior change for anybody using object access hooks.

Reported-by: Jeff Davis
Discussion: https://postgr.es/m/YQJKV29/1a60uG68@paquier.xyz
2021-08-10 12:21:05 +09:00
..
access Remove some unnecessary casts in format arguments 2021-08-08 22:08:07 +02:00
bootstrap Fix bogus assertion in BootstrapModeMain(). 2021-08-09 08:28:53 -07:00
catalog Add missing message punctuation 2021-08-06 22:11:28 +02:00
commands Add call to object access hook at the end of table rewrite in ALTER TABLE 2021-08-10 12:21:05 +09:00
executor Change SeqScan node to contain Scan node 2021-08-08 18:46:34 +02:00
foreign Update copyright for 2021 2021-01-02 13:06:25 -05:00
jit Clarify some comments making use of leetspeak term "up2date" 2021-07-28 10:31:24 +09:00
lib Fix typo in comment 2021-04-20 14:35:16 +02:00
libpq Add more sanity checks in SASL exchanges 2021-07-10 21:45:28 +09:00
main process startup: Centralize pgwin32_signal_initialize() calls. 2021-08-05 12:36:06 -07:00
nodes Check the size in COPY_POINTER_FIELD 2021-08-08 18:46:34 +02:00
optimizer Change NestPath node to contain JoinPath node 2021-08-08 18:46:34 +02:00
parser Don't elide casting to typmod -1. 2021-08-06 17:32:54 -04:00
partitioning Allow ordered partition scans in more cases 2021-08-03 12:25:52 +12:00
po Translation updates 2021-06-21 12:33:50 +02:00
port Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04:00
postmaster pgstat: Schedule per-backend pgstat shutdown via before_shmem_exit(). 2021-08-06 19:11:05 -07:00
regex Avoid determining regexp subexpression matches, when possible. 2021-08-09 11:26:34 -04:00
replication Remove unused argument "txn" in maybe_send_schema(). 2021-08-05 17:49:51 +09:00
rewrite Use l*_node() family of functions where appropriate 2021-07-19 08:20:24 +02:00
snowball Update snowball 2021-02-19 08:10:15 +01:00
statistics Error message refactoring 2021-06-27 09:41:16 +02:00
storage Move temporary file cleanup to before_shmem_exit(). 2021-08-07 19:20:47 -07:00
tcop process startup: Always call Init[Auxiliary]Process() before BaseInit(). 2021-08-05 15:36:59 -07:00
tsearch Improve various places that double the size of a buffer 2021-07-01 15:29:06 +12:00
utils Let regexp_replace() make use of REG_NOSUB when feasible. 2021-08-09 20:53:25 -04:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
Makefile Use sort_template.h for qsort_tuple() and qsort_ssup(). 2021-03-03 17:02:32 +13:00
nls.mk Translation updates 2021-05-10 14:36:21 +02:00