Skip to content

Commit 444ef5a

Browse files
Fenimorkindmpgpro
authored andcommitted
FIX in minxact on change
1 parent 6373ccb commit 444ef5a

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/backend/commands/waitlsn.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
#include "access/xlog.h"
3535
#include "access/xlogdefs.h"
3636
#include "commands/waitlsn.h"
37-
37+
#include "storage/proc.h"
38+
#include "access/transam.h"
3839

3940
/* Latches Own-DisownLatch and AbortCаllBack */
4041
static uint32 GetSHMEMSize(void);
@@ -134,9 +135,7 @@ WaitLSNSetLatch(void)
134135
{
135136
SpinLockAcquire(&state->l_arr[i].slock);
136137
if (state->l_arr[i].pid != 0)
137-
{
138138
SetLatch(&state->l_arr[i].latch);
139-
}
140139
SpinLockRelease(&state->l_arr[i].slock);
141140
}
142141
}
@@ -163,7 +162,6 @@ WaitLSNUtility(const char *lsn, const int delay)
163162

164163
for (;;)
165164
{
166-
ResetLatch(&state->l_arr[MyBackendId].latch);
167165
cur_lsn = GetXLogReplayRecPtr(NULL);
168166

169167
/* If LSN had been Replayed */
@@ -183,10 +181,11 @@ WaitLSNUtility(const char *lsn, const int delay)
183181
tdelay -= (secs*1000 + microsecs/1000);
184182
timer = GetCurrentTimestamp();
185183
}
186-
187-
/* Tom Lane insists on! Discussion: <1661(dot)1469996911(at)sss(dot)pgh(dot)pa(dot)us> */
188-
CHECK_FOR_INTERRUPTS();
184+
MyPgXact->xmin = InvalidTransactionId;
189185
WaitLatch(&state->l_arr[MyBackendId].latch, latch_events, tdelay);
186+
ResetLatch(&state->l_arr[MyBackendId].latch);
187+
CHECK_FOR_INTERRUPTS();
188+
190189
}
191190

192191
WLDisownLatch();

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy