postgresql/src/bin
Tom Lane 891afa84c2 Don't try to dump RLS policies or security labels for extension objects.
checkExtensionMembership() set the DUMP_COMPONENT_SECLABEL and
DUMP_COMPONENT_POLICY flags for extension member objects, even though
we lack any infrastructure for tracking extensions' initial settings
of these properties.  This is not OK.  The result was that a dump
would always include commands to set these properties for extension
objects that have them, with at least three negative consequences:

1. The restoring user might not have privilege to set these properties
on these objects.

2. The properties might be incorrect/irrelevant for the version of the
extension that's installed in the destination database.

3. The dump itself might fail, in the case of RLS properties attached
to extension tables that the dumping user lacks privilege to LOCK.
(That's because we must get at least AccessShareLock to ensure that
we don't fail while trying to decompile the RLS expressions.)

When and if somebody cares to invent initial-state infrastructure for
extensions' RLS policies and security labels, we could think about
finding another way around problem #3.  But in the absence of such
infrastructure, this whole thing is just wrong and we shouldn't do it.

(Note: this applies only to ordinary dumps; binary-upgrade dumps
still dump and restore extension member objects separately, with
all properties.)

Tom Lane and Jacob Champion.  Back-patch to all supported branches.

Discussion: https://postgr.es/m/00d46a48-3324-d9a0-49bf-e7f0f11d1038@timescale.com
2023-11-13 17:04:10 -05:00
..
initdb Translation updates 2023-11-06 13:27:02 +01:00
pg_archivecleanup Translation updates 2023-05-08 14:43:15 +02:00
pg_basebackup Translation updates 2023-11-06 13:27:02 +01:00
pg_checksums Translation updates 2023-05-08 14:43:15 +02:00
pg_config Translation updates 2023-11-06 13:27:02 +01:00
pg_controldata Translation updates 2023-11-06 13:27:02 +01:00
pg_ctl Translation updates 2023-11-06 13:27:02 +01:00
pg_dump Don't try to dump RLS policies or security labels for extension objects. 2023-11-13 17:04:10 -05:00
pg_resetwal Translation updates 2023-11-06 13:27:02 +01:00
pg_rewind Translation updates 2023-11-06 13:27:02 +01:00
pg_test_fsync Translation updates 2023-05-08 14:43:15 +02:00
pg_test_timing Translation updates 2023-05-08 14:43:15 +02:00
pg_upgrade Translation updates 2023-11-06 13:27:02 +01:00
pg_waldump Translation updates 2023-11-06 13:27:02 +01:00
pgbench Don't spuriously report FD_SETSIZE exhaustion on Windows. 2023-10-14 15:54:50 -07:00
pgevent Update copyright for 2019 2019-01-02 12:44:25 -05:00
psql Translation updates 2023-11-06 13:27:02 +01:00
scripts Translation updates 2023-11-06 13:27:02 +01:00
Makefile Rename pg_verify_checksums to pg_checksums 2019-03-13 10:43:20 +09:00