Search PostgreSQL documentation
PG 18 · Browse by category, or enter a name or keyword
Category index802
pg_restore --no-security-labels--no-security-labels
Do not output commands to restore security labels, even if the archive contains them.pg_restore › Options
pg_restore --no-statistics--no-statistics
Do not output commands to restore statistics, even if the archive contains them.pg_restore › Options
pg_restore --no-subscriptions--no-subscriptions
Do not output commands to restore subscriptions, even if the archive contains them.pg_restore › Options
pg_restore --no-table-access-method--no-table-access-method
Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore…pg_restore › Options
pg_restore --no-tablespaces--no-tablespaces
Do not output commands to select tablespaces. With this option, all objects will be created in whichever tablespace is the default during restore.pg_restore › Options
pg_restore --password-W--password
Force pg_restore to prompt for a password before connecting to a database. This option is never essential, since pg_restore will automatically prompt for a password if the serve…pg_restore › Options
pg_restore --port=port-p port--port=port
Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or…pg_restore › Options
pg_restore --restrict-key=restrict_key--restrict-key=restrict_key
Use the provided string as the psql \restrict key in the dump output. This can only be specified for SQL script output, i.e., when the --file option is used. If n…pg_restore › Options
pg_restore --role=rolename--role=rolename
Specifies a role name to be used to perform the restore. This option causes pg_restore to issue a SET ROLE rolename command after connecting to the database. It is useful whe…pg_restore › Options
pg_restore --schema-only-s--schema-only
Restore only the schema (data definitions), not data, to the extent that schema entries are present in the archive. This option cannot be used with --data-only or --statistic…pg_restore › Options
pg_restore --schema=schema-n schema--schema=schema
Restore only objects that are in the named schema. Multiple schemas may be specified with multiple -n switches. This can be combined with the -t option to restore ju…pg_restore › Options
pg_restore --section=sectionname--section=sectionname
Only restore the named section. The section name can be pre-data, data, or post-data. This option can be specified more than once to select multiple sections. The defau…pg_restore › Options
pg_restore --single-transaction-1--single-transaction
Execute the restore as a single transaction (that is, wrap the emitted commands in BEGIN/COMMIT). This ensures that either all the commands complete successfully, or n…pg_restore › Options
pg_restore --statistics--statistics
Output commands to restore statistics, if the archive contains them. This is the default.pg_restore › Options
pg_restore --statistics-only--statistics-only
Restore only the statistics, not schema (data definitions) or data.pg_restore › Options
pg_restore --strict-names--strict-names
Require that each schema (-n/--schema) and table (-t/--table) qualifier match at least one schema/table in the file to be restored.pg_restore › Options
pg_restore --superuser=username-S username--superuser=username
Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used.pg_restore › Options
pg_restore --table=table-t table--table=table
Restore definition and/or data of only the named table. For this purpose, “table” includes views, materialized views, sequences, and foreign tables. Multiple tables can…pg_restore › Options
pg_restore --transaction-size=N--transaction-size=N
Execute the restore as a series of transactions, each processing up to N database objects. This option implies --exit-on-error. --transaction-size offers an intermediate…pg_restore › Options
pg_restore --trigger=trigger-T trigger--trigger=trigger
Restore named trigger only. Multiple triggers may be specified with multiple -T switches.pg_restore › Options
pg_restore --use-list=list-file-L list-file--use-list=list-file
Restore only those archive elements that are listed in list-file, and restore them in the order they appear in the file. Note that if filtering switches such…pg_restore › Options
pg_restore --use-set-session-authorization--use-set-session-authorization
Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards-compa…pg_restore › Options
pg_restore --username=username-U username--username=username
User name to connect as.pg_restore › Options
pg_restore --verbose-v--verbose
Specifies verbose mode. This will cause pg_restore to output detailed object comments and start/stop times to the output file, and progress messages to standard error. Repeating …pg_restore › Options
pg_restore --version-V--version
Print the pg_restore version and exit.pg_restore › Options
pg_rewindpg_rewind pg_rewind — synchronize a PostgreSQL data directory with another data directory that was forked from it
Synopsis pg_rewind [option...] { -D | --target-pgdata } directory { --source…pg_rewind
pg_rewind --config-file=filename--config-file=filename
Use the specified main server configuration file for the target cluster. This affects pg_rewind when it uses internally the postgres command for the rewind operation o…pg_rewind › Options
pg_rewind --debug--debug
Print verbose debugging output that is mostly useful for developers debugging pg_rewind.pg_rewind › Options
pg_rewind --dry-run-n--dry-run
Do everything except actually modifying the target directory.pg_rewind › Options
pg_rewind --help-?--help
Show help, then exit.pg_rewind › Options
pg_rewind --no-ensure-shutdown--no-ensure-shutdown
pg_rewind requires that the target server is cleanly shut down before rewinding. By default, if the target server is not shut down cleanly, pg_rewind starts the target s…pg_rewind › Options
pg_rewind --no-sync-N--no-sync
By default, pg_rewind will wait for all files to be written safely to disk. This option causes pg_rewind to return without waiting, which is faster, but means that a subsequent o…pg_rewind › Options
pg_rewind --progress-P--progress
Enables progress reporting. Turning this on will deliver an approximate progress report while copying data from the source cluster.pg_rewind › Options
pg_rewind --restore-target-wal-c--restore-target-wal
Use restore_command defined in the target cluster configuration to retrieve WAL files from the WAL archive if these files are no longer available in the pg_wal directo…pg_rewind › Options
pg_rewind --source-pgdata=directory--source-pgdata=directory
Specifies the file system path to the data directory of the source server to synchronize the target with. This option requires the source server to be cleanly shut …pg_rewind › Options
pg_rewind --source-server=connstr--source-server=connstr
Specifies a libpq connection string to connect to the source PostgreSQL server to synchronize the target with. The connection must be a normal (non-replication) conne…pg_rewind › Options
pg_rewind --sync-method=method--sync-method=method
When set to fsync, which is the default, pg_rewind will recursively open and synchronize all files in the data directory. The search for files will follow symbolic links…pg_rewind › Options
pg_rewind --target-pgdata=directory-D directory--target-pgdata=directory
This option specifies the target data directory that is synchronized with the source. The target server must be shut down cleanly before running pg_rewi…pg_rewind › Options
pg_rewind --version-V--version
Display version information, then exit.pg_rewind › Options
pg_rewind --write-recovery-conf-R--write-recovery-conf
Create standby.signal and append connection settings to postgresql.auto.conf in the output directory. The dbname will be recorded only if the dbname was specified exp…pg_rewind › Options
More results
Find definitions in the PostgreSQL manuals, reference library, and extension catalogue.
pg17: choose a version ex: extensions only ↑↓ select ↵ open