From: Bruce Momjian <bruce@momjian.us>
To: Andreas Kretschmer <andreas@a-kretschmer.de>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Matthias Apitz <guru@unixarea.de>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: REINDEX in tables
Date: Wed, 25 Oct 2023 09:17:17 -0400
Message-ID: <ZTkVXSBrHlTWQElP@momjian.us> (raw)
In-Reply-To: <2a250be8-321b-3432-6404-4dfec23fdbeb@a-kretschmer.de>
References: <ZTjesqtUit3mwDXt@pureos>
<aa6471fb-f709-9574-246a-f3531453b638@a-kretschmer.de>
<ZTjmivuUkIh7v6/u@pureos>
<2786bf60-266d-8f82-2dee-4a43b90e16bb@a-kretschmer.de>
<bedf2448c1a2a14f476a2abadd0a3034065df7dc.camel@cybertec.at>
<2a250be8-321b-3432-6404-4dfec23fdbeb@a-kretschmer.de>
On Wed, Oct 25, 2023 at 02:14:49PM +0200, Andreas Kretschmer wrote:
> Am 25.10.23 um 14:11 schrieb Laurenz Albe:
> > On Wed, 2023-10-25 at 11:59 +0200, Andreas Kretschmer wrote:
> > > Am 25.10.23 um 11:57 schrieb Matthias Apitz:
> > > > El día miércoles, octubre 25, 2023 a las 11:33:11 +0200, Andreas Kretschmer escribió:
> > > > > Am 25.10.23 um 11:24 schrieb Matthias Apitz:
> > > > > > We have a client who run REINDEX in certain tables of the database of
> > > > > > our application (on Linux with PostgreSQL 13.x):
> > > > > >
> > > > > > REINDEX TABLE CONCURRENTLY d83last;
> > > > > > REINDEX TABLE CONCURRENTLY d86plz;
> > > > > > REINDEX TABLE CONCURRENTLY ig_memtable;
> > > > > > REINDEX TABLE CONCURRENTLY ig_dictionary;
> > > > > > REINDEX TABLE CONCURRENTLY ig_dictionary;
> > > > > > REINDEX TABLE CONCURRENTLY d50zweig ;
> > > > > > REINDEX TABLE CONCURRENTLY d50zweig ;
> > > > > >
> > > > > > We as the software vendor and support, do not use or recommend this
> > > > > > procedure, because we have own SQL files for creating or deleting
> > > > > > indices in the around 400 tables.
> > > > > >
> > > > > > The client is now concerned about the issue that the number of
> > > > > > rows in some of the above tables has increased. Is this possible?
> > > no, reindex will not add rows to the table.
> > But if the indexes were corrupted before the REINDEX, it is possible that
> > a query that didn't find a result before the REINDEX can find one afterwards.
>
> Thanks for the addition my friend, that's correct and could be an
> explanation here.
However, if that is happening, there is something seriously wrong,
perhaps bad hardware. I would find the cause of this corruption.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com
Only you can decide what is important to you.
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: bruce@momjian.us, andreas@a-kretschmer.de, laurenz.albe@cybertec.at, guru@unixarea.de
Subject: Re: REINDEX in tables
In-Reply-To: <ZTkVXSBrHlTWQElP@momjian.us>
References: <ZTjesqtUit3mwDXt@pureos> <aa6471fb-f709-9574-246a-f3531453b638@a-kretschmer.de> <ZTjmivuUkIh7v6/u@pureos> <2786bf60-266d-8f82-2dee-4a43b90e16bb@a-kretschmer.de> <bedf2448c1a2a14f476a2abadd0a3034065df7dc.camel@cybertec.at> <2a250be8-321b-3432-6404-4dfec23fdbeb@a-kretschmer.de> <ZTkVXSBrHlTWQElP@momjian.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