Re: Replication slot stats misgivings

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: Replication slot stats misgivings
Date: 2021-04-05 07:14:06
Message-ID: CALj2ACWdLJiS8FOKcW+p5iTxQQspDYbxOoPSgsP9K_avtrF48A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Apr 3, 2021 at 11:12 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> Here pg_stat_replication_slots will not have enought slots. I changed
> it to below:
> errmsg("skipping \"%s\" replication slot statistics as
> pg_stat_replication_slots does not have enough slots"
> Thoughts?

WFM.

> > 3) Should we change the if condition to max_replication_slots <=
> > nReplSlotStats instead of max_replication_slots == nReplSlotStats? In
> > the scenario, it is mentioned that "one of the replication slots is
> > dropped", will this issue occur when multiple replication slots are
> > dropped?
> >
>
> I felt it should be max_replication_slots == nReplSlotStats, if
> max_replication_slots = 5, we will be able to store 5 replication slot
> statistics from 0,1..4, from 5th we will not have space. I think this
> need not be changed.

I'm not sure whether we can have a situation where
max_replication_slots < nReplSlotStats i.e. max_replication_slots
getting set to lesser than nReplSlotStats. I think I didn't get the
above mentioned scenario i.e. max_replication_slots == nReplSlotStats
correctly. It will be great if you could throw some light on that
scenario and ensure that it's not possible to reach a situation where
max_replication_slots < nReplSlotStats.

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Maxim Orlov 2021-04-05 07:30:01 Re: Failed assertion on standby while shutdown
Previous Message Kyotaro Horiguchi 2021-04-05 07:13:27 Re: Stronger safeguard for archive recovery not to miss data