34 static int mq_putmessage(
char msgtype,
const char *s,
size_t len);
135 if (pq_mq_handle != NULL)
147 if (pq_mq_handle == NULL)
152 iov[0].
data = &msgtype;
157 Assert(pq_mq_handle != NULL);
241 if (strcmp(value,
"DEBUG") == 0)
250 else if (strcmp(value,
"LOG") == 0)
258 else if (strcmp(value,
"INFO") == 0)
260 else if (strcmp(value,
"NOTICE") == 0)
262 else if (strcmp(value,
"WARNING") == 0)
264 else if (strcmp(value,
"ERROR") == 0)
266 else if (strcmp(value,
"FATAL") == 0)
268 else if (strcmp(value,
"PANIC") == 0)
271 elog(
ERROR,
"unrecognized error severity: \"%s\"", value);
274 if (strlen(value) != 5)
275 elog(
ERROR,
"invalid SQLSTATE: \"%s\"", value);
325 elog(
ERROR,
"unrecognized error field code: %d", (
int) code);
static shm_mq_handle * pq_mq_handle
#define PG_DIAG_MESSAGE_PRIMARY
#define PG_DIAG_SCHEMA_NAME
static int mq_putmessage(char msgtype, const char *s, size_t len)
#define PG_DIAG_MESSAGE_DETAIL
void shm_mq_detach(shm_mq_handle *mqh)
#define PG_DIAG_COLUMN_NAME
#define MAKE_SQLSTATE(ch1, ch2, ch3, ch4, ch5)
static int mq_flush_if_writable(void)
#define PG_PROTOCOL_LATEST
char * pstrdup(const char *in)
#define PG_DIAG_TABLE_NAME
static void pq_cleanup_redirect_to_shm_mq(dsm_segment *seg, Datum arg)
const PQcommMethods * PqCommMethods
#define PG_DIAG_SOURCE_LINE
#define MemSet(start, val, len)
#define PG_DIAG_INTERNAL_POSITION
void on_dsm_detach(dsm_segment *seg, on_dsm_detach_callback function, Datum arg)
static const PQcommMethods PqCommMqMethods
void ResetLatch(Latch *latch)
int WaitLatch(Latch *latch, int wakeEvents, long timeout, uint32 wait_event_info)
static void mq_putmessage_noblock(char msgtype, const char *s, size_t len)
int SendProcSignal(pid_t pid, ProcSignalReason reason, BackendId backendId)
#define PG_DIAG_SOURCE_FILE
static void mq_comm_reset(void)
void pq_parse_errornotice(StringInfo msg, ErrorData *edata)
MemoryContext CurrentMemoryContext
#define PG_DIAG_STATEMENT_POSITION
static void mq_startcopyout(void)
static pid_t pq_mq_parallel_leader_backend_id
static bool mq_is_send_pending(void)
#define PG_DIAG_DATATYPE_NAME
#define PG_DIAG_CONSTRAINT_NAME
#define PG_DIAG_SEVERITY_NONLOCALIZED
void pq_redirect_to_shm_mq(dsm_segment *seg, shm_mq_handle *mqh)
#define PG_DIAG_INTERNAL_QUERY
#define PG_DIAG_MESSAGE_HINT
#define Assert(condition)
static pid_t pq_mq_parallel_leader_pid
shm_mq_result shm_mq_sendv(shm_mq_handle *mqh, shm_mq_iovec *iov, int iovcnt, bool nowait)
struct MemoryContextData * assoc_context
int32 pg_strtoint32(const char *s)
static void mq_endcopyout(bool errorAbort)
void pq_set_parallel_leader(pid_t pid, BackendId backend_id)
static int mq_flush(void)
#define CHECK_FOR_INTERRUPTS()
CommandDest whereToSendOutput
#define PG_DIAG_SOURCE_FUNCTION
ProtocolVersion FrontendProtocol
#define WL_EXIT_ON_PM_DEATH