diff --git a/src/backend/access/brin/brin_xlog.c b/src/backend/access/brin/brin_xlog.c index 3e58a1aa79f..fd0a071e48e 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 b108a1a9412..915c603f8a7 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -297,11 +297,11 @@ static bool standby_signal_file_found = false; static bool recovery_signal_file_found = false; /* - * 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; /* Was the last xlog file restored from archive, or local? */ static bool restoredFromArchive = false; @@ -5664,11 +5664,11 @@ readRecoverySignalFile(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; @@ -5676,30 +5676,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) { @@ -5708,8 +5708,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 { @@ -5719,22 +5719,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)); } } @@ -6739,14 +6739,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"))); @@ -6876,9 +6876,9 @@ StartupXLOG(void) 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"))); @@ -7009,18 +7009,18 @@ StartupXLOG(void) /* set flag 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; RedoStartLSN = ControlFile->checkPointCopy.redo; /* make basebackup LSN available for walproposer */ XLogCtl->RedoStartLSN = RedoStartLSN; @@ -7320,7 +7320,7 @@ StartupXLOG(void) set_max_lwlsn_hook(RedoRecPtr); } - if (RecPtr < checkPoint.redo && !ZenithRecoveryRequested) + if (RecPtr < checkPoint.redo && !NeonRecoveryRequested) ereport(PANIC, (errmsg("invalid redo in checkpoint record"))); @@ -8011,13 +8011,13 @@ StartupXLOG(void) * valid or last applied record, so we can identify the exact endpoint of * what we consider the valid portion of 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 @@ -8063,7 +8063,7 @@ StartupXLOG(void) elog(LOG, "Continue writing WAL at %X/%X", LSN_FORMAT_ARGS(EndRecPtr)); - // FIXME: should we unlink zenith.signal? + // FIXME: should we unlink neon.signal? } } else @@ -8275,7 +8275,7 @@ StartupXLOG(void) /* Copy the valid part of the last block, and zero the rest */ page = &XLogCtl->pages[firstIdx * XLOG_BLCKSZ]; len = EndOfLog % XLOG_BLCKSZ; - if (!ZenithRecoveryRequested) + if (!NeonRecoveryRequested) memcpy(page, xlogreader->readBuf, len); memset(page + len, 0, XLOG_BLCKSZ - len); diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c index 09e0548f3f5..d3fcc4206f9 100644 --- a/src/backend/commands/sequence.c +++ b/src/backend/commands/sequence.c @@ -53,7 +53,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 36ce453e223..da0392d2de5 100644 --- a/src/backend/replication/walsender.c +++ b/src/backend/replication/walsender.c @@ -3008,7 +3008,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 cc3ccd6e627..c851711b9ed 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -159,7 +159,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; @@ -934,7 +934,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", @@ -1573,7 +1573,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 @@ -2008,7 +2008,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 f22ec0d82df..c2921c829ba 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/smgr/smgr.c b/src/backend/storage/smgr/smgr.c index 674d863db33..9a24a13c5c6 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 // */ @@ -717,7 +717,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 a6ad266db7c..bc8056945f7 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -2159,7 +2159,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 9f2c4baee18..8b0268763b7 100644 --- a/src/include/access/xlog.h +++ b/src/include/access/xlog.h @@ -432,7 +432,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 2b223ead345..7f796bfed00 100644 --- a/src/include/storage/bufmgr.h +++ b/src/include/storage/bufmgr.h @@ -76,7 +76,7 @@ extern int checkpoint_flush_after; extern int backend_flush_after; extern int bgwriter_flush_after; -extern bool zenith_test_evict; +extern bool neon_test_evict; /* in buf_init.c */ extern PGDLLIMPORT char *BufferBlocks; diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedefs.list index 79e64471586..5778ca922aa 100644 --- a/src/tools/pgindent/typedefs.list +++ b/src/tools/pgindent/typedefs.list @@ -2956,17 +2956,17 @@ XmlTableBuilderData YYLTYPE YYSTYPE YY_BUFFER_STATE -ZenithErrorResponse -ZenithExistsRequest -ZenithExistsResponse -ZenithGetPageRequest -ZenithGetPageResponse -ZenithMessage -ZenithMessageTag -ZenithNblocksRequest -ZenithNblocksResponse -ZenithRequest -ZenithResponse +NeonErrorResponse +NeonExistsRequest +NeonExistsResponse +NeonGetPageRequest +NeonGetPageResponse +NeonMessage +NeonMessageTag +NeonNblocksRequest +NeonNblocksResponse +NeonRequest +NeonResponse _SPI_connection _SPI_plan __AssignProcessToJobObject