pg-dump Questions

3

Is there a way to perform a pg_dump and exclude the COMMENT ON for tables/views and columns ? I use extensively the COMMENT ON command to describe all objects, and often include newlines in them f...
Liscomb asked 10/6, 2013 at 15:36

1

Solved

I cannot find anywhere any info on how exactly should I bulk my inserts into batches of 100-inserts-per-transaction while producing a database dump via pg_dump utility. How exactly do I need to per...
Polysepalous asked 10/3, 2020 at 12:17

2

Solved

When I run the command psql --version within the railsApp container, I get 9.4.12 and when I run the same within the postgres container, I get 9.6.2. How can I get the versions to match? I am gett...
Stale asked 26/6, 2017 at 21:22

2

Solved

I want to exclude a sequence from my pg_dump command which is putting the output into a plain file. Command: /Library/PostgreSQL/8.4/bin/pg_dump --host localhost --port 5433 --username xxx --form...
Assured asked 26/11, 2013 at 12:8

1

Solved

After migrating my development database, I'm unable to run rails db:test:prepare. My application uses the db/structure.sql file to update the test database: # config/application.rb config.active...
Freeboard asked 7/6, 2019 at 18:45

1

So I made a backup of a table using pg_dump: pg_dump -U bob -F c -d commerce -t orders > orders.dump This table had several listed indexes such as a primary key However when I restore this t...

5

Solved

I'm trying to pg_dump a SQL database on a remote server in our DMZ. There are 2 problems. there is not a lot of space left on the remote server so the normal command run to locally backup the data...
Butterflies asked 15/4, 2015 at 10:52

4

Solved

How do I take a schema level backup in PostgreSQL database and restore on the another database? Is there any single command available for this? For example, can I pg_dump and restore in single line...
Therapy asked 24/9, 2012 at 12:7

1

I need compare 2 DBs schemes (DDLs) - Postgress 9.5 Im executing below command on both servers: pg_dump -U postgres --dbname=db--schema-only -f schema.sql But I noticed one of output prefixes ...
Atombomb asked 28/9, 2019 at 13:27

5

I used this command to backup 200GB database (postgres 9.1, win7 x64): pg_dump -Z 1 db_name > backup It created 16GB file, which is fine I think because previous backups which works (and were pac...
Legumin asked 7/10, 2012 at 11:17

3

Solved

I need to dump a postgres database from computer1 with postgres username1 and then restore it on computer2 with postgres username2. I keep running into the error that looks like the backup file wan...
Nether asked 29/9, 2018 at 19:5

1

Solved

I created a pg_dump with the following command - pg_dump -U postgres -d db -n public \ --exclude-table-data 'exclude_table_*' \ --exclude-table-data 'another_set_of_tables_to_exclude*' > dum...
Celsacelsius asked 20/8, 2019 at 21:25

1

Solved

I am trying to dump only data from a PostgreSQL database using pg_dump and then to restore those data into another one. But generating sql script with this tool also add some comments and settings ...
Noletta asked 20/6, 2019 at 8:31

2

Solved

I am reading the doc of PG Admin 4 about backup dialog box which uses the pg_dump utility. In the dump options tab, there is a sub-menu Section with three switches. One of the switch is named "pr...
Margarita asked 11/10, 2017 at 16:7

2

Currently I'm doing something like: pg_dump -a -O -t my_table my_db > my_data_to_import.sql What I really want is to be able to import/export just the data without causing conflicts with my a...
Raynaraynah asked 3/6, 2011 at 14:48

1

I have currently a task to improve a database-structure. For this we want to effectively dump and restore one single giant database. (approx. 1TB and growing) To test things with this database, we...
Pinup asked 14/3, 2019 at 13:48

5

Solved

I am creating to pg_dumps, DUMP1 and DUMP2. DUMP1 and DUMP2 are exactly the same, except DUMP2 was dumped in REVERSE order of DUMP1. Is there anyway that I can sort the two DUMPS so that the two ...
Levona asked 5/2, 2010 at 2:10

1

Solved

I am trying to dump my database. For reasons I can't go into detail here, I am unable to use the "Copy" function. This means that the insert statements have to be "pure" insert. However, I am not...
Fungoid asked 13/2, 2019 at 9:42

1

Hi I am using Postgres 11 and pgadmin 4.1. I have a SQL file i am trying to import in my newly created database in pgadmin 4. I know its a generalized error but I tried my best to resolve it, but...
Emaemaciate asked 1/2, 2019 at 6:17

1

Solved

When I use pg_dump to export schema from a database, it adds the following line at the beginning: SELECT pg_catalog.set_config('search_path', '', false); Is it possible set an option where pg_du...
Bocanegra asked 7/11, 2018 at 12:34

1

Solved

When trying to make a postgreSQL database dump we got the following error and the process stops immediately. Command used: [email protected]:~ 07/26 11:48:11> pg_dump -U tad -h localhost...
Urial asked 17/8, 2018 at 16:56

1

Solved

I have a script where pg_dump is failing with a message like this: pg_dump -h db1 --format plain --encoding UTF8 --schema=public --schema-only --no-owner me pg_dump: [archiver (db)] query failed: ...
Electronegative asked 27/8, 2018 at 1:33

1

Say I have db0 on the local machine and db1 on a remote server. I just want to keep db1 up-to-date with db0. Say I added few (thousands) rows to my_table in db0 and now I want to insert it to my_t...
Abducent asked 19/6, 2018 at 19:3

3

Could someone explain to me why a PostgreSQL table created with the following scripts: CREATE TABLE users ( "id" serial NOT NULL, "name" character varying(150) NOT NULL, "surname" character var...
Gourmand asked 9/10, 2015 at 12:44

1

Solved

Is it possible to query how many multiversioned rows are there in a db ? We want to measure the impact of pg_dump on a production database, and to suspend it in case of need: is it creating too ma...
Cyclonite asked 2/5, 2018 at 0:1

© 2022 - 2024 — McMap. All rights reserved.