| From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
|---|---|
| To: | vignesh C <vignesh21(at)gmail(dot)com> |
| Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: POC: enable logical decoding when wal_level = 'replica' without a server restart |
| Date: | 2025-12-02 16:00:08 |
| Message-ID: | CAD21AoAFWTH_r6+atzze2kBWvaHpWuuPi3EKS3vP-y34Pji31Q@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Dec 2, 2025 at 2:53 AM vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> On Mon, 1 Dec 2025 at 12:33, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> >
> > On Mon, Dec 1, 2025 at 12:20 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> >
> > I've attached the patch. All the comments I got so far have been
> > addressed in this version unless I'm missing something.
>
> Few comments:
> 1) We have an invalidation test at 044_invalidate_inactive_slots.pl
> which does an equivalent of this, I felt this can be removed and just
> the test_wal_level can be done from 044_invalidate_inactive_slots:
While 044_invalidate_inactive_slots.pl is not executed without
injection points, the test in 050_effective_wal_level.pl should be
doable without injection points. If we remove the test from
050_effective_wal_level.pl, we cannot cover the corresponding path
without injection points.
> 2) What are we verifying here, as a logical replication slot can be
> created without promotion too:
> # Confirm if we can create a logical slot after the promotion.
> $standby1->safe_psql('postgres',
> qq[select pg_create_logical_replication_slot('standby1_slot2', 'pgoutput')]
> );
>
> If it is not required we can remove it.
I think that this test case verifies that logical decoding is enabled
at the end of recovery (i.e., promotion) and we can create a logical
replication slot.
>
> 3) This message seems wrong:
> + "cannot server with wal_level='minimal' as there is in-use
> logical slot");
> +
> +my $logfile = slurp_file($primary->logfile());
>
> Should it be:
> cannot start server with wal_level='minimal'
Agreed. Fixed in the next version patch.
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Mihail Nikalayeu | 2025-12-02 16:04:39 | Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY |
| Previous Message | Álvaro Herrera | 2025-12-02 15:51:59 | Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY |