You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to open a table by Oid in a background worker. But it encountered segmentation fault when trying to open the table.
Here is my code snip
#[pg_guard]
#[no_mangle]
unsafe extern "C" fn parallel_worker_build_index(arg: pg_sys::Datum) {
// convert Datum to dsm_handle
let dsm_handle = arg.value() as u32;
let dsm_segment = pg_sys::dsm_attach(dsm_handle);
if dsm_segment.is_null() {
log!("dsm_segment is null");
}
let build_state = pg_sys::dsm_segment_address(dsm_segment) as *mut BuildState;
let heapreloid = (*build_state).heapreloid;
let indexreloid = (*build_state).indexreloid;
pg_sys::StartTransactionCommand();
let heaprel = pg_sys::table_open(heapreloid, pg_sys::AccessShareLock as i32);
log!("parallel_worker heaprel opened");
I tried to debug it and found that the error occurs here:
It seems that the RelationIdCache is NULL
Is someone met the similar issue before ? thanks for your input!
The text was updated successfully, but these errors were encountered:
Hi there,
I am trying to open a table by Oid in a background worker. But it encountered segmentation fault when trying to open the table.
Here is my code snip
I tried to debug it and found that the error occurs here:
It seems that the
RelationIdCache
is NULLIs someone met the similar issue before ? thanks for your input!
The text was updated successfully, but these errors were encountered: