File tree 1 file changed +18
-1
lines changed
1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 37
37
*
38
38
*
39
39
* IDENTIFICATION
40
- * $PostgreSQL: pgsql/src/backend/postmaster/bgwriter.c,v 1.13 2005/01/10 20:02:20 tgl Exp $
40
+ * $PostgreSQL: pgsql/src/backend/postmaster/bgwriter.c,v 1.14 2005/02/19 23:16:15 tgl Exp $
41
41
*
42
42
*-------------------------------------------------------------------------
43
43
*/
@@ -509,6 +509,23 @@ RequestCheckpoint(bool waitforit)
509
509
sig_atomic_t old_failed = bgs -> ckpt_failed ;
510
510
sig_atomic_t old_started = bgs -> ckpt_started ;
511
511
512
+ /*
513
+ * If in a standalone backend, just do it ourselves.
514
+ */
515
+ if (!IsPostmasterEnvironment )
516
+ {
517
+ CreateCheckPoint (false, true);
518
+
519
+ /*
520
+ * After any checkpoint, close all smgr files. This is so we
521
+ * won't hang onto smgr references to deleted files
522
+ * indefinitely.
523
+ */
524
+ smgrcloseall ();
525
+
526
+ return ;
527
+ }
528
+
512
529
/*
513
530
* Send signal to request checkpoint. When waitforit is false, we
514
531
* consider failure to send the signal to be nonfatal.
You can’t perform that action at this time.
0 commit comments