diff --git a/src/backend/access/brin/brin_xlog.c b/src/backend/access/brin/brin_xlog.c index 9d55d783488..983dbff9d1c 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/heap/visibilitymap.c b/src/backend/access/heap/visibilitymap.c index 669a65b04fc..9b172f3f494 100644 --- a/src/backend/access/heap/visibilitymap.c +++ b/src/backend/access/heap/visibilitymap.c @@ -658,7 +658,7 @@ vm_extend(Relation rel, BlockNumber vm_nblocks) while (vm_nblocks_now < vm_nblocks) { /* - * ZENITH: Initialize VM pages through buffer cache to prevent loading + * NEON: Initialize VM pages through buffer cache to prevent loading * them from pageserver. */ Buffer buffer = ReadBufferExtended(rel, VISIBILITYMAP_FORKNUM, P_NEW, diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 92f535d1cda..0e6a55be4c3 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -653,11 +653,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, @@ -4916,11 +4916,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; @@ -4928,30 +4928,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) { @@ -4960,8 +4960,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 { @@ -4971,22 +4971,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)); } } @@ -5022,14 +5022,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 912b9663127..ec4ad21ed6a 100644 --- a/src/backend/access/transam/xlogrecovery.c +++ b/src/backend/access/transam/xlogrecovery.c @@ -623,9 +623,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"))); @@ -782,18 +782,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 @@ -993,7 +993,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"))); @@ -1592,7 +1592,7 @@ FinishWalRecovery(void) lastRecTLI = XLogRecoveryCtl->lastReplayedTLI; } - if (!ZenithRecoveryRequested) + if (!NeonRecoveryRequested) { XLogPrefetcherBeginRead(xlogprefetcher, lastRec); (void) ReadRecord(xlogprefetcher, PANIC, false, lastRecTLI); @@ -1635,13 +1635,13 @@ FinishWalRecovery(void) * buffer for appending new WAL. */ /* - * 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 @@ -1687,7 +1687,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? } } else if (endOfLog % XLOG_BLCKSZ != 0) @@ -1742,7 +1742,7 @@ ShutdownWalRecovery(void) char recoveryPath[MAXPGPATH]; /* Final update of pg_stat_recovery_prefetch. */ - if (!ZenithRecoveryRequested) + if (!NeonRecoveryRequested) { XLogPrefetcherComputeStats(xlogprefetcher); } @@ -1755,7 +1755,7 @@ ShutdownWalRecovery(void) } XLogReaderFree(xlogreader); - if (!ZenithRecoveryRequested) + if (!NeonRecoveryRequested) { XLogPrefetcherFree(xlogprefetcher); } @@ -1848,7 +1848,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 e0bf85a0f10..fd0eeeb9b53 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. */ -/* Zenith 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 5edb26e0c6d..382a551bdf2 100644 --- a/src/backend/replication/walsender.c +++ b/src/backend/replication/walsender.c @@ -3167,7 +3167,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 7aa4ee5fc55..7cd8f0b4105 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -161,7 +161,7 @@ int bgwriter_flush_after = 0; int backend_flush_after = 0; /* Evict unpinned pages (for better test coverage) */ -bool zenith_test_evict = false; +bool neon_test_evict = false; /* local state for StartBufferIO and related functions */ static BufferDesc *InProgressBuf = NULL; @@ -944,7 +944,7 @@ ReadBuffer_common(SMgrRelation smgr, char relpersistence, ForkNumber forkNum, bufBlock = isLocalBuf ? LocalBufHdrGetBlock(bufHdr) : BufHdrGetBlock(bufHdr); if (!PageIsNew((Page) bufBlock)) { - // XXX-ZENITH + // XXX-NEON MemSet((char *) bufBlock, 0, BLCKSZ); ereport(DEBUG1, (errmsg("unexpected data beyond EOF in block %u of relation %s", @@ -1583,7 +1583,7 @@ InvalidateBuffer(BufferDesc *buf) } /* - * NEON: Backported this from v16, to support zenith_test_evict mode. Not + * NEON: Backported this from v16, to support neon_test_evict mode. Not * used in production. * * Needs to be called on a buffer with a valid tag, pinned, but without the @@ -2018,7 +2018,7 @@ UnpinBuffer(BufferDesc *buf, bool fixOwner) } 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 b99ed777b68..3d2eac3a43f 100644 --- a/src/backend/storage/buffer/localbuf.c +++ b/src/backend/storage/buffer/localbuf.c @@ -25,7 +25,7 @@ #include "utils/memutils.h" #include "utils/resowner_private.h" -/* ZENITH: prevent eviction of the buffer of target page */ +/* NEON: prevent eviction of the buffer of target page */ extern Buffer wal_redo_buffer; /*#define LBDEBUG*/ @@ -187,7 +187,7 @@ LocalBufferAlloc(SMgrRelation smgr, ForkNumber forkNum, BlockNumber blockNum, { if (-b - 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/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c index 12b78f04ac4..7b95effe539 100644 --- a/src/backend/storage/freespace/freespace.c +++ b/src/backend/storage/freespace/freespace.c @@ -673,7 +673,7 @@ fsm_extend(Relation rel, BlockNumber fsm_nblocks) while (fsm_nblocks_now < fsm_nblocks) { /* - * ZENITH: Initialize FSM pages through buffer cache to prevent loading + * NEON: Initialize FSM pages through buffer cache to prevent loading * them from pageserver. */ Buffer buffer = ReadBufferExtended(rel, FSM_FORKNUM, P_NEW, RBM_ZERO_AND_LOCK, NULL); diff --git a/src/backend/storage/smgr/smgr.c b/src/backend/storage/smgr/smgr.c index 391e3f28e73..cd2594238e2 100644 --- a/src/backend/storage/smgr/smgr.c +++ b/src/backend/storage/smgr/smgr.c @@ -72,7 +72,7 @@ smgrinit(void) (*smgr_init_hook)(); /* - * ZENITH XXX + * NEON XXX * This doesn't work with inmem_smgr, so temporarily disable. * Anyway, we don't have any real smgrshutdown function. */ @@ -80,7 +80,7 @@ smgrinit(void) // on_proc_exit(smgrshutdown, 0); } -//ZENITH XXX See comment above. Silence compiler warning. +//NEON XXX See comment above. Silence compiler warning. // /* // * on_proc_exit hook for smgr cleanup during backend shutdown // */ @@ -749,7 +749,7 @@ smgrimmedsync(SMgrRelation reln, ForkNumber forknum) } /* - * Zenith-added functions to mark the phases of an unlogged index build. + * Neon-added functions to mark the phases of an unlogged index build. */ void smgr_start_unlogged_build(SMgrRelation reln) diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 4c7717686a9..8583717a169 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -2209,7 +2209,7 @@ static 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 dd87c453634..237ca8fdd73 100644 --- a/src/include/access/xlog.h +++ b/src/include/access/xlog.h @@ -36,9 +36,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; @@ -332,7 +332,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 ccda751e9e0..6c58b47970c 100644 --- a/src/include/storage/bufmgr.h +++ b/src/include/storage/bufmgr.h @@ -76,7 +76,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;