pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: exclusion@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18256: spgGetCache() attempts to read to read invalid file for index attached to partitioned table
Date: Thu, 21 Dec 2023 11:04:16 -0500
Message-ID: <666908.1703174656@sss.pgh.pa.us> (raw)
In-Reply-To: <18256-0b0e1b6e4a620f1b@postgresql.org>
References: <18256-0b0e1b6e4a620f1b@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> The following query:
> CREATE TABLE t(a int, b text) PARTITION BY RANGE (a);
> CREATE INDEX idx ON t USING spgist(b);
> SELECT * FROM t;

> produces an unexpected error:
> ERROR:  could not open file "pg_tblspc/0/PG_16_202307071/0/0": No such file
> or directory

Thanks for the report.  It looks like we could work around this by
teaching spgGetCache to not try to get the lastUsedPages info for
a partitioned index.  (The rest of what it does is still valid for
partitioned indexes.)  I wonder though if there are any other similar
bugs --- obviously, non-btree partitioned indexes haven't been
tested sufficiently.

> Reproduced on REL_16_STABLE (starting from 3c569049b) .. master.

It should be possible to exhibit similar problems long before 3c569049b,
I would guess.

			regards, tom lane





view thread (2+ messages)

Message-ID: <666908.1703174656@sss.pgh.pa.us>
Permalink:  ../666908.1703174656@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/666908.1703174656@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18256: spgGetCache() attempts to read to read invalid file for index attached to partitioned table
  In-Reply-To: <666908.1703174656@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