Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sCzHx-009Ngu-IE for pgsql-general@arkaria.postgresql.org; Fri, 31 May 2024 10:15:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sCzHx-00Abla-1b for pgsql-general@arkaria.postgresql.org; Fri, 31 May 2024 10:15:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sCzHw-00AblR-LB for pgsql-general@lists.postgresql.org; Fri, 31 May 2024 10:15:08 +0000 Received: from mail-wm1-f51.google.com ([209.85.128.51]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sCzHp-001eqO-Py for pgsql-general@lists.postgresql.org; Fri, 31 May 2024 10:15:08 +0000 Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-421208c97a2so18204185e9.1 for ; Fri, 31 May 2024 03:15:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717150501; x=1717755301; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0nSdFNjWO1Mxh61vIIhN3Tx6c6vauFDlqoMpR4nD4ho=; b=jS+3u1rtBngfofhWVd/3Ip8gYN2ecVbeoUIAbCdr9xrDKcgaCcNOP68oq4qt0FVqWB JeLoVD9BEKMVUgeQLcju800xzrMcV8KBZP4k0Fo+kg98Q1nhMo9D7NSSlCcdEdWtke6x xkzVuxgFaQay3UcG16qd8Lf5GeIva9UwGUu7NVQSCOK+en+1WAj+mPE+gNEZRzqFZD0G qt68VnwBRdgElSu7PZ94PPreezPVKHphijsGdpnEM/Ybnhoh/WMR6HJrxkVjXO1yyTl2 Bg/4KOtb0oX/3gHhJOxv4luRnbckJBjrI3wkZ1LPqXbRi6B/C7iQFYT/flsLSlEZ5gV0 j+uQ== X-Forwarded-Encrypted: i=1; AJvYcCUetJ3J2sHqXO1Ri46qjHs8Aab00L8jNGdpwXMGjlw7EwNsjo4UpG2Rw6TwqW3ft9WA5UYzvo8tj2IrMZ98rndZJh5nLJLFjKEXaIYjgrc18RRP X-Gm-Message-State: AOJu0YzILaMIbBWZYqD7AAlR+8N7OFcY5EXDXOlwLl3bKB+fDJ/fXoXS GhoMVr8/jZTKGn8oIor3BXB6hq8rwn7qZ3kalyxP0XB/j7NlCzBe0IgDevtD3fd6/nvCvWhM0Sq u2nNeBBUp8r7C1Pr+TeSqaVIX6ak= X-Google-Smtp-Source: AGHT+IFPn8RkqF4kJs4X/A/r4emtnMldQDGzE+KpYnLotyuf+tr6C6R/ivOcqJhEEU4BEmMJB/APDfCARleIyQK6mT0= X-Received: by 2002:a05:600c:3c92:b0:41a:2044:1b3e with SMTP id 5b1f17b1804b1-4212e0ade19mr12215255e9.32.1717150500178; Fri, 31 May 2024 03:15:00 -0700 (PDT) MIME-Version: 1.0 References: <4fbdd9760b329bccbdd62b6645d5977bee957e0d.camel@cybertec.at> In-Reply-To: <4fbdd9760b329bccbdd62b6645d5977bee957e0d.camel@cybertec.at> From: Thom Brown Date: Fri, 31 May 2024 11:14:46 +0100 Message-ID: Subject: Re: ERROR: found xmin from before relfrozenxid; MultiXactid does no longer exist -- apparent wraparound To: Laurenz Albe Cc: Alanoly Andrews , pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000096dc280619bd4179" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000096dc280619bd4179 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, May 31, 2024, 09:29 Laurenz Albe wrote: > On Thu, 2024-05-30 at 14:58 +0000, Alanoly Andrews wrote: > > We have a postgres 10.7 database which reports a number of issues on > user-created > > tables as well as system tables. Most errors are one of the following: > > -- ERROR: found xmin 1888159934 from before relfrozenxid 1998177448 > > -- ERROR: MultiXactId 613819197 does no longer exist -- apparent > wraparound > > -- ERROR: could not access status of transaction 1927393975 > > DETAIL: Could not open file "pg_xact/072E": No such file or > directory. > > > > Is there a way to repairing the corruption in this database? > > Postgres Version 10.7 on Linux(Ubuntu). > > Perhaps, but you should hire an expert if the data are important for you. > Also, while it's too late now, this could be the result of a bug in the version you are using that was subsequently repaired in 10.15: Prevent possible data loss from concurrent truncations of SLRU logs (Noah Misch) This rare problem would manifest in later =E2=80=9Capparent wraparound=E2= =80=9D or =E2=80=9Ccould not access status of transaction=E2=80=9D errors. This is why it's important to keep up-to-date, but even the latest minor 10.x release is out of date as support was dropped back in 2022. If you manage to get this up and running again, I strongly recommend upgrading to the latest major and minor release (16.3 at the time of writing). Before you try doing anything though, create a physical backup of your database as situations like this tend to require invasive action that could potentially make the situation even worse. Also, did this problem only happen in the last day or two? How frequently do you take backups? If you have a backup from just before this issue starting showing itself, and you can afford losing data changes that have occured since the backup, you may find it far easier and quicker to resort to using that backup. Of course, you would need to prove to yourself that the backup was safe by running a VACUUM FREEZE on each database in that backup before starting to use it. If that runs without issue, you're probably in the clear. Best of luck. Thom > --00000000000096dc280619bd4179 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, May 31, 2024, 09:29 Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On Thu, 2024-05-30 at 14= :58 +0000, Alanoly Andrews wrote:
> We have a postgres 10.7 database which reports a number of issues on u= ser-created
> tables as well as system tables. Most errors are one of the following:=
> -- ERROR: =C2=A0found xmin 1888159934 from before relfrozenxid 1998177= 448
> -- ERROR: =C2=A0MultiXactId 613819197 does no longer exist -- apparent= wraparound
> -- ERROR: =C2=A0could not access status of transaction 1927393975
> =C2=A0 =C2=A0DETAIL: =C2=A0Could not open file "pg_xact/072E"= ;: No such file or directory.
>
> Is there a way to repairing the corruption in this database?
> Postgres Version 10.7 on Linux(Ubuntu).

Perhaps, but you should hire an expert if the data are important for you.

Al= so, while it's too late now, this could be the result of a bug in the v= ersion you are using that was subsequently repaired in 10.15:

Prevent possible data loss from concu= rrent truncations of SLRU logs (Noah Misch)

This rare problem would manifest in later =E2=80=9Cappa= rent wraparound=E2=80=9D or =E2=80=9Ccould not access status of transaction= =E2=80=9D errors.

This i= s why it's important to keep up-to-date, but even the latest minor 10.x= release is out of date as support was dropped back in 2022.

If you manage to get this up and runn= ing again, I strongly recommend upgrading to the latest major and minor rel= ease (16.3 at the time of writing).

Before you try doing anything though, create a physical backup = of your database as situations like this tend to require invasive action th= at could potentially make the situation even worse.
=
Also, did this problem only happen in the last = day or two? How frequently do you take backups? If you have a backup from j= ust before this issue starting showing itself, and you can afford losing da= ta changes that have occured since the backup, you may find it far easier a= nd quicker to resort to using that backup. Of course, you would need to pro= ve to yourself that the backup was safe by running a VACUUM FREEZE on each = database in that backup before starting to use it.=C2=A0 If that runs witho= ut issue, you're probably in the clear.

Best of luck.

Thom
--00000000000096dc280619bd4179--