pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Ma Xinjian <maxj.fnst@fujitsu.com>
To: pgsql-general@postgresql.org
Subject: Re: "missing chunk number 0 for toast value xxx in pg_toast_xxx" when pg_basebackup
Date: Tue, 13 Apr 2021 14:26:29 +0200
Message-ID: <e164678e2ba68ffc095dbc26b9e06f80b771d8ff.camel@cybertec.at> (raw)
In-Reply-To: <1618306690542-0.post@n3.nabble.com>
References: <1618306690542-0.post@n3.nabble.com>

On Tue, 2021-04-13 at 02:38 -0700, Ma Xinjian wrote:
> When I use pg_basebackup to backup and restore db(Let's call it A) to a
> standalone instance(Let's call it B), "missing chunk number 0 for toast
> value xxx in pg_toast_xxx" errors output.
> 
> PG version: 10.3
> pg_basebackup command:
>      /usr/pgsql-10/bin/pg_basebackup -h p-rdb-c01 -D /var/lib/pgsql/10/data
> -Xs -P -n --waldir=/tmp/pg_wal
>    I have mounted a disk to /tmp/pg_wal before, then I will mount the disk
> to /var/lib/pgsql/10/data/pg_wal, so as to ensure completeness of wal
> records during backup.
>  
> Since I don't want B to be a standy server, I just want it to be a
> standalone server.
> I removed recovery.conf, then simply start postgresql-10.service. It turned
> out that postgresql-10.service
> can be started successfully. But when I use this postgresql(reindex, vacumm
> and so on), "missing chunk number 0 for toast value xxx in pg_toast_xxx"
> errors output.
> 
> When pg_basebackup, it will store wal under pg_wal, can't postgresql work
> with wal records locally?
> I think primary_conninfo in recovery.conf is just used to get newer wal
> records from A. Right?
> 
> I have also tested:
> If I start postgresql-10.service with recovery.conf firstly, then split it
> from postgresql cluster, everything works fine.
> 
> Above test seems proved that it is wal records's problem. I am really
> confused.

Your mail got me confused...

Why do you write the WAL to /tmp/pg_wal, only to later mount that at the
default location?

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?

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






view thread (7+ messages)  latest in thread

Message-ID: <e164678e2ba68ffc095dbc26b9e06f80b771d8ff.camel@cybertec.at>
Permalink:  ../e164678e2ba68ffc095dbc26b9e06f80b771d8ff.camel@cybertec.at/
Also on:    postgresql.org/message-id/e164678e2ba68ffc095dbc26b9e06f80b771d8ff.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, maxj.fnst@fujitsu.com
  Subject: Re: "missing chunk number 0 for toast value xxx in pg_toast_xxx" when pg_basebackup
  In-Reply-To: <e164678e2ba68ffc095dbc26b9e06f80b771d8ff.camel@cybertec.at>
  References: <1618306690542-0.post@n3.nabble.com> <e164678e2ba68ffc095dbc26b9e06f80b771d8ff.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox