Register reset_min_request_lsn using before_shmem_exit to make it be called before ProcKill which cleans MyProc

This commit is contained in:
Konstantin Knizhnik
2025-07-28 21:59:35 +03:00
parent 7841303df9
commit 3fe7f8802a
2 changed files with 2 additions and 5 deletions

View File

@@ -1923,7 +1923,7 @@ static void
reset_min_request_lsn(int code, Datum arg)
{
if (MyProcNumber != -1)
neon_per_backend_counters_shared[MyProcNumber].min_request_lsn = InvalidXLogRecPtr;
MIN_BACKEND_REQUEST_LSN = InvalidXLogRecPtr;
}
/*
@@ -1937,7 +1937,7 @@ communicator_init(void)
if (MyPState != NULL)
return;
on_shmem_exit(reset_min_request_lsn, 0);
before_shmem_exit(reset_min_request_lsn, 0);
/*
* Sanity check that theperf counters array is sized correctly. We got

View File

@@ -22,9 +22,6 @@
#include "neon_pgversioncompat.h"
neon_per_backend_counters *neon_per_backend_counters_shared;
#if PG_MAJORVERSION_NUM < 17
int MyProcNumber = -1;
#endif
void
NeonPerfCountersShmemRequest(void)