Search PostgreSQL documentation
PG 18 · Browse by category, or enter a name or keyword
Category index802
pg_resetwal --force-f--force
Force pg_resetwal to proceed even in situations where it could be dangerous, as explained above. Specifically, this option is required to proceed if the server had not been cleanly…pg_resetwal › Options
pg_resetwal --help-?--help
Show help, then exit.pg_resetwal › Options
pg_resetwal --multixact-ids=mxid,mxid-m mxid,mxid--multixact-ids=mxid,mxid
Manually set the next and oldest multitransaction ID. A safe value for the next multitransaction ID (first part) can be determined by looking for the nu…pg_resetwal › Options
pg_resetwal --multixact-offset=mxoff-O mxoff--multixact-offset=mxoff
Manually set the next multitransaction offset. A safe value can be determined by looking for the numerically largest file name in the directory pg_multixact/…pg_resetwal › Options
pg_resetwal --next-oid=oid-o oid--next-oid=oid
Manually set the next OID. There is no comparably easy way to determine a next OID that's beyond the largest one in the database, but fortunately it is not critical to g…pg_resetwal › Options
pg_resetwal --next-transaction-id=xid-x xid--next-transaction-id=xid
Manually set the next transaction ID. A safe value can be determined by looking for the numerically largest file name in the directory pg_xact under the data …pg_resetwal › Options
pg_resetwal --next-wal-file=walfile-l walfile--next-wal-file=walfile
Manually set the WAL starting location by specifying the name of the next WAL segment file. The name of next WAL segment file should be larger than any WAL …pg_resetwal › Options
pg_resetwal --oldest-transaction-id=xid-u xid--oldest-transaction-id=xid
Manually set the oldest unfrozen transaction ID. A safe value can be determined by looking for the numerically smallest file name in the directory pg_xact u…pg_resetwal › Options
pg_resetwal --pgdata=datadirdatadir-D datadir--pgdata=datadir
Specifies the location of the database directory. For safety reasons, you must specify the data directory on the command line. pg_resetwal does not use the …pg_resetwal › Options
pg_resetwal --version-V--version
Display version information, then exit.pg_resetwal › Options
pg_resetwal --wal-segsize=wal_segment_size--wal-segsize=wal_segment_size
Set the new WAL segment size, in megabytes. The value must be set to a power of 2 between 1 and 1024 (megabytes). See the same option of initdb for more inform…pg_resetwal › Options
pg_restorepg_restore pg_restore — restore a PostgreSQL database from an archive file created by pg_dump
Synopsis pg_restore [connection-option...] [option...] [filename]pg_restore
pg_restore --clean-c--clean
Before restoring database objects, issue commands to DROP all the objects that will be restored. This option is useful for overwriting an existing database. If any of the objects d…pg_restore › Options
pg_restore --create-C--create
Create the database before restoring into it. If --clean is also specified, drop and recreate the target database before connecting to it. With --create, pg_restore also restores …pg_restore › Options
pg_restore --data-only-a--data-only
Restore only the data, not the schema (data definitions) or statistics. Table data, large objects, and sequence values are restored, if present in the archive. This option is s…pg_restore › Options
pg_restore --dbname=dbname-d dbname--dbname=dbname
Connect to database dbname and restore directly into the database. The dbname can be a connection string. If so, connection string parameters will override any confl…pg_restore › Options
pg_restore --disable-triggers--disable-triggers
This option is relevant only when performing a restore without schema. It instructs pg_restore to execute commands to temporarily disable triggers on the target tables whi…pg_restore › Options
pg_restore --enable-row-security--enable-row-security
This option is relevant only when restoring the contents of a table which has row security. By default, pg_restore will set row_security to off, to ensure that all data…pg_restore › Options
pg_restore --exclude-schema=schema-N schema--exclude-schema=schema
Do not restore objects that are in the named schema. Multiple schemas to be excluded may be specified with multiple -N switches. When both -n and -N are give…pg_restore › Options
pg_restore --exit-on-error-e--exit-on-error
Exit if an error is encountered while sending SQL commands to the database. The default is to continue and to display a count of errors at the end of the restoration.pg_restore › Options
pg_restore --file=filename-f filename--file=filename
Specify output file for generated script, or for the listing when used with -l. Use - for stdout.pg_restore › Options
pg_restore --filter=filename--filter=filename
Specify a filename from which to read patterns for objects excluded or included from restore. The patterns are interpreted according to the same rules as -n/--schema for in…pg_restore › Options
pg_restore --format=format-F format--format=format
Specify format of the archive. It is not necessary to specify the format, since pg_restore will determine the format automatically. If specified, it can be one of th…pg_restore › Options
pg_restore --function=function-name(argtype [, ...])-P function-name(argtype [, ...])--function=function-name(argtype [, ...])
Restore the named function only. Be careful to spell the function name and arguments exactly as they appear in the …pg_restore › Options
pg_restore --help-?--help
Show help about pg_restore command line arguments, and exit.pg_restore › Options
pg_restore --host=host-h host--host=host
Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The defaul…pg_restore › Options
pg_restore --if-exists--if-exists
Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses “does not exist” errors that might otherwise be reported. This option is not valid unless --clean…pg_restore › Options
pg_restore --index=index-I index--index=index
Restore definition of named index only. Multiple indexes may be specified with multiple -I switches.pg_restore › Options
pg_restore --jobs=number-of-jobs-j number-of-jobs--jobs=number-of-jobs
Run the most time-consuming steps of pg_restore — those that load data, create indexes, or create constraints — concurrently, using up to number-of-job…pg_restore › Options
pg_restore --list-l--list
List the table of contents of the archive. The output of this operation can be used as input to the -L option. Note that if filtering switches such as -n or -t are used with -l, the…pg_restore › Options
pg_restore --no-acl-x--no-privileges--no-acl
Prevent restoration of access privileges (grant/revoke commands).pg_restore › Options
pg_restore --no-comments--no-comments
Do not output commands to restore comments, even if the archive contains them.pg_restore › Options
pg_restore --no-data--no-data
Do not output commands to restore data, even if the archive contains them.pg_restore › Options
pg_restore --no-data-for-failed-tables--no-data-for-failed-tables
By default, table data is restored even if the creation command for the table failed (e.g., because it already exists). With this option, data for such a table is…pg_restore › Options
pg_restore --no-owner-O--no-owner
Do not output commands to set ownership of objects to match the original database. By default, pg_restore issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set owner…pg_restore › Options
pg_restore --no-password-w--no-password
Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt wi…pg_restore › Options
pg_restore --no-policies--no-policies
Do not output commands to restore row security policies, even if the archive contains them.pg_restore › Options
pg_restore --no-publications--no-publications
Do not output commands to restore publications, even if the archive contains them.pg_restore › Options
pg_restore --no-reconnect-R--no-reconnect
This option is obsolete but still accepted for backwards compatibility.pg_restore › Options
pg_restore --no-schema--no-schema
Do not output commands to restore schema (data definitions), even if the archive contains them.pg_restore › Options
More results
Find definitions in the PostgreSQL manuals, reference library, and extension catalogue.
pg17: choose a version ex: extensions only ↑↓ select ↵ open