mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Remove flatfiles.c, which is now obsolete.
Recent commits have removed the various uses it was supporting. It was a performance bottleneck, according to bug report #4919 by Lauris Ulmanis; seems it slowed down user creation after a billion users.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/access/transam/twophase_rmgr.c,v 1.8 2009/01/01 17:23:36 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/access/transam/twophase_rmgr.c,v 1.9 2009/09/01 02:54:51 alvherre Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -18,7 +18,6 @@
|
||||
#include "commands/async.h"
|
||||
#include "pgstat.h"
|
||||
#include "storage/lock.h"
|
||||
#include "utils/flatfiles.h"
|
||||
#include "utils/inval.h"
|
||||
|
||||
|
||||
@ -27,7 +26,6 @@ const TwoPhaseCallback twophase_recover_callbacks[TWOPHASE_RM_MAX_ID + 1] =
|
||||
NULL, /* END ID */
|
||||
lock_twophase_recover, /* Lock */
|
||||
NULL, /* Inval */
|
||||
NULL, /* flat file update */
|
||||
NULL, /* notify/listen */
|
||||
NULL /* pgstat */
|
||||
};
|
||||
@ -37,7 +35,6 @@ const TwoPhaseCallback twophase_postcommit_callbacks[TWOPHASE_RM_MAX_ID + 1] =
|
||||
NULL, /* END ID */
|
||||
lock_twophase_postcommit, /* Lock */
|
||||
inval_twophase_postcommit, /* Inval */
|
||||
flatfile_twophase_postcommit, /* flat file update */
|
||||
notify_twophase_postcommit, /* notify/listen */
|
||||
pgstat_twophase_postcommit /* pgstat */
|
||||
};
|
||||
@ -47,7 +44,6 @@ const TwoPhaseCallback twophase_postabort_callbacks[TWOPHASE_RM_MAX_ID + 1] =
|
||||
NULL, /* END ID */
|
||||
lock_twophase_postabort, /* Lock */
|
||||
NULL, /* Inval */
|
||||
NULL, /* flat file update */
|
||||
NULL, /* notify/listen */
|
||||
pgstat_twophase_postabort /* pgstat */
|
||||
};
|
||||
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.274 2009/06/11 14:48:54 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.275 2009/09/01 02:54:51 alvherre Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -43,7 +43,6 @@
|
||||
#include "storage/sinvaladt.h"
|
||||
#include "storage/smgr.h"
|
||||
#include "utils/combocid.h"
|
||||
#include "utils/flatfiles.h"
|
||||
#include "utils/guc.h"
|
||||
#include "utils/inval.h"
|
||||
#include "utils/memutils.h"
|
||||
@ -1608,12 +1607,6 @@ CommitTransaction(void)
|
||||
/* NOTIFY commit must come before lower-level cleanup */
|
||||
AtCommit_Notify();
|
||||
|
||||
/*
|
||||
* Update flat files if we changed pg_database, pg_authid or
|
||||
* pg_auth_members. This should be the last step before commit.
|
||||
*/
|
||||
AtEOXact_UpdateFlatFiles(true);
|
||||
|
||||
/* Prevent cancel/die interrupt while cleaning up */
|
||||
HOLD_INTERRUPTS();
|
||||
|
||||
@ -1797,7 +1790,7 @@ PrepareTransaction(void)
|
||||
/* close large objects before lower-level cleanup */
|
||||
AtEOXact_LargeObject(true);
|
||||
|
||||
/* NOTIFY and flatfiles will be handled below */
|
||||
/* NOTIFY will be handled below */
|
||||
|
||||
/*
|
||||
* Don't allow PREPARE TRANSACTION if we've accessed a temporary table in
|
||||
@ -1860,7 +1853,6 @@ PrepareTransaction(void)
|
||||
StartPrepare(gxact);
|
||||
|
||||
AtPrepare_Notify();
|
||||
AtPrepare_UpdateFlatFiles();
|
||||
AtPrepare_Inval();
|
||||
AtPrepare_Locks();
|
||||
AtPrepare_PgStat();
|
||||
@ -1909,7 +1901,7 @@ PrepareTransaction(void)
|
||||
/* Clean up the snapshot manager */
|
||||
AtEarlyCommit_Snapshot();
|
||||
|
||||
/* notify and flatfiles don't need a postprepare call */
|
||||
/* notify doesn't need a postprepare call */
|
||||
|
||||
PostPrepare_PgStat();
|
||||
|
||||
@ -2036,7 +2028,6 @@ AbortTransaction(void)
|
||||
AtAbort_Portals();
|
||||
AtEOXact_LargeObject(false); /* 'false' means it's abort */
|
||||
AtAbort_Notify();
|
||||
AtEOXact_UpdateFlatFiles(false);
|
||||
|
||||
/*
|
||||
* Advertise the fact that we aborted in pg_clog (assuming that we got as
|
||||
@ -3764,8 +3755,6 @@ CommitSubTransaction(void)
|
||||
AtEOSubXact_LargeObject(true, s->subTransactionId,
|
||||
s->parent->subTransactionId);
|
||||
AtSubCommit_Notify();
|
||||
AtEOSubXact_UpdateFlatFiles(true, s->subTransactionId,
|
||||
s->parent->subTransactionId);
|
||||
|
||||
CallSubXactCallbacks(SUBXACT_EVENT_COMMIT_SUB, s->subTransactionId,
|
||||
s->parent->subTransactionId);
|
||||
@ -3885,8 +3874,6 @@ AbortSubTransaction(void)
|
||||
AtEOSubXact_LargeObject(false, s->subTransactionId,
|
||||
s->parent->subTransactionId);
|
||||
AtSubAbort_Notify();
|
||||
AtEOSubXact_UpdateFlatFiles(false, s->subTransactionId,
|
||||
s->parent->subTransactionId);
|
||||
|
||||
/* Advertise the fact that we aborted in pg_clog. */
|
||||
(void) RecordTransactionAbort(true);
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.350 2009/08/31 02:23:22 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.351 2009/09/01 02:54:51 alvherre Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -49,7 +49,6 @@
|
||||
#include "storage/smgr.h"
|
||||
#include "storage/spin.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/flatfiles.h"
|
||||
#include "utils/guc.h"
|
||||
#include "utils/ps_status.h"
|
||||
#include "pg_trace.h"
|
||||
@ -8077,8 +8076,6 @@ StartupProcessMain(void)
|
||||
|
||||
StartupXLOG();
|
||||
|
||||
BuildFlatFiles(false);
|
||||
|
||||
/*
|
||||
* Exit normally. Exit code 0 tells postmaster that we completed recovery
|
||||
* successfully.
|
||||
|
Reference in New Issue
Block a user