Search Postgresql Archives

Re: Transaction IDs not the same in same transaction?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sat, 22 Oct 2005, Steve V wrote:

On 10/22/05, Michael Fuhr <mike@xxxxxxxx> wrote:
[snipp]
I'm using this for an auditing script, and want to use the txn ID to
indicate an atomic set of changes(the pg txn ID is mapped to my own
txn ID to avoid wraparound issues). I would rather not use xmin, as it
is not available directly in any of the triggers(as far as I know). So
I would have to construct select statements on the fly, and I would
rather not do that. I'm open to suggestions though.

we use a touple of (now(),session_backend_pid()) in our logging triggers
to identify stuff done in the same transaction.

now() will be frozen during the transaction and session_backend_pid() disambuguates this for cases where two transaction could have the
same start time.

Greetings
Christian

--
Christian Kratzer                       ck@xxxxxxxxx
CK Software GmbH                        http://www.cksoft.de/
Phone: +49 7452 889 135                 Fax: +49 7452 889 136

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux