pgsql: Have GetCurrentTransactionStopTimestamp() set xactStopTimestamp

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Have GetCurrentTransactionStopTimestamp() set xactStopTimestamp
Date: 2022-10-14 18:14:41
Message-ID: E1ojPCi-002N3e-Vn@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Have GetCurrentTransactionStopTimestamp() set xactStopTimestamp if unset

Previously GetCurrentTransactionStopTimestamp() computed a new timestamp
whenever xactStopTimestamp was unset and xactStopTimestamp was only set when a
commit or abort record was written.

An upcoming patch will add additional calls to
GetCurrentTransactionStopTimestamp() from pgstats. To avoid computing
timestamps multiple times, set xactStopTimestamp in
GetCurrentTransactionStopTimestamp() if not already set.

Author: Dave Page <dpage(at)pgadmin(dot)org>
Reviewed-by: Andres Freund <andres(at)anarazel(dot)de>
Reviewed-by: Vik Fearing <vik(at)postgresfriends(dot)org>
Discussion: https://postgr.es/m/20220906155325.an3xesq5o3fq36gt%40awork3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/309b2cf2433d1b1454636595600f160b41871ff5

Modified Files
--------------
src/backend/access/transam/xact.c | 42 +++++++++++++++++++--------------------
1 file changed, 21 insertions(+), 21 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2022-10-15 03:22:58 pgsql: Fix some comments in proc.h
Previous Message Alvaro Herrera 2022-10-14 17:08:16 pgsql: libpq: Reset singlerow flag correctly in pipeline mode