@@ -58,7 +58,8 @@ void _PG_fini(void);
5858
5959/* hooks defined in this module */
6060static void qs_ExecutorStart (QueryDesc * queryDesc , int eflags );
61- static void qs_ExecutorRun (QueryDesc * queryDesc , ScanDirection direction , uint64 count );
61+ static void qs_ExecutorRun (QueryDesc * queryDesc , ScanDirection direction ,
62+ uint64 count , bool execute_once );
6263static void qs_ExecutorFinish (QueryDesc * queryDesc );
6364static void qs_ExecutorEnd (QueryDesc * queryDesc );
6465
@@ -305,14 +306,15 @@ qs_ExecutorStart(QueryDesc *queryDesc, int eflags)
305306 * Catch any fatal signals
306307 */
307308static void
308- qs_ExecutorRun (QueryDesc * queryDesc , ScanDirection direction , uint64 count )
309+ qs_ExecutorRun (QueryDesc * queryDesc , ScanDirection direction , uint64 count ,
310+ bool execute_once )
309311{
310312 PG_TRY ();
311313 {
312314 if (prev_ExecutorRun )
313- prev_ExecutorRun (queryDesc , direction , count );
315+ prev_ExecutorRun (queryDesc , direction , count , execute_once );
314316 else
315- standard_ExecutorRun (queryDesc , direction , count );
317+ standard_ExecutorRun (queryDesc , direction , count , execute_once );
316318 }
317319 PG_CATCH ();
318320 {
@@ -707,7 +709,7 @@ GetRemoteBackendUserId(PGPROC *proc)
707709 if (result != InvalidOid )
708710 break ;
709711
710- WaitLatch (MyLatch , WL_LATCH_SET , 0 );
712+ WaitLatch (MyLatch , WL_LATCH_SET , 0 , PG_WAIT_EXTENSION );
711713 CHECK_FOR_INTERRUPTS ();
712714 ResetLatch (MyLatch );
713715 }
@@ -744,7 +746,8 @@ shm_mq_receive_with_timeout(shm_mq_handle *mqh,
744746 if (rc & WL_TIMEOUT || delay <= 0 )
745747 return SHM_MQ_WOULD_BLOCK ;
746748
747- rc = WaitLatch (MyLatch , WL_LATCH_SET | WL_TIMEOUT , delay );
749+ rc = WaitLatch (MyLatch , WL_LATCH_SET | WL_TIMEOUT , delay ,
750+ PG_WAIT_EXTENSION );
748751
749752 INSTR_TIME_SET_CURRENT (cur_time );
750753 INSTR_TIME_SUBTRACT (cur_time , start_time );
0 commit comments