Re: [BUG] Crash on pgbench initialization.

From: Andres Freund <andres(at)anarazel(dot)de>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, "Anton A(dot) Melnikov" <aamelnikov(at)inbox(dot)ru>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [BUG] Crash on pgbench initialization.
Date: 2023-07-24 16:42:44
Message-ID: 20230724164244.ienyejmrk6jsovr6@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2023-07-24 15:54:33 +0200, Alvaro Herrera wrote:
> On 2023-Jul-24, Michael Paquier wrote:
>
> > On Sun, Jul 23, 2023 at 11:21:47PM +0300, Anton A. Melnikov wrote:
> > > After some research, found this happens when the LimitAdditionalPins() returns exactly zero.
> > > In the current master, this will happen e.g. if shared_buffers = 10MB and max_worker_processes = 40.
> > > Then the command "pgbench --initialize postgres" will lead to crash.
> > > See the backtrace attached.
> > >
> > > There is a fix in the patch applied. Please take a look on it.
> >
> > Nice catch, issue reproduced here so I am adding an open item for now.
> > (I have not looked at the patch, yet.)
>
> Hmm, I see that all this code was added by 31966b151e6a, which makes
> this Andres' item. I see Michael marked it as such in the open items
> page, but did not CC Andres, so I'm doing that here now.

Thanks - I had indeed not seen this. I can't really keep up with the list at
all times...

> I don't know this code at all, but I hope that this can be solved with
> just Anton's proposed patch.

Yes, it's just that off-by-one. I need to check if there's a similar bug for
local / temp table buffers though.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gurjeet Singh 2023-07-24 17:00:06 Re: psql not responding to SIGINT upon db reconnection
Previous Message Alvaro Herrera 2023-07-24 16:42:28 Re: cataloguing NOT NULL constraints