Re: Do I understand commit timestamps correctly? - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Do I understand commit timestamps correctly?
Date
Msg-id 20200513152840.GA5545@alvherre.pgsql
Whole thread Raw
In response to Re: Do I understand commit timestamps correctly?  (Chapman Flack <chap@anastigmatix.net>)
List pgsql-hackers
On 2020-May-13, Chapman Flack wrote:

> Getting around to trying it out, simply changing the setting in
> postgresql.conf before starting the server does not seem sufficient:
> once it comes online, it has track_commit_timestamp on, but has not
> populated the cache from transactions it applied during recovery.

Ah.  I had not realized that that was what you wanted to do.

> On the other hand, changing the setting in postgresql.conf *and*
> poking a 1 in the track_commit_timestamp byte in pg_control,
> and fudging the CRC accordingly, *then* starting the server, does
> seem to do just as I had hoped. Nothing seems to complain or fall over,
> and the transactions recovered from WAL now have timestamps visible
> with pg_xact_commit_timestamp().

Nice hack.  I guess you'd sooner have a supported way to enable the bit
in pg_control.  Is there a use case for this?

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Add "-Wimplicit-fallthrough" to default flags
Next
From: Tomas Vondra
Date:
Subject: Re: SLRU statistics