From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
---|---|
To: | MaXinjian <machine_ok(at)163(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: "missing chunk number 0 for toast value xxx in pg_toast_xxx" when pg_basebackup |
Date: | 2021-04-13 14:52:06 |
Message-ID: | 61b4ae27860092f78bde74c38db524f51cbcf527.camel@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 2021-04-13 at 06:36 -0700, MaXinjian wrote:
> > Why do you write the WAL to /tmp/pg_wal, only to later mount that at the
> > default location?
>
> pg_wal dir has size limitation, if wal files are too large, they will be
> overwrited, right?
No, they won't.
You could run out of space on the file system though.
> > I see nothing wrong with what you are doing, but I may have got lost in
> > your complicated procedure.
> > You don't happen to remove "backup_label", do you?
>
> em, I do remove backup_label...
Then that's your problem.
That will corrupt your data, because recovery starts from the wrong
checkpoint.
> 1. It means recovery.conf is not necessary, backup_label is necessary?
Yes, exactly.
> 2. Which key in backup_label is necessary?
The whole file needs to be preserved unchanged, just as it is.
Don't mess with that file.
> 3. I searched the log, it do has recoveried.
> Then, if there is no backup_label, what's the default START WAL LOCATION and
> CHECKPOINT LOCATION?
That's the catch.
"backup_label" is the *only way* to tell a backup from a crashed
PostgreSQL cluster.
If there is no "backup_label", PostgreSQL will get the latest checkpoint
from the control file (global/pg_control), which may well be later than
the checkpoint that started the backup, so you will miss to recover some
transactions.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
From | Date | Subject | |
---|---|---|---|
Next Message | LE MENTEC, SANDRINE | 2021-04-13 15:04:57 | RE: looking for a installation package to Using GSSAPI with Postgres12 for windows |
Previous Message | Tom Lane | 2021-04-13 14:51:44 | Re: "missing chunk number 0 for toast value xxx in pg_toast_xxx" when pg_basebackup |