From: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
Cc: | Masahiro Ikeda <ikedamsh(at)oss(dot)nttdata(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Assertion failure in smgr.c when using pg_prewarm with partitioned tables |
Date: | 2025-05-15 09:50:26 |
Message-ID: | CAFiTN-vDKGHn76XkL2oTQVf5aCScKqs1GKf_aALGO5u7fuqNwg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, May 15, 2025 at 3:14 PM Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote:
>
>
>
> On 2025/05/15 18:20, Dilip Kumar wrote:
> > On Thu, May 15, 2025 at 2:22 PM Masahiro Ikeda <ikedamsh(at)oss(dot)nttdata(dot)com> wrote:
> >>
> >> 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:
>
> Thanks for the report!
>
> This assertion failure can also occur when pg_prewarm() is run on objects like
> foreign tables, plain views, or other relations that don't have storage - not just
> partitioned tables.
>
>
> >> $ 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?
> >
> > Yeah, this should be fixed, don't you think that instead of checking
> > the relnumber is valid,
>
> +1
>
> How about adding a check to see whether the target relation has storage,
> using something like RELKIND_HAS_STORAGE()?
Yeah, that makes more sense.
--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Guo | 2025-05-15 10:57:27 | Re: Assertion failure in smgr.c when using pg_prewarm with partitioned tables |
Previous Message | Fujii Masao | 2025-05-15 09:44:29 | Re: Assertion failure in smgr.c when using pg_prewarm with partitioned tables |