On 10/10/07, Marko Kreen <[EMAIL PROTECTED]> wrote:
> On 10/10/07, Tom Lane <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to