Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j0oVi-0000uc-7x for pgsql-general@arkaria.postgresql.org; Sun, 09 Feb 2020 15:28:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j0oVf-0006x7-1Q for pgsql-general@arkaria.postgresql.org; Sun, 09 Feb 2020 15:28:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j0oVe-0006x0-Nd for pgsql-general@lists.postgresql.org; Sun, 09 Feb 2020 15:28:34 +0000 Received: from mail.arcict.com ([91.183.106.63] helo=arcict.com) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1j0oVb-0000ah-DW for pgsql-general@postgresql.org; Sun, 09 Feb 2020 15:28:34 +0000 Received: from [91.183.106.63] (account postgres@arcict.com HELO [10.0.2.10]) by arcict.com (CommuniGate Pro SMTP 6.2.12) with ESMTPSA id 4537969; Sun, 09 Feb 2020 16:28:29 +0100 From: Marc To: "Nick Renders" Cc: pgsql-general Subject: Re: Unable to startup postgres: Could not read from file "pg_clog/00EC" Date: Sun, 09 Feb 2020 16:28:29 +0100 X-Mailer: MailMate (1.13.1r5678) Message-ID: <881A0820-9FDF-416E-BB8D-706B4FF4181C@arcict.com> In-Reply-To: <41881D5F-360A-440D-AD8C-B9F582C5A0AF@arcict.com> References: <41881D5F-360A-440D-AD8C-B9F582C5A0AF@arcict.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_MailMate_1AA43645-9ACB-4FE8-A6FD-50ED527C8EC2_=" Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --=_MailMate_1AA43645-9ACB-4FE8-A6FD-50ED527C8EC2_= Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit Alvaro, Thomas, Putting a 256kb file full of 0x55 that's 01010101 and represents 4 commits It did the job in being able to restart the server. According to our data a “better” way, with less garbage. The “Toast” issues how ever are still present. To spend our weekend well we setup a new server with version 12.1 but had to fallback on 11.6 ( see other post ) We kept our “old” server active to see if we can learn some more from this hard-times. Thanks for the help Marc On 5 Feb 2020, at 12:14, Nick Renders wrote: > Hello, > > Yesterday, we experienced some issues with our Postgres installation > (v9.6 running on macOS 10.12). > It seems that the machine was automatically rebooted for a yet unknown > reason, and afterwards we were unable to start the Postgres service. > > The postgres log shows the following: > > 2020-02-04 15:20:41 CET LOG: database system was interrupted; last > known up at 2020-02-04 15:18:34 CET > 2020-02-04 15:20:43 CET LOG: database system was not properly shut > down; automatic recovery in progress > 2020-02-04 15:20:44 CET LOG: invalid record length at 14A/9E426DF8: > wanted 24, got 0 > 2020-02-04 15:20:44 CET LOG: redo is not required > 2020-02-04 15:20:44 CET FATAL: could not access status of transaction > 247890764 > 2020-02-04 15:20:44 CET DETAIL: Could not read from file > "pg_clog/00EC" at offset 106496: Undefined error: 0. > 2020-02-04 15:20:44 CET LOG: startup process (PID 403) exited with > exit code 1 > 2020-02-04 15:20:44 CET LOG: aborting startup due to startup process > failure > 2020-02-04 15:20:44 CET LOG: database system is shut down > > > After some searching, I found someone who had had a similar issue and > was able to resolve it by overwriting the file in pg_clog. > So I tried the following command: > > dd if=/dev/zero of=[dbpath]/pg_clog/00EC bs=256k count=1 > > and now the service is running again. > > > But I am worried that there might still be some issues that we haven't > noticed yet. I also have no idea what caused this error in the first > place. It might have been the reboot, but maybe the reboot was a > result of a Postgres issue. > > Is there anything specific I should check in our postgres installation > / database to make sure it is running ok now? Anyway to see what the > consequences were of purging that one pg_clog file? > > Best regards, > > Nick Renders ARC - your Apple service partner --=_MailMate_1AA43645-9ACB-4FE8-A6FD-50ED527C8EC2_= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
<= p dir=3D"auto">Alvaro, Thomas,

Putting a 256kb file full of 0x55 that's 01010101 and rep= resents 4 commits
It did the job in being able to restart the server.
According to our data a =E2=80=9Cbetter=E2=80=9D way, with less garbage.<= /p>

The =E2=80=9CToast=E2=80=9D issues how ever are still pre= sent.

To spend our weekend well we setup a new server with vers= ion 12.1 but had to fallback on 11.6 ( see other post )

We kept our =E2=80=9Cold=E2=80=9D server active to see if= we can learn some more from this hard-times.

Thanks for the help

Marc



On 5 Feb 2020, at 12:14, Nick Renders wrote:

Hello,

Yesterday, we experienced some issues with our Postgres installation (v9.= 6 running on macOS 10.12).
It seems that the machine was automatically rebooted for a yet unknown re= ason, and afterwards we were unable to start the Postgres service.

The postgres log shows the following:

2020-02-04 15:20:41 CET LOG: database system was interrupted; last known= up at 2020-02-04 15:18:34 CET
2020-02-04 15:20:43 CET LOG: database system was not properly shut down;= automatic recovery in progress
2020-02-04 15:20:44 CET LOG: invalid record length at 14A/9E426DF8: want= ed 24, got 0
2020-02-04 15:20:44 CET LOG: redo is not required
2020-02-04 15:20:44 CET FATAL: could not access status of transaction 24= 7890764
2020-02-04 15:20:44 CET DETAIL: Could not read from file "pg_clog/00EC" = at offset 106496: Undefined error: 0.
2020-02-04 15:20:44 CET LOG: startup process (PID 403) exited with exit = code 1
2020-02-04 15:20:44 CET LOG: aborting startup due to startup process fai= lure
2020-02-04 15:20:44 CET LOG: database system is shut down


After some searching, I found someone who had had a similar issue and was= able to resolve it by overwriting the file in pg_clog.
So I tried the following command:

dd if=3D/dev/zero of=3D[dbpath]/pg_clog/00EC bs=3D256k count=3D1

and now the service is running again.


But I am worried that there might still be some issues that we haven't no= ticed yet. I also have no idea what caused this error in the first place.= It might have been the reboot, but maybe the reboot was a result of a Po= stgres issue.

Is there anything specific I should check in our postgres installation / = database to make sure it is running ok now? Anyway to see what the conseq= uences were of purging that one pg_clog file?

Best regards,

Nick Renders

=0D

=0D=0D=0D=0D=0D=0D=0D=0D=0D=0D=0D=0D=0D=0D<= tr>=0D=0D<= td>www.arcict.com=0D=0D=0D=0D=0D
ARC -= your Apple Authorised Service partnerH.D. Saviolaan 8
 B-1700 Dil= beek
 Belgium
info@arcict.com
tel. : +32 (0)2 466 50 00fax. : +32 (0)2 466 88 33=0D
=0D
=0D
--=_MailMate_1AA43645-9ACB-4FE8-A6FD-50ED527C8EC2_=--