Re: Introduce XID age and inactive timeout based replication slot invalidation

From: Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>
To: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation
Date: 2024-12-13 11:00:27
Message-ID: CABdArM4vBqSbWznvPg5C6m3uEBTVA7+sRhTcpPGhV-YP+uh5bg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Dec 11, 2024 at 8:14 AM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> Hi Nisha.
>
> Here are some review comments for patch v54-0002.
> ======
> src/test/recovery/t/043_invalidate_inactive_slots.pl
>
> 5.
> +# Wait for slot to first become idle and then get invalidated
> +sub wait_for_slot_invalidation
> +{
> + my ($node, $slot, $offset, $idle_timeout) = @_;
> + my $node_name = $node->name;
>
> AFAICT this 'idle_timeout' parameter is passed units of "seconds", so
> it would be better to call it something like 'idle_timeout_s' to make
> the units clear.
>

As per the suggestion in [1], the test has been updated to use
idle_timeout=1ms. Since the parameter uses the default unit of
"milliseconds," keeping it as 'idle_timeout' seems reasonable to me.

> ~~~
>
> 6.
> +# Trigger slot invalidation and confirm it in the server log
> +sub trigger_slot_invalidation
> +{
> + my ($node, $slot, $offset, $idle_timeout) = @_;
> + my $node_name = $node->name;
> + my $invalidated = 0;
>
> Ditto above review comment #5 -- better to call it something like
> 'idle_timeout_s' to make the units clear.
>

The 'idle_timeout' parameter name remains unchanged as explained above.

[1] https://www.postgresql.org/message-id/CALDaNm1FQS04aG0C0gCRpvi-o-OTdq91y6Az34YKN-dVc9r5Ng%40mail.gmail.com

--
Thanks,
Nisha

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2024-12-13 11:04:33 Re: Allow FDW extensions to support MERGE command via CustomScan
Previous Message Nisha Moond 2024-12-13 10:58:58 Re: Introduce XID age and inactive timeout based replication slot invalidation