Re: more descriptive message for process termination due to max_slot_wal_keep_size

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: bdrouvot(at)amazon(dot)com, sawada(dot)mshk(at)gmail(dot)com, ashutosh(dot)bapat(dot)oss(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: more descriptive message for process termination due to max_slot_wal_keep_size
Date: 2022-09-29 05:27:53
Message-ID: 20220929.142753.315697893156649963.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Wed, 28 Sep 2022 16:30:37 -0400, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote in
> Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> writes:
> > Okay. the points you brought up above are sufficient grounds for not
> > doing so. Now they are in the following format.
>
> > LOG: terminating process 16034 to release replication slot "rep1"
> > because its restart_lsn 0/3158000 exceeds the limit by 15368192 bytes
>
> This seems to me to be a pretty blatant violation of our first message
> style guideline [1]:

Thanks! It seems that I was waiting for a comment on that line. I
thought that way at first but finally returned to the current message
as the result of discussion (in my memory). I will happily make the
main message shorter.

> I think you should leave the primary message alone and add a DETAIL,
> as the first version of the patch did.
>
> The existing "invalidating slot" message is already in violation
> of this guideline, so splitting off a DETAIL from that seems
> indicated as well.

So I'm going to change the mssage as:

LOG: terminating process %d to release replication slot \"%s\"
DETAIL: The slot's restart_lsn %X/%X exceeds the limit by %lld bytes.
HINT: You might need to increase max_slot_wal_keep_size.

LOG: invalidating *replication* slot \"%s\"
DETAILS: (ditto)
HINTS: (ditto)

It seems that it's no longer useful to split out the first patch so I
merged them into one.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
v8-0001-Make-a-message-on-process-termination-more-dscrip.patch text/x-patch 3.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2022-09-29 05:30:31 Re: Reducing the chunk header sizes on all memory context types
Previous Message Peter Geoghegan 2022-09-29 05:13:06 Re: A potential memory leak on Merge Join when Sort node is not below Materialize node