All Questions

Tagged with
Filter by
Sorted by
Tagged with
8
votes
4answers
35k views

Delete all data in Postgres database

I have created a fresh db dump from a production server with the --data-only and --column-inserts flags, so I only have a bunch of insert statements to insert data when performing a restore on a ...
3
votes
0answers
420 views

pg_restore error: Extensions installed out of sequence

I have a PostgreSQL 9.5 server with the pg_cron extension installed. I'm creating a backup of a database named testdb using the command: $ pg_dump -c -U postgres -Fc -f test.dump testdb When I ...
1
vote
1answer
2k views

how can i lock or disable connections to postgres DB while performing maintenance? [duplicate]

I never have this issue with MySQL but PostgreSQL is ALWAYS a pain when trying to do any kind of maintenance. So I am trying to truncate and load new data into databases on PostgreSQL server but ...
0
votes
1answer
129 views

Schema Dump Without User Mapping Passwords

Is it possible to do a pg_dump --schema-only of the database schema but not include any username/password combinations that are in user mappings? For example, I would like items such as the following ...
0
votes
0answers
27 views

DROP DEFAULT on psql restore fails because column not existing anymore

A dump creates a command to remove default values like: ALTER TABLE IF EXISTS test.simulation ALTER COLUMN gid DROP DEFAULT; When on restore the column with the default value do not exist anymore, ...