Re: Assertion failure with summarize_wal enabled during pg_createsubscriber

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Assertion failure with summarize_wal enabled during pg_createsubscriber
Date: 2024-07-26 20:10:29
Message-ID: CAPpHfduW3du0W=3noztdaJ6evGP9gqT1AGk_rwXrqDyus1zZoQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 26, 2024 at 7:02 PM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Fri, Jul 26, 2024 at 11:51 AM Nathan Bossart
> <nathandbossart(at)gmail(dot)com> wrote:
> > nitpick: I think this one needs a pgindent.
>
> Ugh, sorry. I thought of that while I was working on the commit but
> then I messed up some other aspect of it and this went out of my head.
>
> Fixed now, I hope.

0002 could also use pg_indent and pgperltidy. And I have couple other
notes regarding 0002.

> In the process of fixing these bugs, I realized that the logic to wait
> for WAL summarization to catch up was spread out in a way that made
> it difficult to reuse properly, so this code refactors things to make
> it easier.

It would be nice to split refactoring out of material logic changed.
This way it would be easier to review and would look cleaner in the
git history.

> To make this fix work, also teach the WAL summarizer that after a
> promotion has occurred, no more WAL can appear on the previous
> timeline: previously, the WAL summarizer wouldn't switch to the new
> timeline until we actually started writing WAL there, but that meant
> that when the startup process was waiting for the WAL summarizer, it
> was waiting for an action that the summarizer wasn't yet prepared to
> take.

I think this is a pretty long sentence, and I'm not sure I can
understand it correctly. Does startup process wait for the WAL
summarizer without this patch? If not, it's not clear for me that
word "previously" doesn't distribute to this part of sentence.
Breaking this into multiple sentences could improve the clarity for
me.

------
Regards,
Alexander Korotkov
Supabase

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2024-07-26 20:13:41 Re: Incremental backup from a streaming replication standby fails
Previous Message Tom Lane 2024-07-26 20:05:50 Re: pg_upgrade failing for 200+ million Large Objects