Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mpRDA-0001RP-Ij for pgsql-general@arkaria.postgresql.org; Tue, 23 Nov 2021 08:31:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mpRD7-0003EZ-Mo for pgsql-general@arkaria.postgresql.org; Tue, 23 Nov 2021 08:31:29 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mpRD7-0003EP-3J for pgsql-general@lists.postgresql.org; Tue, 23 Nov 2021 08:31:29 +0000 Received: from carbon.misis.ru ([85.143.104.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mpRD3-0001C1-7n for pgsql-general@lists.postgresql.org; Tue, 23 Nov 2021 08:31:27 +0000 Received: from mail.tzirechnoy.ru (unknown [10.1.250.11]) by carbon.misis.ru (Postfix) with ESMTP id D7D0020041 for ; Tue, 23 Nov 2021 11:31:21 +0300 (MSK) Received: by mail.tzirechnoy.ru (Postfix, from userid 1000) id 95022A42A4; Tue, 23 Nov 2021 11:31:21 +0300 (MSK) Date: Tue, 23 Nov 2021 11:31:21 +0300 From: Ilya Anfimov To: pgsql-general@lists.postgresql.org Subject: Re: SELECT fails to present result rows depending on the columns to show Message-ID: <20211123083121.GB908685@azor.tzirechnoy.ru> Mail-Followup-To: Ilya Anfimov , pgsql-general@lists.postgresql.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Server: carbon X-Spamd-Result: default: False [-0.00 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; BAYES_HAM(-0.00)[22.32%] X-Rspamd-Queue-Id: D7D0020041 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Nov 23, 2021 at 09:15:06AM +0100, Matthias Apitz wrote: > > Hello, > > We encounter the following problem in a 13.1 server on Linux: > > sisis=# select desk, feldnr from titel_worte where desk = '2' and feldnr = 257; > desk | feldnr > ------+-------- > 2 | 257 > (1 row) > > > but: > > sisis=# select * from titel_worte where desk = '2' and feldnr = 257; > desknr | feldnr | desk | deskorg | gesanz | aufanz | katkey1 | katkey2 > --------+--------+------+---------+--------+--------+---------+--------- > (0 row) > > sisis=# select desk, feldnr, deskorg from titel_worte where desk = '2' and feldnr = 257; > desk | feldnr | deskorg > ------+--------+--------- > (0 row) > > The table was created as: > > create table titel_worte ( > desknr serial , > feldnr SMALLINT , > desk VARCHAR (245) , > deskorg VARCHAR (245) , > gesanz INTEGER , > aufanz INTEGER , > katkey1 INTEGER , > katkey2 INTEGER > ) > ; > > There are no messages in the serverlog when the SELECT fails to show the > row. > > What could be the reason for this? Thanks Broken index could. Then this anomaly shoud have gone after reindex table. > > matthias > -- > Matthias Apitz, ??? guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045 > Public GnuPG key: http://www.unixarea.de/key.pub >