diff --git a/src/backend/access/brin/brin_xlog.c b/src/backend/access/brin/brin_xlog.c index 188045d224a..ccc34e7d84c 100644 --- a/src/backend/access/brin/brin_xlog.c +++ b/src/backend/access/brin/brin_xlog.c @@ -69,7 +69,7 @@ brin_xlog_insert_update(XLogReaderState *record, } /* need this page's blkno to store in revmap */ - //ZENITH XXX Don't use BufferGetBlockNumber because wal-redo doesn't pin buffer. + //NEON XXX Don't use BufferGetBlockNumber because wal-redo doesn't pin buffer. XLogRecGetBlockTag(record, 0, NULL, NULL, ®pgno); /* insert the index item into the page */ diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index fb88d2b69d5..d480135548f 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -658,11 +658,11 @@ static MemoryContext walDebugCxt = NULL; /* - * Variables read from 'zenith.signal' file. + * Variables read from 'neon.signal' file. */ -bool ZenithRecoveryRequested = false; -XLogRecPtr zenithLastRec = InvalidXLogRecPtr; -bool zenithWriteOk = false; +bool NeonRecoveryRequested = false; +XLogRecPtr neonLastRec = InvalidXLogRecPtr; +bool neonWriteOk = false; static void CleanupAfterArchiveRecovery(TimeLineID EndOfLogTLI, @@ -5068,11 +5068,11 @@ CheckRequiredParameterValues(void) } static void -readZenithSignalFile(void) +readNeonSignalFile(void) { int fd; - fd = BasicOpenFile(ZENITH_SIGNAL_FILE, O_RDONLY | PG_BINARY); + fd = BasicOpenFile(NEON_SIGNAL_FILE, O_RDONLY | PG_BINARY); if (fd >= 0) { struct stat statbuf; @@ -5080,30 +5080,30 @@ readZenithSignalFile(void) char prev_lsn_str[20]; /* Slurp the file into a string */ - if (stat(ZENITH_SIGNAL_FILE, &statbuf) != 0) + if (stat(NEON_SIGNAL_FILE, &statbuf) != 0) ereport(ERROR, (errcode_for_file_access(), errmsg("could not stat file \"%s\": %m", - ZENITH_SIGNAL_FILE))); + NEON_SIGNAL_FILE))); content = palloc(statbuf.st_size + 1); if (read(fd, content, statbuf.st_size) != statbuf.st_size) ereport(ERROR, (errcode_for_file_access(), errmsg("could not read file \"%s\": %m", - ZENITH_SIGNAL_FILE))); + NEON_SIGNAL_FILE))); content[statbuf.st_size] = '\0'; /* Parse it */ if (sscanf(content, "PREV LSN: %19s", prev_lsn_str) != 1) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("invalid data in file \"%s\"", ZENITH_SIGNAL_FILE))); + errmsg("invalid data in file \"%s\"", NEON_SIGNAL_FILE))); if (strcmp(prev_lsn_str, "invalid") == 0) { /* No prev LSN. Forbid starting up in read-write mode */ - zenithLastRec = InvalidXLogRecPtr; - zenithWriteOk = false; + neonLastRec = InvalidXLogRecPtr; + neonWriteOk = false; } else if (strcmp(prev_lsn_str, "none") == 0) { @@ -5112,8 +5112,8 @@ readZenithSignalFile(void) * to start without it. This happens when you start the compute * node for the first time on a new branch. */ - zenithLastRec = InvalidXLogRecPtr; - zenithWriteOk = true; + neonLastRec = InvalidXLogRecPtr; + neonWriteOk = true; } else { @@ -5123,22 +5123,22 @@ readZenithSignalFile(void) if (sscanf(prev_lsn_str, "%X/%X", &hi, &lo) != 2) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("invalid data in file \"%s\"", ZENITH_SIGNAL_FILE))); - zenithLastRec = ((uint64) hi) << 32 | lo; + errmsg("invalid data in file \"%s\"", NEON_SIGNAL_FILE))); + neonLastRec = ((uint64) hi) << 32 | lo; /* If prev LSN is given, it better be valid */ - if (zenithLastRec == InvalidXLogRecPtr) + if (neonLastRec == InvalidXLogRecPtr) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("invalid prev-LSN in file \"%s\"", ZENITH_SIGNAL_FILE))); - zenithWriteOk = true; + errmsg("invalid prev-LSN in file \"%s\"", NEON_SIGNAL_FILE))); + neonWriteOk = true; } - ZenithRecoveryRequested = true; + NeonRecoveryRequested = true; close(fd); elog(LOG, - "[ZENITH] found 'zenith.signal' file. setting prev LSN to %X/%X", - LSN_FORMAT_ARGS(zenithLastRec)); + "[NEON] found 'neon.signal' file. setting prev LSN to %X/%X", + LSN_FORMAT_ARGS(neonLastRec)); } } @@ -5174,14 +5174,14 @@ StartupXLOG(void) CurrentResourceOwner = AuxProcessResourceOwner; /* - * Read zenith.signal before anything else. + * Read neon.signal before anything else. */ - readZenithSignalFile(); + readNeonSignalFile(); /* * Check that contents look valid. */ - if (!XRecOffIsValid(ControlFile->checkPoint) && !ZenithRecoveryRequested) + if (!XRecOffIsValid(ControlFile->checkPoint) && !NeonRecoveryRequested) ereport(FATAL, (errmsg("control file contains invalid checkpoint location"))); diff --git a/src/backend/access/transam/xlogrecovery.c b/src/backend/access/transam/xlogrecovery.c index 5abe1eb9afd..503b76a2c13 100644 --- a/src/backend/access/transam/xlogrecovery.c +++ b/src/backend/access/transam/xlogrecovery.c @@ -625,9 +625,9 @@ InitWalRecovery(ControlFileData *ControlFile, bool *wasShutdown_ptr, else if (recoveryTarget == RECOVERY_TARGET_IMMEDIATE) ereport(LOG, (errmsg("starting point-in-time recovery to earliest consistent point"))); - else if (ZenithRecoveryRequested) + else if (NeonRecoveryRequested) ereport(LOG, - (errmsg("starting zenith recovery"))); + (errmsg("starting neon recovery"))); else ereport(LOG, (errmsg("starting archive recovery"))); @@ -784,18 +784,18 @@ InitWalRecovery(ControlFileData *ControlFile, bool *wasShutdown_ptr, /* tell the caller to delete it later */ haveBackupLabel = true; } - else if (ZenithRecoveryRequested) + else if (NeonRecoveryRequested) { /* - * Zenith hacks to spawn compute node without WAL. Pretend that we - * just finished reading the record that started at 'zenithLastRec' + * Neon hacks to spawn compute node without WAL. Pretend that we + * just finished reading the record that started at 'neonLastRec' * and ended at checkpoint.redo */ - elog(LOG, "starting with zenith basebackup at LSN %X/%X, prev %X/%X", + elog(LOG, "starting with neon basebackup at LSN %X/%X, prev %X/%X", LSN_FORMAT_ARGS(ControlFile->checkPointCopy.redo), - LSN_FORMAT_ARGS(zenithLastRec)); + LSN_FORMAT_ARGS(neonLastRec)); - CheckPointLoc = zenithLastRec; + CheckPointLoc = neonLastRec; CheckPointTLI = ControlFile->checkPointCopy.ThisTimeLineID; RedoStartLSN = ControlFile->checkPointCopy.redo; // FIXME needs review. rebase of ff41b709abea6a9c42100a4fcb0ff434b2c846c9 @@ -995,7 +995,7 @@ InitWalRecovery(ControlFileData *ControlFile, bool *wasShutdown_ptr, (errmsg("invalid next transaction ID"))); /* sanity check */ - if (checkPoint.redo > CheckPointLoc && !ZenithRecoveryRequested) + if (checkPoint.redo > CheckPointLoc && !NeonRecoveryRequested) ereport(PANIC, (errmsg("invalid redo in checkpoint record"))); @@ -1594,7 +1594,7 @@ FinishWalRecovery(void) lastRecTLI = XLogRecoveryCtl->lastReplayedTLI; } - if (!ZenithRecoveryRequested) + if (!NeonRecoveryRequested) { XLogPrefetcherBeginRead(xlogprefetcher, lastRec); (void) ReadRecord(xlogprefetcher, PANIC, false, lastRecTLI); @@ -1634,13 +1634,13 @@ FinishWalRecovery(void) } /* - * When starting from a zenith base backup, we don't have WAL. Initialize + * When starting from a neon base backup, we don't have WAL. Initialize * the WAL page where we will start writing new records from scratch, * instead. */ - if (ZenithRecoveryRequested) + if (NeonRecoveryRequested) { - if (!zenithWriteOk) + if (!neonWriteOk) { /* * We cannot start generating new WAL if we don't have a valid prev-LSN @@ -1686,7 +1686,7 @@ FinishWalRecovery(void) result->lastPage = page; elog(LOG, "Continue writing WAL at %X/%X", LSN_FORMAT_ARGS(xlogreader->EndRecPtr)); - // FIXME: should we unlink zenith.signal? + // FIXME: should we unlink neon.signal? } } /* @@ -1745,7 +1745,7 @@ ShutdownWalRecovery(void) char recoveryPath[MAXPGPATH]; /* Final update of pg_stat_recovery_prefetch. */ - if (!ZenithRecoveryRequested) + if (!NeonRecoveryRequested) { XLogPrefetcherComputeStats(xlogprefetcher); } @@ -1758,7 +1758,7 @@ ShutdownWalRecovery(void) } XLogReaderFree(xlogreader); - if (!ZenithRecoveryRequested) + if (!NeonRecoveryRequested) { XLogPrefetcherFree(xlogprefetcher); } @@ -1851,7 +1851,7 @@ PerformWalRecovery(void) else { /* just have to read next record after CheckPoint */ - if (ZenithRecoveryRequested) + if (NeonRecoveryRequested) xlogreader->ReadRecPtr = CheckPointLoc; else Assert(xlogreader->ReadRecPtr == CheckPointLoc); diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c index f195c86b10f..f13f8af8b3e 100644 --- a/src/backend/commands/sequence.c +++ b/src/backend/commands/sequence.c @@ -54,7 +54,7 @@ * so we pre-log a few fetches in advance. In the event of * crash we can lose (skip over) as many values as we pre-logged. */ -/* NEON XXX: to ensure sequence order of sequence in Zenith we need to WAL log each sequence update. */ +/* NEON XXX: to ensure sequence order of sequence in Neon we need to WAL log each sequence update. */ /* #define SEQ_LOG_VALS 32 */ #define SEQ_LOG_VALS 0 diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c index 99ebde2c03d..07c1dce4957 100644 --- a/src/backend/replication/walsender.c +++ b/src/backend/replication/walsender.c @@ -3209,7 +3209,7 @@ WalSndDone(WalSndSendDataCallback send_data) * flush location if valid, write otherwise. Tools like pg_receivewal will * usually (unless in synchronous mode) return an invalid flush location. */ - // XXX Zenith uses flush_lsn to pass extra payload, so use write_lsn here + // XXX Neon uses flush_lsn to pass extra payload, so use write_lsn here replicatedPtr = MyWalSnd->write; if (WalSndCaughtUp && sentPtr == replicatedPtr && diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index d918c1915d9..da856afaa46 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -162,7 +162,7 @@ int bgwriter_flush_after = DEFAULT_BGWRITER_FLUSH_AFTER; int backend_flush_after = DEFAULT_BACKEND_FLUSH_AFTER; /* Evict unpinned pages (for better test coverage) */ -bool zenith_test_evict = false; +bool neon_test_evict = false; /* local state for LockBufferForCleanup */ @@ -2470,7 +2470,7 @@ UnpinBuffer(BufferDesc *buf) } ForgetPrivateRefCountEntry(ref); - if (zenith_test_evict && !InRecovery) + if (neon_test_evict && !InRecovery) { buf_state = LockBufHdr(buf); if ((buf_state & BM_VALID) && BUF_STATE_GET_REFCOUNT(buf_state) == 0) diff --git a/src/backend/storage/buffer/localbuf.c b/src/backend/storage/buffer/localbuf.c index b6247ea7bc4..ad7a45787af 100644 --- a/src/backend/storage/buffer/localbuf.c +++ b/src/backend/storage/buffer/localbuf.c @@ -203,7 +203,7 @@ GetLocalVictimBuffer(void) { if (-victim_bufid - 1 == wal_redo_buffer) { - /* ZENITH: Prevent eviction of the buffer with target wal redo page */ + /* NEON: Prevent eviction of the buffer with target wal redo page */ continue; } diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c index 83333d7d26e..9854bc2900d 100644 --- a/src/backend/utils/misc/guc_tables.c +++ b/src/backend/utils/misc/guc_tables.c @@ -2034,7 +2034,7 @@ struct config_bool ConfigureNamesBool[] = {"neon_test_evict", PGC_POSTMASTER, UNGROUPED, gettext_noop("Evict unpinned pages (for better test coverage)"), }, - &zenith_test_evict, + &neon_test_evict, false, NULL, NULL, NULL }, diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h index 0e90a3c22d6..90253c8b0b8 100644 --- a/src/include/access/xlog.h +++ b/src/include/access/xlog.h @@ -38,9 +38,9 @@ extern PGDLLIMPORT XLogRecPtr XactLastCommitEnd; */ #define REL_METADATA_PSEUDO_BLOCKNO InvalidBlockNumber -extern bool ZenithRecoveryRequested; -extern XLogRecPtr zenithLastRec; -extern bool zenithWriteOk; +extern bool NeonRecoveryRequested; +extern XLogRecPtr neonLastRec; +extern bool neonWriteOk; /* these variables are GUC parameters related to XLOG */ extern PGDLLIMPORT int wal_segment_size; @@ -333,7 +333,7 @@ extern restore_running_xacts_callback_t restore_running_xacts_callback; #define TABLESPACE_MAP "tablespace_map" #define TABLESPACE_MAP_OLD "tablespace_map.old" -#define ZENITH_SIGNAL_FILE "zenith.signal" +#define NEON_SIGNAL_FILE "neon.signal" /* files to signal promotion to primary */ #define PROMOTE_SIGNAL_FILE "promote" diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h index 6727de5d0a0..be78990e4b1 100644 --- a/src/include/storage/bufmgr.h +++ b/src/include/storage/bufmgr.h @@ -137,7 +137,7 @@ extern PGDLLIMPORT int checkpoint_flush_after; extern PGDLLIMPORT int backend_flush_after; extern PGDLLIMPORT int bgwriter_flush_after; -extern bool zenith_test_evict; +extern bool neon_test_evict; /* in buf_init.c */ extern PGDLLIMPORT char *BufferBlocks;