Re: RFC: pg_stat_logmsg - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: RFC: pg_stat_logmsg
Date
Msg-id ZpiZdR4m2KVi4RsC@paquier.xyz
Whole thread Raw
In response to Re: RFC: pg_stat_logmsg  (Joe Conway <mail@joeconway.com>)
List pgsql-hackers
On Wed, Jul 17, 2024 at 07:48:15AM -0400, Joe Conway wrote:
> I think including version in the key makes most sense. Also do we even have
> a mechanism to grab the commit sha in running code?

Not directly, still that's doable.

The closest thing I would consider here is to get the output of
something like 'git rev-parse --short HEAD` and attach it to
PG_VERSION with --with-extra-version.  I do that in my local builds
because I always want to know from which commit I am building
something.  Then, PG_VERSION could be stored with the entries while
hashing the stats key with the version string, the error code, the
source file name and/or the line number for uniqueness.  32 bytes of
room would be most likely enough when it comes to the PG_VERSION data
stored in the stats entries.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: improve performance of pg_dump with many sequences
Next
From: shveta malik
Date:
Subject: Re: Allow logical failover slots to wait on synchronous replication