Re: Skytools committed without hackers discussion/review - Mailing list pgsql-hackers

From Marko Kreen
Subject Re: Skytools committed without hackers discussion/review
Date
Msg-id e51f66da0710110013q2ecdef24mcdf135fd1fde86b1@mail.gmail.com
Whole thread Raw
In response to Re: Skytools committed without hackers discussion/review  ("Marko Kreen" <markokr@gmail.com>)
List pgsql-hackers
On 10/10/07, Marko Kreen <markokr@gmail.com> wrote:
> On 10/10/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > * Why is txid_current_snapshot() excluding subtransaction XIDs?  That
> > might be all right for the current uses in Slony/Skytools, but it seems
> > darn close to a bug for any other use.
>
> In queue usage the transaction that stores snapshots does not do
> any other work on its own, so it does not matter, main requirement
> is that txid_current()/txid_current_snapshot() be symmetric -
> whatever the txid_current() outputs, the txid_current_snapshot() measures.
>
> But I agree, supporting subtransactions makes the API more
> universal.  And it wouldn't break Slony/PgQ current usage.

I thought about it with a clear head, and am now on optinion
that the subtransactions should be left out from current API.

I really fail to imagine a scenario where it would be useful.

The module main use comes from the scenario where txid_current(),
txid_current_snapshot() and reader of them are all different
transactions.  Main guarantee that the APi makes is that as
soon you can see a inserted snapshot in table, you can also
see all inserted events in different table.

There does not seem to be any use of them intra-transaction.

Adding them currently in would be just premature bloat.

We can do it always later, when someone presents a case for
them.  Then we can also decide whether it should be added
to current API or have parallel API besides.  It should not
break Slony/Skytools either way.

-- 
marko


pgsql-hackers by date:

Previous
From: "Marko Kreen"
Date:
Subject: Re: Skytools committed without hackers discussion/review
Next
From: "Heikki Linnakangas"
Date:
Subject: Re: Plan invalidation vs temp sequences