public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: [email protected]
Subject: pgsql: pg_dump, pg_dumpall, pg_restore: Add --no-policies option.
Date: Sun, 16 Mar 2025 22:08:34 +0000
Message-ID: <[email protected]> (raw)

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 <[email protected]>
Reviewed-by: Greg Sabino Mullane <[email protected]>
Reviewed-by: Jim Jones <[email protected]>
Reviewed-by: newtglobal postgresql_contributors <[email protected]>
Discussion: https://postgr.es/m/CAM527d8kG2qPKvbfJ=OYJkT7iRNd623Bk+m-a4ngm+nyHYsHog@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(-)



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgsql: pg_dump, pg_dumpall, pg_restore: Add --no-policies option.
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox