postgresql/src/bin/pg_dump
Fujii Masao 176002c5bf pg_dump: Fix dumping of security labels on subscriptions and event triggers.
Previously, pg_dump incorrectly queried pg_seclabel to retrieve security labels
for subscriptions, which are stored in pg_shseclabel as they are global objects.
This could result in security labels for subscriptions not being dumped.

This commit fixes the issue by updating pg_dump to query the pg_seclabels view,
which aggregates entries from both pg_seclabel and pg_shseclabel.
While querying pg_shseclabel directly for subscriptions was an alternative,
using pg_seclabels is simpler and sufficient.

In addition, pg_dump is updated to dump security labels on event triggers,
which were previously omitted.

Backpatch to all supported versions.

Author: Jian He <jian.universality@gmail.com>
Co-authored-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CACJufxHCt00pR9h51AVu6+yPD5J7JQn=7dQXxqacj0XyDhc-fA@mail.gmail.com
Backpatch-through: 13
2025-09-16 16:46:28 +09:00
..
po Translation updates 2025-09-01 13:07:49 +02:00
t pg_restore: Fix comment handling with --no-policies. 2025-09-16 11:55:10 +09:00
.gitignore Clean up after pg_dump test runs. 2016-05-06 22:28:01 -04:00
common.c Sort dump objects independent of OIDs, for the 7 holdout object types. 2025-07-31 06:37:59 -07:00
compress_gzip.c pg_dump: Fix compression API errorhandling 2025-08-29 19:28:46 +02:00
compress_gzip.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
compress_io.c pg_dump: Fix compression API errorhandling 2025-08-29 19:28:46 +02:00
compress_io.h pg_dump: Fix compression API errorhandling 2025-08-29 19:28:46 +02:00
compress_lz4.c pg_dump: Fix compression API errorhandling 2025-08-29 19:28:46 +02:00
compress_lz4.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
compress_none.c pg_dump: Fix compression API errorhandling 2025-08-29 19:28:46 +02:00
compress_none.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
compress_zstd.c pg_dump: Fix compression API errorhandling 2025-08-29 19:28:46 +02:00
compress_zstd.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
connectdb.c Small code consistency improvement 2025-04-25 13:01:31 +02:00
connectdb.h Move common pg_dump code related to connections to a new file 2025-04-04 16:01:22 -04:00
dumputils.c Restrict psql meta-commands in plain-text dumps. 2025-08-11 09:00:00 -05:00
dumputils.h Restrict psql meta-commands in plain-text dumps. 2025-08-11 09:00:00 -05:00
filter.c pg_dump: Fix incorrect parsing of object types in pg_dump --filter. 2025-08-08 14:37:32 +09:00
filter.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
Makefile Move common pg_dump code related to connections to a new file 2025-04-04 16:01:22 -04:00
meson.build Revert Non text modes for pg_dumpall, and pg_restore support 2025-07-30 11:32:16 -04:00
nls.mk Add missing source file to pg_dump/nls.mk 2025-04-11 10:28:59 +02:00
parallel.c Revert Non text modes for pg_dumpall, and pg_restore support 2025-07-30 11:32:16 -04:00
parallel.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
pg_backup.h Restrict psql meta-commands in plain-text dumps. 2025-08-11 09:00:00 -05:00
pg_backup_archiver.c pg_dump: Fix dumping of security labels on subscriptions and event triggers. 2025-09-16 16:46:28 +09:00
pg_backup_archiver.h Revert Non text modes for pg_dumpall, and pg_restore support 2025-07-30 11:32:16 -04:00
pg_backup_custom.c Skip second WriteToc() call for custom-format dumps without data. 2025-04-04 14:51:08 -05:00
pg_backup_db.c Move common pg_dump code related to connections to a new file 2025-04-04 16:01:22 -04:00
pg_backup_db.h Revert "pg_dump: Lock all relations, not just plain tables". 2020-11-06 15:48:04 -05:00
pg_backup_directory.c pg_dump: Fix compression API errorhandling 2025-08-29 19:28:46 +02:00
pg_backup_null.c Rearrange pg_dump's handling of large objects for better efficiency. 2024-04-01 16:25:56 -04:00
pg_backup_tar.c Revert Non text modes for pg_dumpall, and pg_restore support 2025-07-30 11:32:16 -04:00
pg_backup_tar.h Fix tar files emitted by pg_dump and pg_basebackup to be POSIX conformant. 2012-09-28 15:19:15 -04:00
pg_backup_utils.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
pg_backup_utils.h pg_noreturn to replace pg_attribute_noreturn() 2025-03-13 12:37:26 +01:00
pg_dump.c pg_dump: Fix dumping of security labels on subscriptions and event triggers. 2025-09-16 16:46:28 +09:00
pg_dump.h Sort dump objects independent of OIDs, for the 7 holdout object types. 2025-07-31 06:37:59 -07:00
pg_dump_sort.c Sort DO_DEFAULT_ACL dump objects independent of OIDs. 2025-08-22 20:50:31 -07:00
pg_dumpall.c Restrict psql meta-commands in plain-text dumps. 2025-08-11 09:00:00 -05:00
pg_restore.c Restrict psql meta-commands in plain-text dumps. 2025-08-11 09:00:00 -05:00