Re: Ye olde drop-the-database-you-just-left problem

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Ye olde drop-the-database-you-just-left problem
Дата
Msg-id 5837.1180546543@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Ye olde drop-the-database-you-just-left problem  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> Tom Lane wrote:
>> AFAICT a "real" fix for this would involve making PQfinish() synchronous
>> (don't return till backend is dead), which doesn't seem like a great
>> idea.  However, it suddenly struck me that we could probably make most
>> of the problem go away if we put that same wait into DROP DATABASE
>> itself --- that is, if we see other backends in the target DB, sleep
>> for a second or two and then recheck before erroring out.

> An option could be to add a PQfinishWait() API call, and have psql use
> this one when passed a special commandline argument (which if I
> understood right this guys "commerercial alternative" had). It might be
> useful in other cases as well, but I can't really think of one right now :-)

The trouble with trying to fix this on the client side is that it's not
fixed unless every client behaves that way (all the time).  Otherwise
we'll still be hearing the same complaints.  "Use this magic little
option on the previous connection" isn't a user-friendly answer.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Style of file error messages
Следующее
От: Brian Hurt
Дата:
Сообщение: Re: Ye olde drop-the-database-you-just-left problem