Re: Introduce XID age and inactive timeout based replication slot invalidation - Mailing list pgsql-hackers

From Nisha Moond
Subject Re: Introduce XID age and inactive timeout based replication slot invalidation
Date
Msg-id CABdArM4vBqSbWznvPg5C6m3uEBTVA7+sRhTcpPGhV-YP+uh5bg@mail.gmail.com
Whole thread Raw
In response to Re: Introduce XID age and inactive timeout based replication slot invalidation  (Peter Smith <smithpb2250@gmail.com>)
List pgsql-hackers
On Wed, Dec 11, 2024 at 8:14 AM Peter Smith <smithpb2250@gmail.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



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [PoC] Reducing planning time when tables have many partitions
Next
From: Alvaro Herrera
Date:
Subject: Re: Allow FDW extensions to support MERGE command via CustomScan