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

Commitf181f9e

Browse files
committed
Make sure that open hash table scans are cleaned up when bgwriter tries to
recover from elog(ERROR). Problem was created by introduction of hash seqsearch tracking awhile back, and affects all branches that have bgwriter;in HEAD the disease has snuck into autovacuum and walwriter too. (Not surethat the latter two use hash_seq_search at the moment, but surely they mightsomeday.) Per report from Sergey Koposov.
1 parent5cf785a commitf181f9e

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

‎src/backend/postmaster/autovacuum.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
*
5656
*
5757
* IDENTIFICATION
58-
* $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.56 2007/08/02 23:39:44 adunstan Exp $
58+
* $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.57 2007/09/11 17:15:33 tgl Exp $
5959
*
6060
*-------------------------------------------------------------------------
6161
*/
@@ -472,6 +472,7 @@ AutoVacLauncherMain(int argc, char *argv[])
472472
*/
473473
LWLockReleaseAll();
474474
AtEOXact_Files();
475+
AtEOXact_HashTables(false);
475476

476477
/*
477478
* Now return to normal top-level context and clear ErrorContext for

‎src/backend/postmaster/bgwriter.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
*
3939
* IDENTIFICATION
40-
* $PostgreSQL: pgsql/src/backend/postmaster/bgwriter.c,v 1.41 2007/07/03 14:51:24 tgl Exp $
40+
* $PostgreSQL: pgsql/src/backend/postmaster/bgwriter.c,v 1.42 2007/09/11 17:15:33 tgl Exp $
4141
*
4242
*-------------------------------------------------------------------------
4343
*/
@@ -295,6 +295,7 @@ BackgroundWriterMain(void)
295295
/* we needn't bother with the other ResourceOwnerRelease phases */
296296
AtEOXact_Buffers(false);
297297
AtEOXact_Files();
298+
AtEOXact_HashTables(false);
298299

299300
/* Warn any waiting backends that the checkpoint failed. */
300301
if (ckpt_active)

‎src/backend/postmaster/walwriter.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
*
3535
*
3636
* IDENTIFICATION
37-
* $PostgreSQL: pgsql/src/backend/postmaster/walwriter.c,v 1.1 2007/07/24 04:54:09 tgl Exp $
37+
* $PostgreSQL: pgsql/src/backend/postmaster/walwriter.c,v 1.2 2007/09/11 17:15:33 tgl Exp $
3838
*
3939
*-------------------------------------------------------------------------
4040
*/
@@ -50,11 +50,13 @@
5050
#include"miscadmin.h"
5151
#include"postmaster/walwriter.h"
5252
#include"storage/bufmgr.h"
53+
#include"storage/fd.h"
5354
#include"storage/ipc.h"
5455
#include"storage/lwlock.h"
5556
#include"storage/pmsignal.h"
5657
#include"storage/smgr.h"
5758
#include"utils/guc.h"
59+
#include"utils/hsearch.h"
5860
#include"utils/memutils.h"
5961
#include"utils/resowner.h"
6062

@@ -179,6 +181,8 @@ WalWriterMain(void)
179181
false, true);
180182
/* we needn't bother with the other ResourceOwnerRelease phases */
181183
AtEOXact_Buffers(false);
184+
AtEOXact_Files();
185+
AtEOXact_HashTables(false);
182186

183187
/*
184188
* Now return to normal top-level context and clear ErrorContext for

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp