pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: exclusion@gmail.com
Subject: BUG #19026: ResourceOwnerForget can't find owner for invalid plancache
Date: Wed, 20 Aug 2025 05:00:01 +0000
Message-ID: <19026-90aed5e71d0c8af3@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      19026
Logged by:          Alexander Lakhin
Email address:      exclusion@gmail.com
PostgreSQL version: 18beta3
Operating system:   Ubuntu 24.04
Description:        

The following script:
create function part_hashint4_noop(value int4, seed int8)
    returns int8 as $$
create table t();
    select value + seed;
    $$ language sql strict immutable parallel safe;

create operator class part_test_int4_ops for type int4 using hash as
  function 2 part_hashint4_noop(int4, int8);

create table pt(i int) partition by hash (i part_test_int4_ops);
create table p1 partition of pt for values with (modulus 4, remainder 0);

insert into pt values (1);
insert into pt values (1);

triggers an expected error and then an internal one:
ERROR:  CREATE TABLE is not allowed in a non-volatile function
CONTEXT:  SQL function "part_hashint4_noop" statement 1

ERROR:  XX000: plancache reference 0x643ae41a7d98 is not owned by resource
owner Portal
CONTEXT:  SQL function "part_hashint4_noop" during startup
LOCATION:  ResourceOwnerForget, resowner.c:618

I also encountered a gibberish owner name (with more complicated queries)
like:
2025-08-19 16:32:22.878 EEST|postgres|regress002|68a47cdb.2d8921|ERROR:
plancache reference 0x5d56f0675c50 is not owned by resource owner
?^O^^?H??^H?????H??^H??^O^^?AUATUSH??^HI??H?w(H?=??

Reproduced starting from 0313c5dc6.



view thread (9+ messages)  latest in thread

Message-ID: <19026-90aed5e71d0c8af3@postgresql.org>
Permalink:  ../19026-90aed5e71d0c8af3@postgresql.org/
Also on:    postgresql.org/message-id/19026-90aed5e71d0c8af3@postgresql.org

 · 

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: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, exclusion@gmail.com
  Subject: Re: BUG #19026: ResourceOwnerForget can't find owner for invalid plancache
  In-Reply-To: <19026-90aed5e71d0c8af3@postgresql.org>

* 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