Re: why does txid_current() assign new transaction-id? - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: why does txid_current() assign new transaction-id?
Date
Msg-id CAB7nPqSOx2TEgsypk8gbfa=_hJn7WNLf_tRZexY+SnN3fVF_nA@mail.gmail.com
Whole thread Raw
In response to Re: why does txid_current() assign new transaction-id?  (Naoya Anzai <nao-anzai@xc.jp.nec.com>)
Responses Re: why does txid_current() assign new transaction-id?
List pgsql-hackers
On Wed, May 27, 2015 at 5:13 PM, Naoya Anzai <nao-anzai@xc.jp.nec.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

pgsql-hackers by date:

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