Re: more descriptive message for process termination due to max_slot_wal_keep_size

From: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: more descriptive message for process termination due to max_slot_wal_keep_size
Date: 2021-12-14 14:01:21
Message-ID: CAExHW5spqUbAzqgZD3E3+4Gz7pE2HDeXrY1BG5KGpdHeWr0_6g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 14, 2021 at 9:35 AM Kyotaro Horiguchi
<horikyota(dot)ntt(at)gmail(dot)com> wrote:
>
> Hello.
>
> As complained in pgsql-bugs [1], when a process is terminated due to
> max_slot_wal_keep_size, the related messages don't mention the root
> cause for *the termination*. Note that the third message does not
> show for temporary replication slots.
>
> [pid=a] LOG: terminating process x to release replication slot "s"
> [pid=x] LOG: FATAL: terminating connection due to administrator command
> [pid=a] LOG: invalidting slot "s" because its restart_lsn X/X exceeds max_slot_wal_keep_size
>
> The attached patch attaches a DETAIL line to the first message.
>
> > [17605] LOG: terminating process 17614 to release replication slot "s1"
> + [17605] DETAIL: The slot's restart_lsn 0/2C0000A0 exceeds max_slot_wal_keep_size.
> > [17614] FATAL: terminating connection due to administrator command
> > [17605] LOG: invalidating slot "s1" because its restart_lsn 0/2C0000A0 exceeds max_slot_wal_keep_size
>
> Somewhat the second and fourth lines look inconsistent each other but
> that wouldn't be such a problem. I don't think we want to concatenate
> the two lines together as the result is a bit too long.
>
> > LOG: terminating process 17614 to release replication slot "s1" because it's restart_lsn 0/2C0000A0 exceeds max_slot_wal_keep_size.
>
> What do you think about this?

Agree. I think we should also specify the restart_lsn value which
would be within max_slot_wal_keep_size for better understanding.

--
Best Wishes,
Ashutosh Bapat

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mikael Kjellström 2021-12-14 14:05:12 Re: conchuela has some SSL issues
Previous Message Ashutosh Bapat 2021-12-14 13:40:49 Re: Confused comment about drop replica identity index