Re: question about relation_open - Mailing list pgsql-hackers

From Rahila Syed
Subject Re: question about relation_open
Date
Msg-id CAH2L28tOY+4KG0oM9i+4Ob4Td+zsiphpj5ucTvSWVOhfpBzYDQ@mail.gmail.com
Whole thread Raw
In response to question about relation_open  (Giampaolo Capelli <giampow@gmail.com>)
Responses Re: question about relation_open
List pgsql-hackers
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 my extension, but then the last line in the following snippet crashes postgres.
 
You mentioned that the postgres crashes. Did you mean it caused a Segmentation fault or something else like PANIC? 
If possible, can you share a core dump in that case? 

Also, can you share any errors that you see in logs when postgres crashes?

Thank you,
Rahila Syed

pgsql-hackers by date:

Previous
From: Shlok Kyal
Date:
Subject: Re: Adding a '--two-phase' option to 'pg_createsubscriber' utility.
Next
From: Giampaolo Capelli
Date:
Subject: Re: question about relation_open