Assertion failure in smgr.c when using pg_prewarm with partitioned tables
Masahiro Ikeda <ikedamsh@oss.nttdata.com>
From: Masahiro Ikeda <ikedamsh@oss.nttdata.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-05-15T08:52:06Z
Lists: pgsql-hackers
Attachments
- v1-0001-Fix-assertion-failure-when-pg_prewarm-is-used-on-.patch (text/x-diff) patch v1-0001
Hi,
I encountered an assertion failure when a partitioned table is specified
as an argument to pg_prewarm. Below are the steps to reproduce the
issue:
$ pgbench -i -s 1 --partitions=3
$ psql <<EOF
CREATE EXTENSION pg_prewarm;
SELECT pg_prewarm('pgbench_accounts');
EOF
The following assertion failure occurs:
TRAP: failed Assert("RelFileNumberIsValid(rlocator.relNumber)"), File:
"smgr.c", Line: 246, PID: 1246282
postgres: ikeda postgres [local]
SELECT(ExceptionalCondition+0xbb)[0x55edd16725c1]
postgres: ikeda postgres [local] SELECT(smgropen+0x5e)[0x55edd145c1ff]
It looks like this may have been overlooked in commit 049ef33.
What do you think?
Regards,
--
Masahiro Ikeda
NTT DATA CORPORATION
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
amcheck: Improve error message for partitioned index target.
- 88a658a42e1b 19 (unreleased) landed
-
Fix assertion failure in pg_prewarm() on objects without storage.
- b64c585fde77 17.6 landed
- 3c4d7557e03b 18.0 landed
-
Prevent assertion failure in contrib/pg_freespacemap.
- 4623d71443de 18.0 cited
-
Don't try to open visibilitymap when analyzing a foreign table
- 049ef3398d05 17.0 cited