From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | bharath(dot)rupireddyforpostgres(at)gmail(dot)com |
Cc: | nathandbossart(at)gmail(dot)com, cary(dot)huang(at)highgo(dot)ca, pgsql-hackers(at)lists(dot)postgresql(dot)org, satyanarlapuram(at)gmail(dot)com |
Subject: | Re: Switching XLog source from archive to streaming when primary available |
Date: | 2022-09-15 08:22:07 |
Message-ID: | 20220915.172207.1940822794018442836.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At Thu, 15 Sep 2022 10:28:12 +0530, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote in
> I'm attaching the v6 patch that's rebased on to the latest HEAD.
> Please consider this for review.
Thaks for the new version!
+#define StreamingReplRetryEnabled() \
+ (streaming_replication_retry_interval > 0 && \
+ StandbyMode && \
+ currentSource == XLOG_FROM_ARCHIVE)
It seems to me a bit too complex..
+ /* Save the timestamp at which we're switching to archive. */
+ if (StreamingReplRetryEnabled())
+ switched_to_archive_at = GetCurrentTimestamp();
Anyway we are going to open a file just after this so
GetCurrentTimestamp() cannot cause a perceptible degradation.
Coulnd't we do that unconditionally, to get rid of the macro?
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro Horiguchi | 2022-09-15 08:30:11 | Re: START_REPLICATION SLOT causing a crash in an assert build |
Previous Message | Nikita Malakhov | 2022-09-15 08:17:42 | Re: Counterintuitive behavior when toast_tuple_target < TOAST_TUPLE_THRESHOLD |