83 (
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
84 errmsg(
"unable to map dynamic shared memory segment")));
88 (
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
89 errmsg(
"bad magic number in dynamic shared memory segment")));
105 (
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
106 errmsg(
"too many message queue testing workers already")));
126 if (registrant == NULL)
128 elog(
DEBUG1,
"registrant backend has exited prematurely");
void BackgroundWorkerUnblockSignals(void)
static void PGresult * res
void * dsm_segment_address(dsm_segment *seg)
void dsm_detach(dsm_segment *seg)
dsm_segment * dsm_attach(dsm_handle h)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
void SetLatch(Latch *latch)
#define CHECK_FOR_INTERRUPTS()
pqsigfunc pqsignal(int signo, pqsigfunc func)
static int32 DatumGetInt32(Datum X)
BackgroundWorker * MyBgworkerEntry
PGPROC * BackendPidGetProc(int pid)
shm_mq_handle * shm_mq_attach(shm_mq *mq, dsm_segment *seg, BackgroundWorkerHandle *handle)
void shm_mq_set_sender(shm_mq *mq, PGPROC *proc)
void shm_mq_set_receiver(shm_mq *mq, PGPROC *proc)
shm_mq_result shm_mq_receive(shm_mq_handle *mqh, Size *nbytesp, void **datap, bool nowait)
shm_mq_result shm_mq_send(shm_mq_handle *mqh, Size nbytes, const void *data, bool nowait, bool force_flush)
shm_toc * shm_toc_attach(uint64 magic, void *address)
void * shm_toc_lookup(shm_toc *toc, uint64 key, bool noError)
#define SpinLockRelease(lock)
#define SpinLockAcquire(lock)
void test_shm_mq_main(Datum main_arg)
static void attach_to_queues(dsm_segment *seg, shm_toc *toc, int myworkernumber, shm_mq_handle **inqhp, shm_mq_handle **outqhp)
static void copy_messages(shm_mq_handle *inqh, shm_mq_handle *outqh)
#define PG_TEST_SHM_MQ_MAGIC