This is an automated email from the ASF dual-hosted git repository.
reshke pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/cbdb-postgres-merge by this
push:
new d7ebd4c950b Resolve rebase markers for `pg_rewind`.
d7ebd4c950b is described below
commit d7ebd4c950b890cf95df672dea19e90377a53099
Author: reshke <[email protected]>
AuthorDate: Sun Dec 21 20:59:38 2025 +0000
Resolve rebase markers for `pg_rewind`.
---
src/bin/pg_rewind/filemap.c | 14 ++------------
src/bin/pg_rewind/filemap.h | 2 +-
src/bin/pg_rewind/parsexlog.c | 3 ---
src/bin/pg_rewind/pg_rewind.c | 8 +-------
4 files changed, 4 insertions(+), 23 deletions(-)
diff --git a/src/bin/pg_rewind/filemap.c b/src/bin/pg_rewind/filemap.c
index 8cb81b85777..af927ebcfd9 100644
--- a/src/bin/pg_rewind/filemap.c
+++ b/src/bin/pg_rewind/filemap.c
@@ -407,12 +407,7 @@ process_target_wal_block_change(ForkNumber forknum,
RelFileLocator rlocator,
segno = blkno / RELSEG_SIZE;
blkno_inseg = blkno % RELSEG_SIZE;
-<<<<<<< HEAD
- path = datasegpath(rnode, forknum, segno);
-
-=======
path = datasegpath(rlocator, forknum, segno);
->>>>>>> REL_16_9
entry = lookup_filehash_entry(path);
pfree(path);
@@ -455,12 +450,12 @@ process_target_wal_block_change(ForkNumber forknum,
RelFileLocator rlocator,
}
void
-process_target_wal_aofile_change(RelFileNode rnode, int segno, int64 offset)
+process_target_wal_aofile_change(RelFileLocator rlocator, int segno, int64
offset)
{
char *path;
file_entry_t *entry;
- path = datasegpath(rnode, MAIN_FORKNUM, segno);
+ path = datasegpath(rlocator, MAIN_FORKNUM, segno);
entry = lookup_filehash_entry(path);
pfree(path);
@@ -718,13 +713,8 @@ isRelDataFile(const char *path)
}
else
{
-<<<<<<< HEAD
nmatch = sscanf(path, "pg_tblspc/%u/"
GP_TABLESPACE_VERSION_DIRECTORY "/%u/%u.%u",
- &rnode.spcNode,
&rnode.dbNode, &rnode.relNode,
-=======
- nmatch = sscanf(path, "pg_tblspc/%u/"
TABLESPACE_VERSION_DIRECTORY "/%u/%u.%u",
&rlocator.spcOid,
&rlocator.dbOid, &rlocator.relNumber,
->>>>>>> REL_16_9
&segNo);
if (nmatch == 3 || nmatch == 4)
matched = true;
diff --git a/src/bin/pg_rewind/filemap.h b/src/bin/pg_rewind/filemap.h
index 05882d9c66c..0bf39d84f32 100644
--- a/src/bin/pg_rewind/filemap.h
+++ b/src/bin/pg_rewind/filemap.h
@@ -115,7 +115,7 @@ extern void process_source_file(const char *path,
file_type_t type,
size_t size,
const char *link_target);
extern void process_target_file(const char *path, file_type_t type,
size_t size,
const char *link_target);
-extern void process_target_wal_aofile_change(RelFileNode rnode,
+extern void process_target_wal_aofile_change(RelFileLocator rlocator,
int segno,
int64 offset);
extern void process_target_wal_block_change(ForkNumber forknum,
diff --git a/src/bin/pg_rewind/parsexlog.c b/src/bin/pg_rewind/parsexlog.c
index aa546a131b2..104834e9a67 100644
--- a/src/bin/pg_rewind/parsexlog.c
+++ b/src/bin/pg_rewind/parsexlog.c
@@ -465,7 +465,6 @@ extractPageInfo(XLogReaderState *record)
"lsn: %X/%X, rmid: %d, rmgr: %s, info: %02X",
LSN_FORMAT_ARGS(record->ReadRecPtr),
rmid, RmgrName(rmid), info);
-<<<<<<< HEAD
}
else if (rmid == RM_APPEND_ONLY_ID)
{
@@ -484,8 +483,6 @@ extractPageInfo(XLogReaderState *record)
* and will copy the missing tail from remote system.
*/
}
-=======
->>>>>>> REL_16_9
}
for (block_id = 0; block_id <= XLogRecMaxBlockId(record); block_id++)
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index d57e66f88e3..5995f625990 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -1276,13 +1276,7 @@ ensureCleanShutdown(const char *argv0)
* since the commands (e.g. create database with template
* DB_FOR_COMMON_ACCESS) would fail.
*/
-<<<<<<< HEAD
-
- snprintf(cmd, MAXCMDLEN, "\"%s\" --single -D \"%s\" %s < %s",
- exec_path, datadir_target, DB_FOR_COMMON_ACCESS,
DEVNULL);
-=======
postgres_cmd = createPQExpBuffer();
->>>>>>> REL_16_9
/* path to postgres, properly quoted */
appendShellString(postgres_cmd, exec_path);
@@ -1299,7 +1293,7 @@ ensureCleanShutdown(const char *argv0)
}
/* finish with the database name, and a properly quoted redirection */
- appendPQExpBufferStr(postgres_cmd, " template1 < ");
+ appendPQExpBufferStr(postgres_cmd, " "DB_FOR_COMMON_ACCESS" < ");
appendShellString(postgres_cmd, DEVNULL);
fflush(NULL);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]