Finish up the flat-files project: get rid of GetRawDatabaseInfo() hack
Tom Lane <tgl@sss.pgh.pa.us>
Finish up the flat-files project: get rid of GetRawDatabaseInfo() hack in favor of looking at the flat file copy of pg_database during backend startup. This should finally eliminate the various corner cases in which backend startup fails unexpectedly because it isn't able to distinguish live and dead tuples in pg_database. Simplify locking on pg_database to be similar to the rules used with pg_shadow and pg_group, and eliminate FlushRelationBuffers operations that were used only to reduce the odds of failure of GetRawDatabaseInfo. initdb forced due to addition of a trigger to pg_database.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/dbcommands.c | modified | +29 −60 |
| src/backend/commands/vacuum.c | modified | +4 −3 |
| src/backend/libpq/hba.c | modified | +49 −1 |
| src/backend/utils/init/flatfiles.c | modified | +5 −15 |
| src/backend/utils/init/postinit.c | modified | +65 −23 |
| src/backend/utils/misc/database.c | deleted | +0 −189 |
| src/backend/utils/misc/Makefile | modified | +11 −3 |
| src/bin/initdb/initdb.c | modified | +10 −7 |
| src/include/catalog/catversion.h | modified | +2 −2 |
| src/include/catalog/pg_proc.h | modified | +3 −3 |
| src/include/libpq/hba.h | modified | +5 −6 |
| src/include/miscadmin.h | modified | +1 −4 |