RE: Enhance traceability of wal_level changes for backup management - Mailing list pgsql-hackers

From tsunakawa.takay@fujitsu.com
Subject RE: Enhance traceability of wal_level changes for backup management
Date
Msg-id TYAPR01MB299028CF4208841337C043B4FEAF0@TYAPR01MB2990.jpnprd01.prod.outlook.com
Whole thread Raw
In response to RE: Enhance traceability of wal_level changes for backup management  ("osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>)
List pgsql-hackers
From: osumi.takamichi@fujitsu.com <osumi.takamichi@fujitsu.com>
> I wondered, couldn't backup management tools utilize the information
> in the backup that is needed to be made when wal_level is changed to "none"
> for example ?

IIRC, someone proposed in the original thread that the change count can be recorded in pg_control.  The change count is
incrementedwhen wal_level is changed from replica or higher to minimal or lower.  Maybe you can do it easily in
XLogReportParameters().

Then, the backup management tool compares the change counts of pg_control in a backup and that of the current
pg_control. If the change count is different, the tool assumes that the backup cannot be used to recover the database
upto date. 

Ideally, it'd be desirable for PostgreSQL core to have a backup catalog management capability like Oracle RMAN.  Then,
whenthe wal_level is changed, Postgres may be able to invalidate all backups in the backup catalog. 


> As I said before, existing backup management tools support
> only wal_level=replica or logical at present. And, if they would wish to alter the
> status quo and want to cover the changes over wal_levels, I felt it's natural that
> they support feature like taking a full backup, trigged by the wal_level changes
> (or server stop).

In that regard, a feature like Oracle Server Alert would be useful.  When important events occur, the database server
recordsthem in the alert queue.  Administration tools read from the alert queue and act accordingly.  wal_level change
canbe recorded in the alert queue, and the backup management tool polls the queue and detect the change. 


Regards
Takayuki Tsunakawa





pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Terminate the idle sessions
Next
From: Peter Geoghegan
Date:
Subject: Re: vacuum_cost_page_miss default value and modern hardware