How pg_dump works

Started by Moreno Andreoover 9 years ago5 messagesgeneral
Jump to latest
#1Moreno Andreo
moreno.andreo@evolu-s.it

Hi all,
I need to pg_dump a database to another server.
The particularity is that the database is bigger than remaining space on
disk. Obviously, this is not a problem because i'm dumping to another
host, but I need to know if the procedure streams data to remote host or
the data itself is packed up in temporary file(s) that are sent to
remote host.
The former would be such a problem, because there are good chances I'll
have my disk filled up...

I've not found details on this in documentation.

Thanks
Moreno.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#2Achilleas Mantzios
achill@matrix.gatewaynet.com
In reply to: Moreno Andreo (#1)
Re: How pg_dump works

On 10/10/2016 14:50, Moreno Andreo wrote:

Hi all,
I need to pg_dump a database to another server.
The particularity is that the database is bigger than remaining space on disk. Obviously, this is not a problem because i'm dumping to another host, but I need to know if the procedure streams data
to remote host or the data itself is packed up in temporary file(s) that are sent to remote host.
The former would be such a problem, because there are good chances I'll have my disk filled up...

I've not found details on this in documentation.

In fact, in the docs there is all the info you might ever need. PostgreSQL project excels on that compared to *many* free-software projects. Now what you could do is something like :
createdb -h your_big_server your_database
pg_dump -h your_small_server your_database | psql -h your_big_server -f - your_database

Thanks
Moreno.

--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Noname
hamann.w@t-online.de
In reply to: Moreno Andreo (#1)
Re: How pg_dump works

Hi all,
I need to pg_dump a database to another server.
The particularity is that the database is bigger than remaining space on
disk. Obviously, this is not a problem because i'm dumping to another
host, but I need to know if the procedure streams data to remote host or
the data itself is packed up in temporary file(s) that are sent to
remote host.
The former would be such a problem, because there are good chances I'll
have my disk filled up...

I've not found details on this in documentation.

Thanks
Moreno.

Hi Moreno,

it is one big stream.
I am sending compressed pg_dump and can actually use
zcat dumpfile.gz | psql mydatabase
on the other end

Regards
Wolfgang

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#4Moreno Andreo
moreno.andreo@evolu-s.it
In reply to: Achilleas Mantzios (#2)
Re: How pg_dump works

Il 10/10/2016 14:16, Achilleas Mantzios ha scritto:

On 10/10/2016 14:50, Moreno Andreo wrote:

Hi all,
I need to pg_dump a database to another server.
The particularity is that the database is bigger than remaining space
on disk. Obviously, this is not a problem because i'm dumping to
another host, but I need to know if the procedure streams data to
remote host or the data itself is packed up in temporary file(s) that
are sent to remote host.
The former would be such a problem, because there are good chances
I'll have my disk filled up...

I've not found details on this in documentation.

In fact, in the docs there is all the info you might ever need.
PostgreSQL project excels on that compared to *many* free-software
projects. Now what you could do is something like :
createdb -h your_big_server your_database
pg_dump -h your_small_server your_database | psql -h your_big_server
-f - your_database

Thanks, I was aware of this usage. I just wanted to be sure no
additional disk space has to be used in "small_server".

Thanks
Moreno.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#5Moreno Andreo
moreno.andreo@evolu-s.it
In reply to: Noname (#3)
Re: How pg_dump works

Il 10/10/2016 14:16, hamann.w@t-online.de ha scritto:

Hi all,
I need to pg_dump a database to another server.
The particularity is that the database is bigger than remaining space on
disk. Obviously, this is not a problem because i'm dumping to another
host, but I need to know if the procedure streams data to remote host or
the data itself is packed up in temporary file(s) that are sent to
remote host.
The former would be such a problem, because there are good chances I'll
have my disk filled up...

I've not found details on this in documentation.

Thanks
Moreno.

Hi Moreno,

it is one big stream.

OK, that's good news :-)

Thanks
Moreno.

I am sending compressed pg_dump and can actually use
zcat dumpfile.gz | psql mydatabase
on the other end

Regards
Wolfgang

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general