Re: --single-transaction hack to pg_upgrade does not work

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: --single-transaction hack to pg_upgrade does not work
Date: 2012-12-01 19:35:57
Message-ID: 20121201193557.GA15334@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2012-12-01 14:31:03 -0500, Tom Lane wrote:
> Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> > On 2012-12-01 12:14:37 -0500, Tom Lane wrote:
> >> It could do with some comments ;-)
>
> > Hehe, yes. Hopefully this version has enough of that.
>
> Hm, maybe too many --- I don't really think it's necessary for utility.c
> to provide a redundant explanation of what's happening.

Yea, was in doubt about that. Added it because it felt a bit strange
to pass down isTopLevel.

> Committed with adjustments --- mainly, the
> TransactionIdIsCurrentTransactionId test was flat out wrong, because it
> would accept a parent transaction ID as well as a subcommitted
> subtransaction ID. We could safely allow the latter, but I don't think
> it's worth the trouble to add another xact.c test function.

Yea, I plainly oversaw that it would be 'dangerous' for a toplevel txn
if a subtransaction aborts. I don't really see a usecase for supporting
subtxns either, so the current GetCurrentTransactionId() seems sensible.

Thanks.

Andres

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2012-12-01 20:24:57 Re: ALTER TABLE ... NOREWRITE option
Previous Message Bruce Momjian 2012-12-01 19:34:46 Re: --single-transaction hack to pg_upgrade does not work