pgsql: Reset pg_stat_activity.xact_start during PREPARE TRANSACTION.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Reset pg_stat_activity.xact_start during PREPARE TRANSACTION.
Дата
Msg-id E1WdNTw-0004eH-Kp@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Reset pg_stat_activity.xact_start during PREPARE TRANSACTION.

Once we've completed a PREPARE, our session is not running a transaction,
so its entry in pg_stat_activity should show xact_start as null, rather
than leaving the value as the start time of the now-prepared transaction.

I think possibly this oversight was triggered by faulty extrapolation
from the adjacent comment that says PrepareTransaction should not call
AtEOXact_PgStat, so tweak the wording of that comment.

Noted by Andres Freund while considering bug #10123 from Maxim Boguk,
although this error doesn't seem to explain that report.

Back-patch to all active branches.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/d19bd29f07aef9e508ff047d128a4046cc8bc1e2

Modified Files
--------------
src/backend/access/transam/xact.c |    3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Reset pg_stat_activity.xact_start during PREPARE TRANSACTION.
Следующее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Fix race when updating a tuple concurrently locked by another pr