Re: why does txid_current() assign new transaction-id?

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Naoya Anzai <nao-anzai(at)xc(dot)jp(dot)nec(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Christoph Berg <myon(at)debian(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Akio Iwaasa <aki-iwaasa(at)vt(dot)jp(dot)nec(dot)com>
Subject: Re: why does txid_current() assign new transaction-id?
Date: 2015-05-28 04:36:43
Message-ID: CAB7nPqSOx2TEgsypk8gbfa=_hJn7WNLf_tRZexY+SnN3fVF_nA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 27, 2015 at 5:13 PM, Naoya Anzai <nao-anzai(at)xc(dot)jp(dot)nec(dot)com> wrote:
>> Perhaps we could make the documentation
>> clearer about those things though, changing the description of this
>> function to "get current transaction ID, and assign a new one if one
>> is not assigned yet":
>> http://www.postgresql.org/docs/devel/static/functions-info.html
> +1
>
> I think that a description of txid_current is too rough and it might
> be confused some users.
> txid_current is a different operation depending on session situations,
> I feel if detail of txid_current is documented then it will be better.
>
> For example...
> Inside of the transaction-block(begin..end), returns a transaction-id used by this block.
> Outside of the transaction-block, returns a next transaction-id(but it is consumed by this function).

Attached is a doc patch among those lines.
--
Michael

Attachment Content-Type Size
20150528_txid_current_docs.patch text/x-patch 629 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shigeru Hanada 2015-05-28 05:20:28 Re: postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)
Previous Message Abhijit Menon-Sen 2015-05-28 03:57:59 Re: fsync-pgdata-on-recovery tries to write to more files than previously