Re: Re: BUG #14098: misleading message "out of shared memory" when lock table space exhausted

From: John Lumby <johnlumby(at)hotmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Re: BUG #14098: misleading message "out of shared memory" when lock table space exhausted
Date: 2016-04-19 17:36:35
Message-ID: COL131-W405057C2F06E60349A8B33A36C0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


> From: tgl(at)sss(dot)pgh(dot)pa(dot)us
> To: johnlumby(at)hotmail(dot)com
> CC: pgsql-bugs(at)postgresql(dot)org
> Subject: Re: [BUGS] Re: BUG #14098: misleading message "out of shared memory" when lock table space exhausted
> Date: Tue, 19 Apr 2016 12:42:47 -0400
>
> John Lumby <johnlumby(at)hotmail(dot)com> writes:
>> Firstly, the documentation (Server Configuration, Lock Management) is very clear :
>
> You're mistaking a guarantee for a hard limit.
>
> What actually happens is that enough shared memory is reserved for at
> least max_locks_per_transaction * (max_connections +
> max_prepared_transactions) lock entries, plus a bunch of unrelated stuff,

I see ,  thanks for explaining.

> I'm not sure if that documentation wording needs improvement or not.

On reflection,  I would still suggest to change the wording of the error message,
not the documentation.

I now see that as you've explained,  the words     
            out of shared memory
are not wrong.   However,   I think it may be more helpful to change them to          
           lock table space is exhausted
as I previously suggested.
The reason being that ,  for most people,  intuitively,  telling them
    " out of shared memory "
would indicate to try to *reduce* the consumption of this resource,
whereas the hint tells them  to *increase* something.
I think there is a clearer connection between insufficient lock table space
and increasing max_locks_per_transaction.

The documentation is also not wrong but it is conservative
and leads to the admin doing the right thing,
so I would leave that as is.

Cheers,   John

> regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David Gould 2016-04-19 19:48:55 Re: Re: BUG #14098: misleading message "out of shared memory" when lock table space exhausted
Previous Message Tom Lane 2016-04-19 16:42:47 Re: Re: BUG #14098: misleading message "out of shared memory" when lock table space exhausted