Tracking cluster upgrade and configuration history

From: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Tracking cluster upgrade and configuration history
Date: 2020-11-11 22:31:32
Message-ID: 4D7D5D16-CCC5-4821-B140-72E870326BEC@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello Hackers,

While supporting customers, it would frequently be useful to have more information about the history of a cluster. For example, which prior versions were ever installed and running on the cluster? Has the cluster ever been run with fsync=off? When did the server last enter recovery, if ever? Was a backup_label file present at that time?

Some of this type of information could strictly be fixed size, such as a fixed set of timestamps for the time at which a fixed set of things last occurred, or a fixed set of bits indicating whether a fixed set of things ever happened.

Some other types would be variable size, but hopefully short in practice, like a list of all postgres versions that have ever been run on the cluster.

Logging the information via the usual log mechanism seems insufficient, as log files may get rotated and this information lost.

Would it be acceptable to store some fixed set of flag bits and timestamps in pg_control? Space there is at a premium.

Would it make sense to alternately, or additionally, store some of this information in a flat text file in pg_data, say a new file named "cluster_history" or such?

I'm happy to put together a more concrete proposal, but solicit your opinions first on the merits of the idea generally, and if you think the idea good, on the specifics you'd like to see included.

Thanks!


Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2020-11-11 22:46:30 Re: PATCH: Batch/pipelining support for libpq
Previous Message Andres Freund 2020-11-11 22:18:04 Re: In-placre persistance change of a relation