Re: 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: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>, Richard Guo
<guofenglinux@gmail.com>, PostgreSQL Hackers
<pgsql-hackers@lists.postgresql.org>
Date: 2025-05-19T08:17:55Z
Lists: pgsql-hackers
Attachments
- v3-0001-Fix-assertion-failure-when-pg_prewarm-is-run-on-o.patch (text/x-diff) patch v3-0001
- v3-0002-Fix-error-message-details-for-partitioned-indexes.patch (text/x-diff) patch v3-0002
Thanks for your work and feedback! I've updated the patches and added regular regression tests for both pg_prewarm and amcheck. On 2025-05-16 21:01, Fujii Masao wrote: > Also, since the issue was introduced in v17, this patch should be > back-patched to v17, right? I agree with back-patching v3-0001. I was able to reproduce the issue on the REL_17_STABLE branch. One concern is that this patch changes the error message in production: * v17.5 (without --enable-cassert) > ERROR: fork "main" does not exist for this relation * REL_17_STABLE with the v3-0001 patch (without --enable-cassert) > ERROR: relation "test" does not have storage However, I think preventing the assertion failure should take priority. As for v3-0002, I think it's fine to apply it to the master branch only, since it just makes a cosmetic improvement to the error message. 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