pg_dump, pg_dumpall, pg_restore: Add --no-policies option. Add --no-policies option to control row level security policy handling in dump and restore operations. When this option is used, both CREATE POLICY commands and ALTER TABLE ... ENABLE ROW LEVEL SECURITY commands are excluded from dumps and skipped during restores.
This is useful in scenarios where policies need to be redefined in the target system or when moving data between environments with different security requirements. Author: Nikolay Samokhvalov <n...@postgres.ai> Reviewed-by: Greg Sabino Mullane <htamf...@gmail.com> Reviewed-by: Jim Jones <jim.jo...@uni-muenster.de> Reviewed-by: newtglobal postgresql_contributors <postgresql_contribut...@newtglobalcorp.com> Discussion: https://postgr.es/m/CAM527d8kG2qPKvbfJ=oyjkt7irnd623bk+m-a4ngm+nyhys...@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/cd3c45125d2d92e86ad7530b162562a23d063c26 Modified Files -------------- doc/src/sgml/ref/pg_dump.sgml | 9 +++++++++ doc/src/sgml/ref/pg_dumpall.sgml | 9 +++++++++ doc/src/sgml/ref/pg_restore.sgml | 10 ++++++++++ src/bin/pg_dump/pg_backup.h | 4 +++- src/bin/pg_dump/pg_backup_archiver.c | 7 +++++++ src/bin/pg_dump/pg_dump.c | 8 ++++++++ src/bin/pg_dump/pg_dumpall.c | 5 +++++ src/bin/pg_dump/pg_restore.c | 4 ++++ src/bin/pg_dump/t/002_pg_dump.pl | 16 ++++++++++++++++ 9 files changed, 71 insertions(+), 1 deletion(-)