Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit712b6b1

Browse files
author
Alexander Korotkov
committed
Call WAIT_STOP after error recovery.
1 parent2f8110e commit712b6b1

File tree

9 files changed

+16
-2
lines changed

9 files changed

+16
-2
lines changed

‎contrib/pg_stat_wait/pg_stat_wait.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,6 @@ update_profile(uint32 classid, uint32 eventid, uint64 interval)
154154
if (eventid >=numberOfEvents[classid])
155155
return;
156156

157-
/*elog(LOG, "%d %d %d " INT64_FORMAT, MyProc->pgprocno, classid, eventid, interval);*/
158-
159157
offset=eventid;
160158
for (i=0;i<classid;i++)
161159
offset+=numberOfEvents[i];

‎contrib/sepgsql/proc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include"utils/lsyscache.h"
2727
#include"utils/syscache.h"
2828
#include"utils/tqual.h"
29+
#include"utils/wait.h"
2930

3031
#include"sepgsql.h"
3132

‎src/backend/access/transam/xact.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
#include"utils/snapmgr.h"
6363
#include"utils/timeout.h"
6464
#include"utils/timestamp.h"
65+
#include"utils/wait.h"
6566
#include"pg_trace.h"
6667

6768

@@ -2446,6 +2447,7 @@ AbortTransaction(void)
24462447
* while cleaning up!
24472448
*/
24482449
LWLockReleaseAll();
2450+
WAIT_STOP();
24492451

24502452
/* Clean up buffer I/O and buffer context locks, too */
24512453
AbortBufferIO();
@@ -4537,6 +4539,7 @@ AbortSubTransaction(void)
45374539
* Buffer locks, for example? I don't think so but I'm not sure.
45384540
*/
45394541
LWLockReleaseAll();
4542+
WAIT_STOP();
45404543

45414544
AbortBufferIO();
45424545
UnlockBuffers();

‎src/backend/bootstrap/bootstrap.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include"utils/rel.h"
4343
#include"utils/relmapper.h"
4444
#include"utils/tqual.h"
45+
#include"utils/wait.h"
4546

4647
uint32bootstrap_data_checksum_version=0;/* No checksum */
4748

@@ -534,6 +535,7 @@ static void
534535
ShutdownAuxiliaryProcess(intcode,Datumarg)
535536
{
536537
LWLockReleaseAll();
538+
WAIT_STOP();
537539
}
538540

539541
/* ----------------------------------------------------------------

‎src/backend/postmaster/bgwriter.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
#include"utils/memutils.h"
5959
#include"utils/resowner.h"
6060
#include"utils/timestamp.h"
61+
#include"utils/wait.h"
6162

6263

6364
/*
@@ -186,6 +187,7 @@ BackgroundWriterMain(void)
186187
* about in bgwriter, but we do have LWLocks, buffers, and temp files.
187188
*/
188189
LWLockReleaseAll();
190+
WAIT_STOP();
189191
AbortBufferIO();
190192
UnlockBuffers();
191193
/* buffer pins are released here: */

‎src/backend/postmaster/checkpointer.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
#include"utils/guc.h"
6060
#include"utils/memutils.h"
6161
#include"utils/resowner.h"
62+
#include"utils/wait.h"
6263

6364

6465
/*----------
@@ -273,6 +274,7 @@ CheckpointerMain(void)
273274
* files.
274275
*/
275276
LWLockReleaseAll();
277+
WAIT_STOP();
276278
AbortBufferIO();
277279
UnlockBuffers();
278280
/* buffer pins are released here: */

‎src/backend/postmaster/walwriter.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
#include"utils/hsearch.h"
5959
#include"utils/memutils.h"
6060
#include"utils/resowner.h"
61+
#include"utils/wait.h"
6162

6263

6364
/*
@@ -167,6 +168,7 @@ WalWriterMain(void)
167168
* about in walwriter, but we do have LWLocks, and perhaps buffers?
168169
*/
169170
LWLockReleaseAll();
171+
WAIT_STOP();
170172
AbortBufferIO();
171173
UnlockBuffers();
172174
/* buffer pins are released here: */

‎src/backend/replication/walsender.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
#include"utils/resowner.h"
8080
#include"utils/timeout.h"
8181
#include"utils/timestamp.h"
82+
#include"utils/wait.h"
8283

8384
/*
8485
* Maximum data payload in a WAL data message. Must be >= XLOG_BLCKSZ.
@@ -252,6 +253,7 @@ void
252253
WalSndErrorCleanup()
253254
{
254255
LWLockReleaseAll();
256+
WAIT_STOP();
255257

256258
if (sendFile >=0)
257259
{

‎src/backend/storage/lmgr/proc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
#include"storage/spin.h"
5252
#include"utils/timeout.h"
5353
#include"utils/timestamp.h"
54+
#include"utils/wait.h"
5455

5556

5657
/* GUC variables */
@@ -783,6 +784,7 @@ ProcKill(int code, Datum arg)
783784
* facility by releasing our PGPROC ...
784785
*/
785786
LWLockReleaseAll();
787+
WAIT_STOP();
786788

787789
/* Make sure active replication slots are released */
788790
if (MyReplicationSlot!=NULL)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp