From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Kass <alexander.kass@jetbrains.com>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: No xmin in pg_database
Date: Wed, 08 Sep 2021 09:45:36 -0400
Message-ID: <3262238.1631108736@sss.pgh.pa.us> (raw)
In-Reply-To: <CAPhX7d1Ew2Hry=2xTdrJVq0A_RpmqCVh3KCtuO+CfQP62L6Hrg@mail.gmail.com>
References: <CAPhX7d2NnttM+0R=NiRas+s-RTX696zUZwP-hM6BEo9vKpUHfQ@mail.gmail.com>
<0cea1cb2929da04dc46a2fb198a7b54dc260cc17.camel@cybertec.at>
<2241619.1630579303@sss.pgh.pa.us>
<CAPhX7d1Ew2Hry=2xTdrJVq0A_RpmqCVh3KCtuO+CfQP62L6Hrg@mail.gmail.com>
Alexander Kass <alexander.kass@jetbrains.com> writes:
> I've asked the user to perform `SELECT xmin, * from pg_attribute WHERE
> attrelid = 'pg_catalog.pg_database'::regclass` to check the
> attributes.
> The user has sent me that a couple of times: both times xmin is
> different, attrelid is different, both have a big value.
> Does that mean that pg_database is recreated?
> Also system attributes are different. My result looks like:
> ...
> His result (apart from dat* attributes) contains only tableoid and
> oid. Also his attnum numeration starts from tableoid = 1, oid = 2,
> datname = 3
> I'm puzzled
It's pretty hard to read these details and not conclude that somebody
has been manually manipulating that catalog. Missing rows might possibly
be explained by index corruption ... but there is no scenario under which
pg_database could have an OID different from 1262, nor could this change
of attnums for the surviving rows ever have happened via Postgres-internal
processes.
I'm about ready to file this under "you broke it, you get to keep both
pieces".
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, alexander.kass@jetbrains.com, laurenz.albe@cybertec.at
Subject: Re: No xmin in pg_database
In-Reply-To: <3262238.1631108736@sss.pgh.pa.us>
References: <CAPhX7d2NnttM+0R=NiRas+s-RTX696zUZwP-hM6BEo9vKpUHfQ@mail.gmail.com> <0cea1cb2929da04dc46a2fb198a7b54dc260cc17.camel@cybertec.at> <2241619.1630579303@sss.pgh.pa.us> <CAPhX7d1Ew2Hry=2xTdrJVq0A_RpmqCVh3KCtuO+CfQP62L6Hrg@mail.gmail.com> <3262238.1631108736@sss.pgh.pa.us>
* 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