Re: [bugfix] DISCARD ALL does not release advisory locks

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: [bugfix] DISCARD ALL does not release advisory locks
Дата
Msg-id 87iqqapag2.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответ на Re: [bugfix] DISCARD ALL does not release advisory locks  ("Merlin Moncure" <mmoncure@gmail.com>)
Ответы Re: [bugfix] DISCARD ALL does not release advisory locks  ("Guillaume Smet" <guillaume.smet@gmail.com>)
Re: [bugfix] DISCARD ALL does not release advisory locks  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
"Merlin Moncure" <mmoncure@gmail.com> writes:

> On Wed, Nov 26, 2008 at 11:06 AM, Marko Kreen <markokr@gmail.com> wrote:
>>
>> I think this should be back-patched as well:
>>
>> - The fact that disconnect will clean up used resources has been
>>  always true, thus most clients assume at some level.
>>
>> - DISCARD ALL was new feature in 8.3.  It is highly doubtful some
>>  adv-locks using project has managed to hard-code dependency on
>>  buggy behaviour of DISCARD.
>>
>> - The bug was reported by regular user who encountered deadlocks
>>  on 8.3 because of it.
>
> I see your point but there's a pretty high standard for changing
> existing behavior in bugfix releases. It's just as likely to introduce
> an application bug as to fix one...suppose the application is using
> both 'discard all' for prepared statements and advisory locks for
> other purposes.  You could break that application.

DISCARD ALL was specifically added in 8.3 for the purpose of connection
poolers to be a "big hammer" that exactly emulates a new session. I'm somewhat
skeptical that there are any applications using it directly at all, and doubly
so that they would be using it and expecting advisory locks to persist.

I think the second and third points are pretty convincing.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production
Tuning


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Robert Haas"
Дата:
Сообщение: Re: [bugfix] DISCARD ALL does not release advisory locks
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Comments to Synchronous replication patch v3