Re: question about relation_open

2025-01-15 Thread Giampaolo Capelli
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 a écrit : > Giampaolo Capelli writes: > > The function relat

Re: question about relation_open

2025-01-15 Thread Giampaolo Capelli
hi Rahila, thank you for your response, I mean Segmentation fault, this is what I see in psql SSL SYSCALL error: EOF detected The connection to the server was lost. Attempting reset: Failed. !?> this is the content of in /var/log/postgresql/postgresql-14-main.log when a segmentation fault happens

Re: question about relation_open

2025-01-14 Thread Tom Lane
Giampaolo Capelli 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

Re: question about relation_open

2025-01-14 Thread Rahila Syed
Hi, > > > I want to call the function ReadBufferExtended > to get the raw data of a given buffer > and I've read in some examples that I need to call relation_open > first, in order to get a Relation variable and also lock the relation. > > The function relation_open returns a non NULL pointer in

question about relation_open

2025-01-14 Thread Giampaolo Capelli
Hi there, I'm trying to write an extension to study the internals of Postgresql, and I face a server crash after calling the function relation_open. I want to call the function ReadBufferExtended to get the raw data of a given buffer and I've read in some examples that I need to call relation_open