Re: Skytools committed without hackers discussion/review

From: "Marko Kreen" <markokr(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Magnus Hagander" <magnus(at)hagander(dot)net>, "Jan Wieck" <JanWieck(at)yahoo(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Skytools committed without hackers discussion/review
Date: 2007-10-11 07:13:25
Message-ID: e51f66da0710110013q2ecdef24mcdf135fd1fde86b1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 10/10/07, Marko Kreen <markokr(at)gmail(dot)com> wrote:
> On 10/10/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message User Mkz 2007-10-11 10:24:40 plproxy - plproxy: libpq does not accept client_encoding
Previous Message Marko Kreen 2007-10-11 06:50:05 Re: Skytools committed without hackers discussion/review

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2007-10-11 07:44:28 Re: Plan invalidation vs temp sequences
Previous Message Marko Kreen 2007-10-11 06:50:05 Re: Skytools committed without hackers discussion/review