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

From: John Lumby <johnlumby(at)hotmail(dot)com>
To: David Gould <daveg(at)sonic(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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 21:27:26
Message-ID: COL131-W7F3E0327A94C8B276CFC0A36C0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


> Date: Tue, 19 Apr 2016 12:48:55 -0700
> From: daveg(at)sonic(dot)net
> To: johnlumby(at)hotmail(dot)com
> CC: tgl(at)sss(dot)pgh(dot)pa(dot)us; pgsql-bugs(at)postgresql(dot)org
> Subject: Re: [BUGS] Re: BUG #14098: misleading message "out of shared memory" when lock table space exhausted
>
> On Tue, 19 Apr 2016 13:36:35 -0400
> John Lumby <johnlumby(at)hotmail(dot)com> wrote:
>
>
>> 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.
>
> There are reasons besides locks that can lead to consuming all the allocated
> shared memory. A message that specifically blamed locks would actively mislead
> a user who was trying to diagnose one of the less common cases.

That may well be true,  but in my original bug report I specifically singled out
messages originating from the lock manager which are in fact referring to a failure
to allocate space for a new lock  :

from earlier posting :
_______________________________________________________
If postgresql exhausts the space reserved for locks,
whose size is defined by
max_locks_per_transaction *
 (max_connections + max_prepared_transactions)
locks, then it issues this message :

psql: FATAL: out of shared memory
HINT: You might need to increase max_locks_per_transaction.[ ... ]

I believe all cases of this msg are in
src/backend/storage/lmgr/lock.c_______________________________________________________
Perhaps in view of your comment I should reword this as :

whenever lock manager issues a message relating to failure to
allocate space for a lock , then [ suggestion as before ]

>
> -dg
>
> --
> David Gould daveg(at)sonic(dot)net

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Geoghegan 2016-04-19 23:51:58 Re: BUG #14089: ON CONFLICT allows function variables in index expressions
Previous Message David Gould 2016-04-19 19:48:55 Re: Re: BUG #14098: misleading message "out of shared memory" when lock table space exhausted