Re: Unresolved repliaction hang and stop problem.

From: Ha Ka <klasahubert(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Lukasz Biegaj <lukasz(dot)biegaj(at)unitygroup(dot)com>, Krzysztof Kois <krzysztof(dot)kois(at)unitygroup(dot)com>
Subject: Re: Unresolved repliaction hang and stop problem.
Date: 2021-08-10 14:45:23
Message-ID: CAKnL6DcrNWj+XxgoDisDQfiPb0EL2L1+c-v8UYNa=qo+fgixhw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

sob., 19 cze 2021 o 12:14 Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> napisał(a):
>
> On Fri, Jun 18, 2021 at 11:22 AM Kyotaro Horiguchi
> <horikyota(dot)ntt(at)gmail(dot)com> wrote:
> >
> > At Thu, 17 Jun 2021 12:56:42 -0400, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote in
> > > On 2021-Jun-17, Kyotaro Horiguchi wrote:
> > >
> > > > I don't see a call to hash_*seq*_search there. Instead, I see one in
> > > > ReorderBufferCheckMemoryLimit().
> > >
> > > Doh, of course -- I misread.
> > >
> > > ReorderBufferCheckMemoryLimit is new in pg13 (cec2edfa7859) so now at
> > > least we have a reason why this workload regresses in pg13 compared to
> > > earlier releases.
> > >
> > > Looking at the code, it does seem that increasing the memory limit as
> > > Amit suggests might solve the issue. Is that a practical workaround?
> >
> > I believe so generally. I'm not sure about the op, though.
> >
> > Just increasing the working memory to certain size would solve the
> > problem. There might be a potential issue that it might be hard like
> > this case for users to find out that the GUC works for their issue (if
> > actually works). pg_stat_replicatoin_slots.spill_count / spill_txns
> > could be a guide for setting logical_decoding_work_mem. Is it worth
> > having additional explanation like that for the GUC variable in the
> > documentation?
> >
>
> I don't see any harm in doing that but note that we can update it only
> for PG-14. The view pg_stat_replicatoin_slots is introduced in PG-14.
>
> --
> With Regards,
> Amit Kapila.

We increased logical_decoding_work_mem for our production database
from 64 to 192 MB and it looks like the issue still persists. The
frequency with which replication hangs has remained the same. Do you
need any additional perf reports after our change?

--
Regards,
Hubert Klasa.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Sabino Mullane 2021-08-10 14:50:20 Re: Avoid stuck of pbgench due to skipped transactions
Previous Message Alvaro Herrera 2021-08-10 14:41:35 Re: Postgres perl module namespace