Re: question about relation_open

From: Giampaolo Capelli <giampow(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: question about relation_open
Date: 2025-01-15 14:28:24
Message-ID: CAJ=H7uydvT5TH+VYCSgNZN4h78brz_bo6f+U4phBHUq83RpeEA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

It seems the issue was related to some misconfiguration of my postgresql
server,
I've migrated from pg 14 to 17 and now the issue has disappeared.

Also, I replaced relation_open with table_open

Le mar. 14 janv. 2025 à 15:40, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> a écrit :

> Giampaolo Capelli <giampow(at)gmail(dot)com> writes:
> > The function relation_open returns a non NULL pointer in my extension,
> but
> > then the last line in the following snippet crashes postgres.
>
> > Relation rel;
> > rel = relation_open(relid, AccessShareLock);
>
> > Assert(rel != NULL);
> > Assert(rel->rd_rel != NULL);
> > Assert(rel->rd_id != NULL);
> > elog(INFO, "rel->rd_id not null");
> > Oid rd_id = rel->rd_id;
>
> Hmm, I'm a little bit doubting your statement that relation_open
> succeeded. I wonder if maybe you built your extension without asserts
> enabled ...
>
> regards, tom lane
>

--
Giampaolo Capelli

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2025-01-15 14:31:12 Re: Index AM API cleanup
Previous Message Daniel Gustafsson 2025-01-15 14:24:52 Re: Replace current implementations in crypt() and gen_salt() to OpenSSL