mirror of https://github.com/citusdata/citus.git
Add PG_WAIT_EXTENSION to WaitLatchOrSocket calls
WaitLatchOrSocket now accepts a "wait_event_info" argument for use by pg_stat. Extensions appear to mostly just pass "PG_WAIT_EXTENSION", so that's what I've done.pull/1439/head
parent
603b9cf3c4
commit
4610978c10
|
@ -9,6 +9,7 @@
|
|||
*/
|
||||
|
||||
#include "postgres.h"
|
||||
#include "pgstat.h"
|
||||
|
||||
#include "libpq-fe.h"
|
||||
|
||||
|
@ -434,7 +435,12 @@ GetRemoteCommandResult(MultiConnection *connection, bool raiseInterrupts)
|
|||
/* this means we have to wait for data to go out */
|
||||
Assert(rc == 1);
|
||||
|
||||
#if (PG_VERSION_NUM >= 100000)
|
||||
rc = WaitLatchOrSocket(MyLatch, waitFlags | WL_SOCKET_WRITEABLE, socket, 0,
|
||||
PG_WAIT_EXTENSION);
|
||||
#else
|
||||
rc = WaitLatchOrSocket(MyLatch, waitFlags | WL_SOCKET_WRITEABLE, socket, 0);
|
||||
#endif
|
||||
|
||||
if (rc & WL_POSTMASTER_DEATH)
|
||||
{
|
||||
|
@ -484,7 +490,12 @@ GetRemoteCommandResult(MultiConnection *connection, bool raiseInterrupts)
|
|||
break;
|
||||
}
|
||||
|
||||
#if (PG_VERSION_NUM >= 100000)
|
||||
rc = WaitLatchOrSocket(MyLatch, waitFlags | WL_SOCKET_READABLE, socket, 0,
|
||||
PG_WAIT_EXTENSION);
|
||||
#else
|
||||
rc = WaitLatchOrSocket(MyLatch, waitFlags | WL_SOCKET_READABLE, socket, 0);
|
||||
#endif
|
||||
|
||||
if (rc & WL_POSTMASTER_DEATH)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue