pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Marco Boeringa <marco@boeringa.demon.nl>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: 'CLUSTER' in one database prevents running it in two others on the same database cluster (PG15.2)
Date: Tue, 7 Mar 2023 12:25:47 +0100
Message-ID: <20230307112547.imnavuk4ejxchvx2@alvherre.pgsql> (raw)
In-Reply-To: <ed211b60-2b76-4d98-4284-328916068036@boeringa.demon.nl>

On 2023-Mar-05, Marco Boeringa wrote:

> However, as part of two secondary Python scripts running that do all kinds
> of batch operations against spatial tables (generalization and such) in two
> other databases on the same database cluster, at the very end of the
> processing, these initialize 'CLUSTER' operations as well. Both of these now
> fail with a:
>     "missing chunk number 0 for toast value X in pg_toast_Y"
> type error.

Hmm.  Very strange ...

> After these errors, I see the CLUSTER command listed as well in the
> PostgreSQL main log, but the ERROR line mentioned above is listed just above
> the actual CLUSTER statement in the log. No other anomaly / error is visible
> there. The CLUSTER command just fails though on the two secondary databases.
> The time displayed in the log is exactly the same for these two log lines
> one after another, also the number between the square brackets listed
> immediately after the "CET" of the time are the same for the same database.

It would make things much more understandable if you just pasted the log
lines, instead of describing details of those log lines.  In you
description you may omit clues that may seem trivial/unimportant to you
but indicate useful things to us.

One thing that I'm curious about is what the various values of 'Y' are
in these lines:

> The pg_toast_Y table names mentioned in the errors differ by the way between
> the two databases.

It would be useful if you could look up to what heap-table each of these
TOAST tables correspond, with a query like
   SELECT oid::regclass FROM pg_class WHERE reltoastrelid = 'pg_toast.pg_toast_Y'::regclass;
(ran in the database that each error was thrown from.)

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"Learn about compilers. Then everything looks like either a compiler or
a database, and now you have two problems but one of them is fun."
            https://twitter.com/thingskatedid/status/1456027786158776329





view thread (3+ messages)

Message-ID: <20230307112547.imnavuk4ejxchvx2@alvherre.pgsql>
Permalink:  ../20230307112547.imnavuk4ejxchvx2@alvherre.pgsql/
Also on:    postgresql.org/message-id/20230307112547.imnavuk4ejxchvx2@alvherre.pgsql

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: alvherre@alvh.no-ip.org, marco@boeringa.demon.nl, pgsql-bugs@lists.postgresql.org
  Subject: Re: 'CLUSTER' in one database prevents running it in two others on the same database cluster (PG15.2)
  In-Reply-To: <20230307112547.imnavuk4ejxchvx2@alvherre.pgsql>

* 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