Transaction IDs not the same in same transaction?

Поиск
Список
Период
Сортировка
От Steve V
Тема Transaction IDs not the same in same transaction?
Дата
Msg-id 58cabeec0510221330s92ad9e1gad7368e3c463b954@mail.gmail.com
обсуждение исходный текст
Ответы Re: Transaction IDs not the same in same transaction?  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
So I was finally able to get a compiled binary for the code in this
thread(thanks Magnus):
http://archives.postgresql.org/pgsql-general/2005-06/msg00709.php

So everything seemed to be fine with my GetCurrentTransactionID()
function call returning the txn ID for each query I would run(as far
as I could tell). Then I tried running a txn with multiple queries,
and instead of just having one txn ID, each query had it's own. Does
that make any sense? I was under the impression that a regular
transaction block would have one txn ID assigned to it for its
duration.

Here's the query I ran:

BEGIN;
UPDATE partners SET
       partner_name = 'partner #5',
       activity_status_id = 1
WHERE partner_id = 5;

UPDATE partners SET
       partner_name = 'partner #7'
WHERE partner_id = 3;

COMMIT;

Should that have had the same txn ID for both of those? The
GetCurrentTransactionID call occurs in a trigger, would that have an
impact on the ID?

Thanks,
Steve

В списке pgsql-general по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: out of memory for query result
Следующее
От: Zlatko Matić
Дата:
Сообщение: pg_autovacuum (8.0.4) as Windows service ?