Postgres version 11.
I've read this: https://www.postgresql.org/docs/11/app-pgbasebackup.html
But can't really find what I'm looking for.
Performing a basebackup creates 2 files for me: base.tar.gz and pg_wal.tar.gz
base.tar.gz contains a file backup_label
Which contains something like:
START WAL LOCATION: 5CD/87000850 (file 00000001000005CD00000087)
CHECKPOINT LOCATION: 5CD/882A2558
BACKUP METHOD: streamed
BACKUP FROM: master
START TIME:
LABEL: pg_basebackup base backup
START TIMELINE: 1
And pg_wal.tar.gz contains this:
00000001000005CD00000087
00000001000005CD00000088
00000001000005CD00000089
00000001000005CD0000008A
00000001000005CD0000008B
...
00000001000005CD000000AF
So, incremental files.
backup_label
has a field START WAL LOCATION
which literally points to 00000001000005CD00000087
, the first file in the pg_wal.tar.gz
archive.
Then it has CHECKPOINT LOCATION: 5CD/882A2558
.
What is this "CHECKPOINT LOCATION"? I don't see anything to correlate 882A2558
to. Or is that not intended?
Am I to interpret that as "The wal archives created while pg_basebackup was running are in pg_wal.tar.gz and they start at 5CD/87000850 and stop at 5CD/882A2558" ?
I'm just wondering: does pg_wal.tar.gz contain all the wal archives I need to do a successful restore? And if not, is there some other file that will provide me this info?
And if this is clearly written in the documentation, well I just read the entire page and didn't recognize anything in there as the answer to my question? Did I miss it?
EDIT: Well, that cleared some things up, I think I got the answer(s) I was looking for and then some more.
Thanks for all who replied.
dwhitemv
explained there it in fact a difference. I have in the past tried a manual restore by unpacking the base tar, but then needed wal archives and I've been trying to figure out reliably which ones. Apparently the pg_wal is useful for point in time, though a streaming solution to all new WAL archives seems to be useful too