From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
---|---|
To: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
Cc: | Japin Li <japinli(at)hotmail(dot)com>, Ian Lawrence Barwick <barwick(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Cary Huang <cary(dot)huang(at)highgo(dot)ca>, SATYANARAYANA NARLAPURAM <satyanarlapuram(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Switching XLog source from archive to streaming when primary available |
Date: | 2024-03-06 16:19:26 |
Message-ID: | 20240306161926.GB3542434@nathanxps13 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Mar 06, 2024 at 10:02:43AM +0530, Bharath Rupireddy wrote:
> On Wed, Mar 6, 2024 at 1:22 AM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
>> I was thinking of something more like
>>
>> typedef enum
>> {
>> NO_FORCE_SWITCH_TO_STREAMING, /* no switch necessary */
>> FORCE_SWITCH_TO_STREAMING_PENDING, /* exhausting pg_wal */
>> FORCE_SWITCH_TO_STREAMING, /* switch to streaming now */
>> } WALSourceSwitchState;
>>
>> At least, that illustrates my mental model of the process here. IMHO
>> that's easier to follow than two similarly-named bool variables.
>
> I played with that idea and it came out very nice. Please see the
> attached v22 patch. Note that personally I didn't like "FORCE" being
> there in the names, so I've simplified them a bit.
Thanks. I'd like to spend some time testing this, but from a glance, the
code appears to be in decent shape.
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
From | Date | Subject | |
---|---|---|---|
Next Message | Dean Rasheed | 2024-03-06 16:20:04 | Re: MERGE ... RETURNING |
Previous Message | Nathan Bossart | 2024-03-06 16:10:45 | Re: [PATCH] Exponential backoff for auth_delay |