On Sun, Mar 29, 2020 at 10:08 PM Andres Freund <and...@anarazel.de> wrote: > See the attached minimal prototype for what I am thinking of. > > This would not correctly handle the case where the timeline changes > while taking a base backup. But I'm not sure that'd be all that serious > a limitation for now? > > I'd personally not want to use a base backup that included a timeline > switch...
Interesting concept. I've never (or almost never) used the -s and -e options to pg_waldump, so I didn't think about using those. I think having a --just-parse option to pg_waldump is a good idea, though maybe not with that name e.g. we could call it --quiet. It is less obvious to me what to do about all that as it pertains to the current patch. If we want pg_validatebackup to run pg_waldump in that mode or print out a hint about how to run pg_waldump in that mode, it would need to obtain the relevant LSNs. I guess that would require reading the backup_label file. It's not clear to me what we would do if the backup crosses a timeline switch, assuming that's even a case pg_basebackup allows. If we don't want to do anything in pg_validatebackup automatically but just want to document this as a a possible technique, we could finesse that problem with some weasel-wording. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company