Back-patch fix for ALTER DATABASE failing to flush pg_database changes

to disk right away.  This is just a one-liner change rather than trying
to use FlushRelationBuffers().
REL7_3_STABLE
Tom Lane 21 years ago
parent eac07f1fd7
commit bd677bb443
  1. 10
      src/backend/commands/dbcommands.c

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.107.2.1 2002/12/02 05:21:01 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.107.2.2 2004/11/18 01:19:57 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -575,6 +575,14 @@ AlterDatabaseSet(AlterDatabaseSetStmt *stmt)
heap_endscan(scan);
heap_close(rel, RowExclusiveLock);
/*
* Force dirty buffers out to disk, so that newly-connecting backends
* will see the altered database tuple in pg_database right away.
* (They'll see an uncommitted deletion, but they don't care; see
* GetRawDatabaseInfo.)
*/
BufferSync();
}

Loading…
Cancel
Save