提交 cb256d04 编写于 作者: A Ashwin Agrawal

Avoid FinishPreparedTransaction() calling readRecoveryCommandFile()

Not sure why we had FinishPreparedTransaction() calling
readRecoveryCommandFile(), seems serves no purpose to me. Seems to
exist from ages and wasn't able to find the rational for the same,
definitely not with current code. Seems unnecessary performance hit on
every commit to read and parse the file.
上级 6d80ce31
......@@ -112,8 +112,6 @@ int max_prepared_xacts = 0;
*/
#define GIDSIZE 200
extern List *expectedTLIs;
typedef struct GlobalTransactionData
{
GlobalTransaction next; /* list link for free list */
......@@ -1415,15 +1413,6 @@ FinishPreparedTransaction(const char *gid, bool isCommit, bool raiseErrorIfNotFo
elog((Debug_print_full_dtm ? LOG : DEBUG5),
"FinishPreparedTransaction(): got xid %d for gid '%s'", xid, gid);
/*
* Check for recovery control file, and if so set up state for offline
* recovery
*/
readRecoveryCommandFile();
/* Now we can determine the list of expected TLIs */
expectedTLIs = readTimeLineHistory(ThisTimeLineID);
/* get the two phase information from the xlog */
/*
* GPDB_93_MERGE_FIXME: GPDB used to do XLogCloseReadRecord() and then read,
......
......@@ -293,7 +293,6 @@ static bool recoveryStopAfter;
*/
static TimeLineID recoveryTargetTLI;
static bool recoveryTargetIsLatest = false; // GPDB_93_MERGE_FIXME: should this be set somewhere?
List *expectedTLIs;
static List *expectedTLEs;
static TimeLineID curFileTLI;
......@@ -800,6 +799,7 @@ static bool bgwriterLaunched = false;
static int MyLockNo = 0;
static bool holdingAllLocks = false;
static void readRecoveryCommandFile(void);
static void exitArchiveRecovery(TimeLineID endTLI, XLogSegNo endLogSegNo);
static bool recoveryStopsBefore(XLogRecord *record);
static bool recoveryStopsAfter(XLogRecord *record);
......@@ -5215,7 +5215,7 @@ str_time(pg_time_t tnow)
*
* The file is parsed using the main configuration parser.
*/
void
static void
readRecoveryCommandFile(void)
{
FILE *fd;
......
......@@ -373,7 +373,6 @@ extern void do_pg_abort_backup(void);
#define BACKUP_LABEL_OLD "backup_label.old"
/* Greenplum additions */
extern void readRecoveryCommandFile(void);
extern List *XLogReadTimeLineHistory(TimeLineID targetTLI);
extern bool IsStandbyMode(void);
extern DBState GetCurrentDBState(void);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册