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

Commit6a8ffe8

Browse files
committed
Remove some obsolete smgrcloseall() calls.
Before the advent of PROCSIGNAL_BARRIER_SMGRRELEASE, we didn't have acomprehensive way to deal with Windows file handles that get in the wayof unlinking directories. We had smgrcloseall() calls in a few placesto try to mitigate.It's still a good idea for bgwriter and checkpointer to do that once percheckpoint so they don't accumulate unbounded SMgrRelation objects, butthere is no longer any reason to close them at other random places suchas the error path, and the explanation as given in the comments is nowobsolete.Author: Thomas MunroReviewed-by: Heikki Linnakangas, Robert HaasDiscussion:https://www.postgresql.org/message-id/CA%2BhUKGJ8NTvqLHz6dqbQnt2c8XCki4r2QvXjBQcXpVwxTY_pvA@mail.gmail.com
1 parent0fda392 commit6a8ffe8

File tree

3 files changed

+0
-21
lines changed

3 files changed

+0
-21
lines changed

‎src/backend/postmaster/bgwriter.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,6 @@ BackgroundWriterMain(void)
197197
*/
198198
pg_usleep(1000000L);
199199

200-
/*
201-
* Close all open files after any error. This is helpful on Windows,
202-
* where holding deleted files open causes various strange errors.
203-
* It's not clear we need it elsewhere, but shouldn't hurt.
204-
*/
205-
smgrcloseall();
206-
207200
/* Report wait end here, when there is no further possibility of wait */
208201
pgstat_report_wait_end();
209202
}

‎src/backend/postmaster/checkpointer.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -301,13 +301,6 @@ CheckpointerMain(void)
301301
* fast as we can.
302302
*/
303303
pg_usleep(1000000L);
304-
305-
/*
306-
* Close all open files after any error. This is helpful on Windows,
307-
* where holding deleted files open causes various strange errors.
308-
* It's not clear we need it elsewhere, but shouldn't hurt.
309-
*/
310-
smgrcloseall();
311304
}
312305

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

‎src/backend/postmaster/walwriter.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,6 @@ WalWriterMain(void)
186186
* fast as we can.
187187
*/
188188
pg_usleep(1000000L);
189-
190-
/*
191-
* Close all open files after any error. This is helpful on Windows,
192-
* where holding deleted files open causes various strange errors.
193-
* It's not clear we need it elsewhere, but shouldn't hurt.
194-
*/
195-
smgrcloseall();
196189
}
197190

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp