Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lWGHj-00059Y-7G for pgsql-general@arkaria.postgresql.org; Tue, 13 Apr 2021 10:28:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lWGHf-0005uc-7k for pgsql-general@arkaria.postgresql.org; Tue, 13 Apr 2021 10:28:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lWFUt-0007FQ-VU for pgsql-general@lists.postgresql.org; Tue, 13 Apr 2021 09:38:15 +0000 Received: from n3.nabble.com ([162.255.23.22]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lWFUr-0003Md-Ds for pgsql-general@postgresql.org; Tue, 13 Apr 2021 09:38:14 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 8F7542590F136 for ; Tue, 13 Apr 2021 02:38:10 -0700 (MST) Date: Tue, 13 Apr 2021 02:38:10 -0700 (MST) From: Ma Xinjian To: pgsql-general@postgresql.org Message-ID: <1618306690542-0.post@n3.nabble.com> Subject: "missing chunk number 0 for toast value xxx in pg_toast_xxx" when pg_basebackup MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, 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. Regards Ma Xinjian -- Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html