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 1odZ2w-0000nk-Io for pgsql-general@arkaria.postgresql.org; Wed, 28 Sep 2022 15:32:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1odZ2v-0001vw-En for pgsql-general@arkaria.postgresql.org; Wed, 28 Sep 2022 15:32:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1odSln-0003oA-3e for pgsql-general@lists.postgresql.org; Wed, 28 Sep 2022 08:50:19 +0000 Received: from mta2.nexign.com ([91.210.5.250]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1odSlj-0006vt-Qy for pgsql-general@lists.postgresql.org; Wed, 28 Sep 2022 08:50:18 +0000 Received: from mta2.nexign.com (localhost [127.0.0.1]) by mta2.nexign.com (Postfix) with ESMTP id 1F97610000C for ; Wed, 28 Sep 2022 11:50:14 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nexign.com; s=mta; t=1664355014; bh=ipiPv3BENa0W3uUFSPkgac8OrXTiqPVW7kDkWNSd1zM=; h=From:To:Subject:Date:Message-ID:Content-Type:MIME-Version; b=q3muVSP4p0LAonDpRKbTGwr0Cq1Ac1ibG1BpfC8J5GhWr5nRGYgyVF1hBVeH9Bdzl oYIQizG13sYznYZc8UNb0kSROdQQGUz9tctZQ+qwe1j1Y5XAFgJNOPQR0e/9UdhZv1 n6+T4kF/Z7V01JKJswh2fNqhSymOWa1T2ZRTosmYg4bH3wFIAHo4E63o2Zl1e2fPVN Y4jO9+3ozVDYP6a64+lERR2RKgi1qMbMWpikPPHKw96yjzMzSWZKu0JOL4kglglNTG M5V+7bs3OtT10lo3vRvJENAMhEuw7EsxS0gNJk7chv81j5edXP1tYk9NAqmqOjcF7h HSEJNpYEeqWtw== Received: from srv-exch2.billing.ru (srv-exch2.billing.ru [172.25.0.123]) by mta2.nexign.com (Postfix) with ESMTP for ; Wed, 28 Sep 2022 11:50:13 +0300 (MSK) Received: from srv-exch2.billing.ru (172.25.0.123) by srv-exch2.billing.ru (172.25.0.123) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.9; Wed, 28 Sep 2022 11:50:12 +0300 Received: from srv-exch2.billing.ru ([fe80::1de4:c665:59d3:3075]) by srv-exch2.billing.ru ([fe80::1de4:c665:59d3:3075%8]) with mapi id 15.02.1118.009; Wed, 28 Sep 2022 11:50:12 +0300 From: "Lahnov, Igor" To: "pgsql-general@lists.postgresql.org" CC: "Timonin, Alexey" , "Dmitriyev, Andrey" Subject: Streaming wal from primiry terminating Thread-Topic: Streaming wal from primiry terminating Thread-Index: AdjTCfFNRO036lZQSg2UGTaCa3JUXQ== Date: Wed, 28 Sep 2022 08:50:12 +0000 Message-ID: Accept-Language: ru-RU, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.93.54] Content-Type: multipart/alternative; boundary="_000_edfbeb1160a44922914ee016d94fea4cnexigncom_" MIME-Version: 1.0 X-KSMG-Rule-ID: 14 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2022/09/28 02:23:00 #20393532 X-KSMG-AntiVirus-Status: Clean, skipped List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --_000_edfbeb1160a44922914ee016d94fea4cnexigncom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, After failover all stand by nodes could not start streaming wal recovery. Streaming recovery start from 1473/A5000000, but standby start at 1473/A5FF= EE08, this seems to be the problem. What can we do in this case to restore? Is it possible to shift wal streaming recovery point on primary? Can checkpoint on primary help in this situation? 2022-09-26 14:08:23.289 [3747796] LOG: consistent recovery state reac= hed at 1473/A5FFEE08 2022-09-26 14:08:23.289 [3747796] LOG: invalid record length at 1473/= A5FFEE08: wanted 24, got 0 2022-09-26 14:08:23.290 [3747793] LOG: database system is ready to ac= cept read-only connections 2022-09-26 14:08:23.292 [3747867] LOG: starting bgworker pgsentinel 2022-09-26 14:08:23.672 [3747868] LOG: started streaming WAL from pri= mary at 1473/A5000000 on timeline 18 2022-09-26 14:08:24.363 [3747796] LOG: invalid record length at 1473/= A5FFEE08: wanted 24, got 0 2022-09-26 14:08:24.366 [3747868] FATAL: terminating walreceiver proc= ess due to administrator command 2022-09-26 14:08:24.366 [3747796] LOG: invalid record length at 1473/= A5FFEE08: wanted 24, got 0 2022-09-26 14:08:24.366 [3747796] LOG: invalid record length at 1473/= A5FFEE08: wanted 24, got 0 2022-09-26 14:08:24.366 [3747796] LOG: invalid record length at 1473/= A5FFEE08: wanted 24, got 0 ... ... ... 2022-09-26 14:12:24.055 [3747796] LOG: invalid record length at 1473/= A5FFEE08: wanted 24, got 0 2022-09-26 14:12:29.060 [3747796] LOG: invalid record length at 1473/= A5FFEE08: wanted 24, got 0 2022-09-26 14:12:34.064 [3747796] LOG: invalid record length at 1473/= A5FFEE08: wanted 24, got 0 2022-09-26 14:12:39.068 [3747796] LOG: invalid record length at 1473/= A5FFEE08: wanted 24, got 0 2022-09-26 14:12:39.910 [3747793] LOG: received fast shutdown request 2022-09-26 14:12:39.911 [3747793] LOG: aborting any active transactio= ns 2022-09-26 14:12:39.911 [3747867] LOG: bgworker pgsentinel signal: pr= ocessed SIGTERM 2022-09-26 14:12:39.914 [3747797] LOG: shutting down 2022-09-26 14:12:39.922 [3747793] LOG: database system is shut down --_000_edfbeb1160a44922914ee016d94fea4cnexigncom_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

After failover all stand by nod= es could not start streaming wal recovery.

Streaming recovery start from 1= 473/A5000000, but standby start at 1473/A5FFEE08, this seems to be the prob= lem.

What can we do in this case to = restore?

Is it possible to shift wal str= eaming recovery point on primary?

Can checkpoint on primary help = in this situation?

 

 

2022-09-26 14:08:23.289  [= 3747796]     LOG:  consistent recovery state reach= ed at 1473/A5FFEE08

2022-09-26 14:08:23.289  [= 3747796]     LOG:  invalid record length at 1473/A= 5FFEE08: wanted 24, got 0

2022-09-26 14:08:23.290  [= 3747793]     LOG:  database system is ready to acc= ept read-only connections

2022-09-26 14:08:23.292  [= 3747867]     LOG:  starting bgworker pgsentinel

2022-09-26 14:08:23.672  [= 3747868]     LOG:  started streaming WAL from prim= ary at 1473/A5000000 on timeline 18

2022-09-26 14:08:24.363  [= 3747796]     LOG:  invalid record length at 1473/A= 5FFEE08: wanted 24, got 0

2022-09-26 14:08:24.366  [= 3747868]     FATAL:  terminating walreceiver proce= ss due to administrator command

2022-09-26 14:08:24.366  [= 3747796]     LOG:  invalid record length at 1473/A= 5FFEE08: wanted 24, got 0

2022-09-26 14:08:24.366  [= 3747796]     LOG:  invalid record length at 1473/A= 5FFEE08: wanted 24, got 0

2022-09-26 14:08:24.366  [= 3747796]     LOG:  invalid record length at 1473/A= 5FFEE08: wanted 24, got 0

...

...

...

2022-09-26 14:12:24.055  [= 3747796]     LOG:  invalid record length at 1473/A= 5FFEE08: wanted 24, got 0

2022-09-26 14:12:29.060  [= 3747796]     LOG:  invalid record length at 1473/A= 5FFEE08: wanted 24, got 0

2022-09-26 14:12:34.064  [= 3747796]     LOG:  invalid record length at 1473/A= 5FFEE08: wanted 24, got 0

2022-09-26 14:12:39.068  [= 3747796]     LOG:  invalid record length at 1473/A= 5FFEE08: wanted 24, got 0

2022-09-26 14:12:39.910  [= 3747793]     LOG:  received fast shutdown request<= o:p>

2022-09-26 14:12:39.911  [= 3747793]     LOG:  aborting any active transaction= s

2022-09-26 14:12:39.911  [= 3747867]     LOG:  bgworker pgsentinel signal: pro= cessed SIGTERM

2022-09-26 14:12:39.914  [= 3747797]     LOG:  shutting down=

2022-09-26 14:12:39.922  [= 3747793]     LOG:  database system is shut down

--_000_edfbeb1160a44922914ee016d94fea4cnexigncom_--