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

Commit3049fe7

Browse files
committed
Make the bgwriter's error recovery path do smgrcloseall(). On Windows this
should allow delete-pending files to actually go away, and thereby workaround the various complaints we've seen about 'permission denied'errors in such cases. Should be reasonably harmless in any case...
1 parentb02414b commit3049fe7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎src/backend/postmaster/bgwriter.c

Lines changed: 8 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.32 2006/11/30 18:29:12 tgl Exp $
40+
* $PostgreSQL: pgsql/src/backend/postmaster/bgwriter.c,v 1.33 2006/12/01 19:55:28 tgl Exp $
4141
*
4242
*-------------------------------------------------------------------------
4343
*/
@@ -304,6 +304,13 @@ BackgroundWriterMain(void)
304304
* fast as we can.
305305
*/
306306
pg_usleep(1000000L);
307+
308+
/*
309+
* Close all open files after any error. This is helpful on Windows,
310+
* where holding deleted files open causes various strange errors.
311+
* It's not clear we need it elsewhere, but shouldn't hurt.
312+
*/
313+
smgrcloseall();
307314
}
308315

309316
/* We can now handle ereport(ERROR) */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp