Re: Transaction IDs not the same in same transaction?
От | Christian Kratzer |
---|---|
Тема | Re: Transaction IDs not the same in same transaction? |
Дата | |
Msg-id | 20051023092357.S6332@vesihiisi.cksoft.de обсуждение исходный текст |
Ответ на | Re: Transaction IDs not the same in same transaction? (Steve V <dndlists@gmail.com>) |
Ответы |
Re: Transaction IDs not the same in same transaction?
|
Список | pgsql-general |
Hi, On Sat, 22 Oct 2005, Steve V wrote: > On 10/22/05, Michael Fuhr <mike@fuhr.org> 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@cksoft.de CK Software GmbH http://www.cksoft.de/ Phone: +49 7452 889 135 Fax: +49 7452 889 136
В списке pgsql-general по дате отправления: