This is an automated email from the ASF dual-hosted git repository. yjhjstz pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit fc8aab88de647933ea60999d8b8cf54d4f622359 Author: wuchengwen <[email protected]> AuthorDate: Fri Apr 12 17:11:33 2024 +0800 Avoid replay dtx info in checkpoint for newly expanded segments `gpexpand` will create new segment by doing pg_basebackup from coordinator, If the XLOG contains DTX info which we copied from coordinator, gpexpand will failed. --- src/backend/access/transam/xlog.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 3a850556ef..9288ef4b4b 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -8991,8 +8991,13 @@ ReadCheckpointRecord(XLogReaderState *xlogreader, XLogRecPtr RecPtr, * We should be wary of conflating "report" parameter. It is currently * always true when we want to process the extended checkpoint record. * For now this seems fine as it avoids a diff with postgres. + * + * The coordinator may execute write DTX during gpexpand, so the newly + * added segment may contain DTX info in checkpoint XLOG. However, this step + * is useless and should be avoided for segments, or fatal may be thrown since + * max_tm_gxacts is 0 in segments. */ - if (report) + if (report && IS_QUERY_DISPATCHER()) { CheckpointExtendedRecord ckptExtended; UnpackCheckPointRecord(xlogreader, &ckptExtended); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
