pg_dumpall custom format?

Started by Thom Brownabout 17 years ago13 messagesgeneral
Jump to latest
#1Thom Brown
thombrown@gmail.com

Hi,

I noticed that while pg_dump can output a custom format, effectively
compressing the output, pg_dumpall doesn't. Is there a reason for this?
And is there a way to get pg_dumpall to compress it's output?

Thanks

Thom

#2Marc Mamin
M.Mamin@intershop.de
In reply to: Thom Brown (#1)
Re: pg_dumpall custom format?

Hello,

you can first pipe the output of pg_dump to a compression tool:

pg_dump..... | gzip > file.

instead of gzip, I'm using pigz which is faster thanks multithreading.

HTH,

Marc Mamin

________________________________

From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Thom Brown
Sent: Thursday, March 05, 2009 11:53 AM
To: pgsql general
Subject: [GENERAL] pg_dumpall custom format?

Hi,

I noticed that while pg_dump can output a custom format, effectively
compressing the output, pg_dumpall doesn't. Is there a reason for this?
And is there a way to get pg_dumpall to compress it's output?

Thanks

Thom

#3Thom Brown
thombrown@gmail.com
In reply to: Marc Mamin (#2)
Re: pg_dumpall custom format?

Thanks for the suggestion Marc. It would still be nice to have the custom
format included as an option though with pg_restore supporting it, just for
consistency.

I will, however, follow your recommendation.

Thom

2009/3/5 Marc Mamin <M.Mamin@intershop.de>

Show quoted text

Hello,

you can first pipe the output of pg_dump to a compression tool:

pg_dump..... | gzip > file.

instead of gzip, I'm using pigz which is faster thanks multithreading.

HTH,

Marc Mamin

------------------------------
*From:* pgsql-general-owner@postgresql.org [mailto:
pgsql-general-owner@postgresql.org] *On Behalf Of *Thom Brown
*Sent:* Thursday, March 05, 2009 11:53 AM
*To:* pgsql general
*Subject:* [GENERAL] pg_dumpall custom format?

Hi,

I noticed that while pg_dump can output a custom format, effectively
compressing the output, pg_dumpall doesn't. Is there a reason for this?
And is there a way to get pg_dumpall to compress it's output?

Thanks

Thom

#4Ashish Karalkar
ashishka@synechron.com
In reply to: Thom Brown (#1)
PostgreSQL template for cacti

Hello list,

I was wondering is there any postgresql template for cacti to monitor
PostgreSQL server.

can anybody plz point me to the same?

Thanks in advance

--Ashish

#5Ashish Karalkar
ashishka@synechron.com
In reply to: Ashish Karalkar (#4)
Re: PostgreSQL template for cacti

Ashish Karalkar wrote:

Hello list,

I was wondering is there any postgresql template for cacti to monitor
PostgreSQL server.

can anybody plz point me to the same?

Thanks in advance

--Ashish

That worked from google,
sorry for making noise...

http://forums.cacti.net/about23300.html

--Ashish

#6Thom Brown
thombrown@gmail.com
In reply to: Thom Brown (#3)
Re: pg_dumpall custom format?

On 5 March 2009 12:08, Thom Brown <thombrown@gmail.com> wrote:

Thanks for the suggestion Marc. It would still be nice to have the custom
format included as an option though with pg_restore supporting it, just for
consistency.

I will, however, follow your recommendation.

Thom

2009/3/5 Marc Mamin <M.Mamin@intershop.de>

Hello,

you can first pipe the output of pg_dump to a compression tool:

pg_dump..... | gzip > file.

instead of gzip, I'm using pigz which is faster thanks multithreading.

HTH,

Marc Mamin

------------------------------
*From:* pgsql-general-owner@postgresql.org [mailto:
pgsql-general-owner@postgresql.org] *On Behalf Of *Thom Brown
*Sent:* Thursday, March 05, 2009 11:53 AM
*To:* pgsql general
*Subject:* [GENERAL] pg_dumpall custom format?

Hi,

I noticed that while pg_dump can output a custom format, effectively
compressing the output, pg_dumpall doesn't. Is there a reason for this?
And is there a way to get pg_dumpall to compress it's output?

Thanks

Thom

I'm bringing this thread back to life to see if there are any further
thoughts on this. It would be nice to have a complete backup of a database
cluster in custom format, and use pg_restore to restore an individual
database in the same way that it can restore individual schemas and tables
etc.

Thanks

Thom

#7Guillaume Lelarge
guillaume@lelarge.info
In reply to: Thom Brown (#6)
Re: pg_dumpall custom format?

Le 13/05/2010 14:12, Thom Brown a �crit :

On 5 March 2009 12:08, Thom Brown <thombrown@gmail.com> wrote:

[...]

I'm bringing this thread back to life to see if there are any further
thoughts on this. It would be nice to have a complete backup of a database
cluster in custom format, and use pg_restore to restore an individual
database in the same way that it can restore individual schemas and tables
etc.

Nope. But this is something I'd like to have too. I didn't actually look
into it much more (I mean, in the code), but I intend to work on this
for 9.1 (and other pg_dump stuff).

--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com

#8Thom Brown
thombrown@gmail.com
In reply to: Guillaume Lelarge (#7)
Re: pg_dumpall custom format?

On 13 May 2010 17:49, Guillaume Lelarge <guillaume@lelarge.info> wrote:

Le 13/05/2010 14:12, Thom Brown a écrit :

On 5 March 2009 12:08, Thom Brown <thombrown@gmail.com> wrote:

[...]

I'm bringing this thread back to life to see if there are any further
thoughts on this. It would be nice to have a complete backup of a

database

cluster in custom format, and use pg_restore to restore an individual
database in the same way that it can restore individual schemas and

tables

etc.

Nope. But this is something I'd like to have too. I didn't actually look
into it much more (I mean, in the code), but I intend to work on this
for 9.1 (and other pg_dump stuff).

You're now my favourite PostgreSQL developer! Thanks Guillaume!

Thom

#9Guillaume Lelarge
guillaume@lelarge.info
In reply to: Thom Brown (#8)
Re: pg_dumpall custom format?

Le 13/05/2010 19:24, Thom Brown a �crit :

On 13 May 2010 17:49, Guillaume Lelarge <guillaume@lelarge.info> wrote:

Le 13/05/2010 14:12, Thom Brown a �crit :

On 5 March 2009 12:08, Thom Brown <thombrown@gmail.com> wrote:

[...]

I'm bringing this thread back to life to see if there are any further
thoughts on this. It would be nice to have a complete backup of a

database

cluster in custom format, and use pg_restore to restore an individual
database in the same way that it can restore individual schemas and

tables

etc.

Nope. But this is something I'd like to have too. I didn't actually look
into it much more (I mean, in the code), but I intend to work on this
for 9.1 (and other pg_dump stuff).

You're now my favourite PostgreSQL developer! Thanks Guillaume!

Don't get your expectations too high. I just said I'll try :)

--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com

#10Thom Brown
thombrown@gmail.com
In reply to: Guillaume Lelarge (#9)
Re: pg_dumpall custom format?

On 13 May 2010 18:28, Guillaume Lelarge <guillaume@lelarge.info> wrote:

Le 13/05/2010 19:24, Thom Brown a écrit :

On 13 May 2010 17:49, Guillaume Lelarge <guillaume@lelarge.info> wrote:

Le 13/05/2010 14:12, Thom Brown a écrit :

On 5 March 2009 12:08, Thom Brown <thombrown@gmail.com> wrote:

[...]

I'm bringing this thread back to life to see if there are any further
thoughts on this. It would be nice to have a complete backup of a

database

cluster in custom format, and use pg_restore to restore an individual
database in the same way that it can restore individual schemas and

tables

etc.

Nope. But this is something I'd like to have too. I didn't actually look
into it much more (I mean, in the code), but I intend to work on this
for 9.1 (and other pg_dump stuff).

You're now my favourite PostgreSQL developer! Thanks Guillaume!

Don't get your expectations too high. I just said I'll try :)

I guess this will also require changes to pg_restore to support:

-g globals only
-r roles only
-t tablespaces (conflicts with pg_restore's table specification of -t)

And of course being able to restore individual databases and specifying
restoration of a table/function/trigger within specific databases. I guess
that could be done by specifying a database to restore, then asking for a
single function.

e.g.:

pg_restore --database=my_source_database -P my_function(argtype) -d
my_destination_database /database/backup/file

And adding database entry support to the listing file.

Thom

#11Guillaume Lelarge
guillaume@lelarge.info
In reply to: Thom Brown (#10)
Re: pg_dumpall custom format?

Le 17/05/2010 14:28, Thom Brown a �crit :

On 13 May 2010 18:28, Guillaume Lelarge <guillaume@lelarge.info> wrote:

Le 13/05/2010 19:24, Thom Brown a �crit :

On 13 May 2010 17:49, Guillaume Lelarge <guillaume@lelarge.info> wrote:

Le 13/05/2010 14:12, Thom Brown a �crit :

On 5 March 2009 12:08, Thom Brown <thombrown@gmail.com> wrote:

[...]

I'm bringing this thread back to life to see if there are any further
thoughts on this. It would be nice to have a complete backup of a

database

cluster in custom format, and use pg_restore to restore an individual
database in the same way that it can restore individual schemas and

tables

etc.

Nope. But this is something I'd like to have too. I didn't actually look
into it much more (I mean, in the code), but I intend to work on this
for 9.1 (and other pg_dump stuff).

You're now my favourite PostgreSQL developer! Thanks Guillaume!

Don't get your expectations too high. I just said I'll try :)

I guess this will also require changes to pg_restore to support:

-g globals only
-r roles only
-t tablespaces (conflicts with pg_restore's table specification of -t)

Yes.

And of course being able to restore individual databases and specifying
restoration of a table/function/trigger within specific databases. I guess
that could be done by specifying a database to restore, then asking for a
single function.

e.g.:

pg_restore --database=my_source_database -P my_function(argtype) -d
my_destination_database /database/backup/file

Yes.

And adding database entry support to the listing file.

And adding a role and a tablespace entries. And prefixing every object
with the database they belong too.

It won't be easy, but it's really something lacking right now. Or at
least, I think so :)

--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com

#12Thom Brown
thombrown@gmail.com
In reply to: Guillaume Lelarge (#9)
Re: pg_dumpall custom format?

On 13 May 2010 18:28, Guillaume Lelarge <guillaume@lelarge.info> wrote:

Le 13/05/2010 19:24, Thom Brown a écrit :

On 13 May 2010 17:49, Guillaume Lelarge <guillaume@lelarge.info> wrote:

Le 13/05/2010 14:12, Thom Brown a écrit :

On 5 March 2009 12:08, Thom Brown <thombrown@gmail.com> wrote:

[...]

I'm bringing this thread back to life to see if there are any further
thoughts on this.  It would be nice to have a complete backup of a

database

cluster in custom format, and use pg_restore to restore an individual
database in the same way that it can restore individual schemas and

tables

etc.

Nope. But this is something I'd like to have too. I didn't actually look
into it much more (I mean, in the code), but I intend to work on this
for 9.1 (and other pg_dump stuff).

You're now my favourite PostgreSQL developer!  Thanks Guillaume!

Don't get your expectations too high. I just said I'll try :)

Have you had any opportunity to look at this yet? :)

Thanks

Thom

#13Guillaume Lelarge
guillaume@lelarge.info
In reply to: Thom Brown (#12)
Re: pg_dumpall custom format?

On Wed, 2011-06-22 at 16:17 +0100, Thom Brown wrote:

On 13 May 2010 18:28, Guillaume Lelarge <guillaume@lelarge.info> wrote:

Le 13/05/2010 19:24, Thom Brown a écrit :

On 13 May 2010 17:49, Guillaume Lelarge <guillaume@lelarge.info> wrote:

Le 13/05/2010 14:12, Thom Brown a écrit :

On 5 March 2009 12:08, Thom Brown <thombrown@gmail.com> wrote:

[...]

I'm bringing this thread back to life to see if there are any further
thoughts on this. It would be nice to have a complete backup of a

database

cluster in custom format, and use pg_restore to restore an individual
database in the same way that it can restore individual schemas and

tables

etc.

Nope. But this is something I'd like to have too. I didn't actually look
into it much more (I mean, in the code), but I intend to work on this
for 9.1 (and other pg_dump stuff).

You're now my favourite PostgreSQL developer! Thanks Guillaume!

Don't get your expectations too high. I just said I'll try :)

Have you had any opportunity to look at this yet? :)

Nope, still in my TODO list.

--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com