Re: pgsql: Add psql option: -1 or --single-transaction - Mailing list pgsql-committers

From Simon Riggs
Subject Re: pgsql: Add psql option: -1 or --single-transaction
Date
Msg-id 1139928574.1258.936.camel@localhost.localdomain
Whole thread Raw
In response to Re: pgsql: Add psql option: -1 or --single-transaction  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgsql: Add psql option: -1 or --single-transaction
List pgsql-committers
On Tue, 2006-02-14 at 09:35 -0500, Tom Lane wrote:
> Simon Riggs <simon@2ndquadrant.com> writes:
> > On Tue, 2006-02-14 at 16:55 +0800, Christopher Kings-Lynne wrote:
> >> Huh?  But it'll cause a total failure of dump restore?
>
> > Perhaps you can explain further?
>
> As the code stands, a restore involving blobs plus --single-transaction
> produces
>     BEGIN;
>     ...
>     BEGIN;
>     ...
>     COMMIT;
>     ...
>     COMMIT;
> which does *not* have the intended behavior because BEGIN does not nest.
> This is a must-fix, else we may as well revert the patch entirely,
> because it does not work.

How should it work?

1. Remove the BEGIN and COMMIT around blobs?
2. Use SAVEPOINT ?

Presumably (1).

Best Regards, Simon Riggs


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: Add psql option: -1 or --single-transaction
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Add psql option: -1 or --single-transaction