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 1qvdlL-006LzO-V9 for pgsql-general@arkaria.postgresql.org; Wed, 25 Oct 2023 13:17:31 +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 1qvdlK-003rD4-2d for pgsql-general@arkaria.postgresql.org; Wed, 25 Oct 2023 13:17:30 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qvdlJ-003rCu-H4 for pgsql-general@lists.postgresql.org; Wed, 25 Oct 2023 13:17:29 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qvdlC-002FCS-I1 for pgsql-general@lists.postgresql.org; Wed, 25 Oct 2023 13:17:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2023062407; h=In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-ID:Content-Description; bh=QEtTKUnk64JaQBCnlMbPeeTXvo5JXNo/W3UPQErw69o=; b=TAVUW5XfTIYpd/HaRkul+HnGKf LajVC1u5vu4hxOBGPhUQg69GTUELJu8PLr+sYWfgUX0BLBfTZPgQNmBzj9gedJ5TQnx6QTEVEay0F Uz0eOdzHl64Ckk4oClsrIjhWdwJKQ4q/y7zvxNoDDOQH7We7r1b9mTat53ZPXDHP62kK66MpGMN8n FjE2zOzBc4haxfKp2DJ8XF0ICFur9o1Lg5mA3OF2hzsKagz7VkEcFy3SoMG1ja+KH77rxoQCSGfa+ dM7dfFy/zL6hzSQHIKJiypYvwIXbbOrepq2fM2EZwHfVT6u+w/UqjEiVCz28m9AvnBC8To/+GGs4B BnbaiZQQ==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1qvdl7-00DGnj-2j; Wed, 25 Oct 2023 09:17:17 -0400 Date: Wed, 25 Oct 2023 09:17:17 -0400 From: Bruce Momjian To: Andreas Kretschmer Cc: Laurenz Albe , Matthias Apitz , pgsql-general@lists.postgresql.org Subject: Re: REINDEX in tables Message-ID: References: <2786bf60-266d-8f82-2dee-4a43b90e16bb@a-kretschmer.de> <2a250be8-321b-3432-6404-4dfec23fdbeb@a-kretschmer.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2a250be8-321b-3432-6404-4dfec23fdbeb@a-kretschmer.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you.