Re: Minimal logical decoding on standbys

From: "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Jeff Davis <pgsql(at)j-davis(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com>, Amit Khandekar <amitdkhan(dot)pg(at)gmail(dot)com>, fabriziomello(at)gmail(dot)com, tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>, Rahila Syed <rahila(dot)syed(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Minimal logical decoding on standbys
Date: 2023-04-07 05:02:45
Message-ID: 21171014-e953-6124-29c0-9d1dbe756b3f@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 4/7/23 5:47 AM, Amit Kapila wrote:
> On Thu, Apr 6, 2023 at 7:50 PM Drouvot, Bertrand
> <bertranddrouvot(dot)pg(at)gmail(dot)com> wrote:
>>
>> Thanks! Will update 0005.
>>
>
> I noticed a few typos in the latest patches.
>
> 0004
> 1.
> + * Physical walsenders don't need to be wakon up during replay unless
>
> Typo.

Thanks! Fixed in V63 just posted up-thread.

>
> 0005
> 2.
> +# Check if all the slots on standby are dropped. These include the 'activeslot'
> +# that was acquired by make_slot_active(), and the non-active 'inactiveslot'.
> +sub check_slots_dropped
> +{
> + my ($slot_user_handle) = @_;
> +
> + is($node_standby->slot('inactiveslot')->{'slot_type'}, '',
> 'inactiveslot on standby dropped');
> + is($node_standby->slot('activeslot')->{'slot_type'}, '', 'activeslot
> on standby dropped');
> +
> + check_pg_recvlogical_stderr($slot_user_handle, "conflict with recovery");
> +}
> +
> +# Check if all the slots on standby are dropped. These include the 'activeslot'
> +# that was acquired by make_slot_active(), and the non-active 'inactiveslot'.
> +sub change_hot_standby_feedback_and_wait_for_xmins
> +{
> + my ($hsf, $invalidated) = @_;
> +
> + $node_standby->append_conf('postgresql.conf',qq[
> + hot_standby_feedback = $hsf
> + ]);
> +
> + $node_standby->reload;
> +
> + if ($hsf && $invalidated)
> + {
> ...
>
> The comment above change_hot_standby_feedback_and_wait_for_xmins seems
> to be wrong. It seems to be copied from the previous test.
>

Good catch! Fixed in V63.

> 3.
> +# Verify that pg_stat_database_conflicts.confl_active_logicalslot has
> been updated
> +# we now expect 3 conflicts reported as the counter persist across reloads
> +ok( $node_standby->poll_query_until(
> + 'postgres',
> + "select (confl_active_logicalslot = 4) from
> pg_stat_database_conflicts where datname = 'testdb'", 't'),
> + 'confl_active_logicalslot updated') or die "Timed out waiting
> confl_active_logicalslot to be updated";
>
> The comment incorrectly mentions 3 conflicts whereas the query expects 4.
>

Good catch, fixed in v63.

Regards,

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2023-04-07 05:28:11 Re: CREATE SUBSCRIPTION -- add missing tab-completes
Previous Message Drouvot, Bertrand 2023-04-07 05:02:04 Re: Minimal logical decoding on standbys