Thread: 9.4 pg_dump use on 9.0 db

9.4 pg_dump use on 9.0 db

From
Ray Stell
Date:
Is it valid to dump a 9.0 db with a 9.4 pg_dump and make use of the
parallel feature? TIA.


Re: 9.4 pg_dump use on 9.0 db

From
Tom Lane
Date:
Ray Stell <stellr@vt.edu> writes:
> Is it valid to dump a 9.0 db with a 9.4 pg_dump and make use of the
> parallel feature? TIA.

Yes, but be aware that 9.4 pg_dump will be generating output meant to
be loaded into a 9.4 server.  You might have to make some adjustments
if you mean to reload it into 9.0.

            regards, tom lane


Re: 9.4 pg_dump use on 9.0 db

From
Stephen Frost
Date:
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Ray Stell <stellr@vt.edu> writes:
> > Is it valid to dump a 9.0 db with a 9.4 pg_dump and make use of the
> > parallel feature? TIA.
>
> Yes, but be aware that 9.4 pg_dump will be generating output meant to
> be loaded into a 9.4 server.  You might have to make some adjustments
> if you mean to reload it into 9.0.

Also be aware that you won't get a synchronized snapshot and therefore
the resulting dump might not be valid..

Looking at pg_dump, for my 2c anyway, it'd be nicer if we threw an error
on parallel dump request when the major version doesn't support
synchronized snapshots, unless the user explicitly passed
--no-synchronized-snapshots, indicating that they don't care.

    Thanks,

        Stephen

Attachment

Re: 9.4 pg_dump use on 9.0 db

From
Stephen Frost
Date:
* Stephen Frost (sfrost@snowman.net) wrote:
> Looking at pg_dump, for my 2c anyway, it'd be nicer if we threw an error
> on parallel dump request when the major version doesn't support
> synchronized snapshots, unless the user explicitly passed
> --no-synchronized-snapshots, indicating that they don't care.

Ah, bah, we do that already.  Good on us.  I was looking at where the
snapshot is actually taken and didn't notice the earlier check.

Nevermind me.

    Thanks,

        Stephen

Attachment

Re: 9.4 pg_dump use on 9.0 db

From
Jerry Sievers
Date:
Stephen Frost <sfrost@snowman.net> writes:

> * Stephen Frost (sfrost@snowman.net) wrote:
>
>> Looking at pg_dump, for my 2c anyway, it'd be nicer if we threw an error
>> on parallel dump request when the major version doesn't support
>> synchronized snapshots, unless the user explicitly passed
>> --no-synchronized-snapshots, indicating that they don't care.
>
> Ah, bah, we do that already.  Good on us.  I was looking at where the
> snapshot is actually taken and didn't notice the earlier check.

The OP didn't mention if the DB is huge and/or inconvenient to quiesce.

But in any case, doing a --jobs N dump from a per-snapshot origin system
requuires the system be quiescent just long enough to get the pg_dump
master process and all workers connected.

I assume this is due to pg_dump running all of its N workers each using
a persistent connection and in a serialized transaction.

Thus --jobs --no-sync-snap is very slick indeedy!!

FYI

>
> Nevermind me.
>
>     Thanks,
>
>         Stephen

--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net
p: 312.241.7800