Re: [JDBC] [ADMIN] Missing documentation for error code: 80S01

Поиск
Список
Период
Сортировка
Искать

Re: [JDBC] [ADMIN] Missing documentation for error code: 80S01

От:
"Donald Fraser" <postgres@kiwi-fraser.net>
Дата:

From: "Oliver Jowett" 
> If the server is shut down mid-query, doesn't the backend complete the
> current query cycle before closing the connection?
> i.e. we'd see ErrorResponse, ReadyForQuery, and return control to the
> app before seeing EOF anyway?
> The protocol spec is a bit vague there.

From an observation perspective only: It would seem that in the case where 
the server is shut down gracefully yes, however in the case where the server 
has either crashed or the connection terminated un-gracefully via software 
control (for example a C funcion: elog(FATAL, "Terminating connection...");) 
then no.

Donald 

Re: [JDBC] [ADMIN] Missing documentation for error code: 80S01

От:
Robert Haas <robertmhaas@gmail.com>
Дата:
On Wed, Apr 13, 2011 at 6:52 AM, Donald Fraser  wrote:
>> If the server is shut down mid-query, doesn't the backend complete the
>> current query cycle before closing the connection?
>> i.e. we'd see ErrorResponse, ReadyForQuery, and return control to the
>> app before seeing EOF anyway?
>> The protocol spec is a bit vague there.
>
> From an observation perspective only: It would seem that in the case where
> the server is shut down gracefully yes, however in the case where the server
> has either crashed or the connection terminated un-gracefully via software
> control (for example a C funcion: elog(FATAL, "Terminating connection...");)
> then no.

A smart shutdown waits for clients to exit on their own.  A fast or
immediate shutdown kills them immediately, even mid-query.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
FAQ