You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudberry.apache.org by Xiaoran Wang <fa...@gmail.com> on 2025/06/19 02:18:03 UTC
Re: [PR] Cherry pick hot standby commits from gpdb [cloudberry]
Actually no. EnableHotStandby only will be true on hot_standby cluster. On
the primary cluster,
it's always false. But the distrib_xid is written to xlog by primary
cluster.
Discussed with Max. We prefer to use a Var , may be named
'enable_distri_xid' , it is like the var '
NEXTGXID', it will be both store in a configure file and xlog. Then it will
be synced to standby
cluster.
The standby cluster will check the variable 'enable_distri_xid', if it's
true, then the cluster
cannot be configured as hot_standby.
How do you think about this idea?
yjhjstz (via GitHub) <gi...@apache.org> 于2025年6月18日周三 23:22写道:
>
> yjhjstz commented on code in PR #1152:
> URL: https://github.com/apache/cloudberry/pull/1152#discussion_r2154899650
>
>
> ##########
> src/backend/access/transam/xact.c:
> ##########
> @@ -6880,8 +6884,8 @@ XactLogCommitRecord(TimestampTz commit_time,
> xl_xact_distrib xl_distrib;
> xl_xact_deldbs xl_deldbs;
> XLogRecPtr recptr;
> - bool isOnePhaseQE = (Gp_role == GP_ROLE_EXECUTE &&
> MyTmGxactLocal->isOnePhaseCommit);
> bool isDtxPrepared = isPreparedDtxTransaction();
> + DistributedTransactionId distrib_xid =
> getDistributedTransactionId();
>
> Review Comment:
> can we use `EnableHotStandby` to control distrib_xid usage ?
>
>
>
> --
> This is an automated message from the Apache Git Service.
> To respond to the message, please log on to GitHub and use the
> URL above to go to the specific comment.
>
> To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
>
> For queries about this service, please contact Infrastructure at:
> users@infra.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
> For additional commands, e-mail: commits-help@cloudberry.apache.org
>
>
--
Best regards !
Xiaoran Wang