Re: Switching XLog source from archive to streaming when primary available

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Japin Li <japinli(at)hotmail(dot)com>
Cc: Ian Lawrence Barwick <barwick(at)gmail(dot)com>, Nathan Bossart <nathandbossart(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-02-20 05:40:19
Message-ID: CALj2ACU9O0q_JiGbtjPY4Ue2ax4aFH+x5Htw2nwOXQi0=p4ouQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 19, 2024 at 8:25 PM Japin Li <japinli(at)hotmail(dot)com> wrote:
>
> > Strengthened tests a bit by using recovery_min_apply_delay to mimic
> > standby spending some time fetching from archive. PSA v18 patch.
>
> Here are some minor comments:

Thanks for taking a look at it.

> [1]
> + primary). However, the standby exhausts all the WAL present in pg_wal
>
> s|pg_wal|<filename>pg_wal</filename>|g

Done.

> [2]
> +# Ensure checkpoint doesn't come in our way
> +$primary->append_conf('postgresql.conf', qq(
> + min_wal_size = 2MB
> + max_wal_size = 1GB
> + checkpoint_timeout = 1h
> + autovacuum = off
> +));
>
> Keeping the same indentation might be better.

The autovacuum line looks mis-indented in the patch file. However, I
now ran src/tools/pgindent/perltidyrc
src/test/recovery/t/041_wal_source_switch.pl on it.

Please see the attached v19 patch.

--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v19-0001-Allow-standby-to-switch-WAL-source-from-archive-.patch application/octet-stream 19.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2024-02-20 05:54:53 Re: logical decoding and replication of sequences, take 2
Previous Message David Rowley 2024-02-20 05:38:15 Re: JIT compilation per plan node