Re: BUG #6497: Error sent to client, but data written anyway

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #6497: Error sent to client, but data written anyway
Дата
Msg-id 23519.1330465109@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #6497: Error sent to client, but data written anyway  (rlowe@pablowe.net)
Ответы Re: BUG #6497: Error sent to client, but data written anyway  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-bugs
rlowe@pablowe.net writes:
> There is an edge case where Postgres will return an error to the client, but
> commit the operation anyway, thus breaking the contract with the client:

> postgres=# begin; insert into s.t (c) values (1);
> <postgres process core dumps (note that the forked processes were not
> affected)>
> postgres=# commit;
> <this returns an error to the application>
> <postgress process restarts>
> The data is now on both the master and slave, but the application
> believes that the transaction was rolled back.  A well-behaved
> application will dutifully retry the transaction because it *should*
> have rolled back.  However, the data is there so we'll have had the
> transaction execute *twice*.

Huh?  If the backend dumped core before you sent it the commit, the
data will certainly not be committed.  It might be physically present on
disk, but it won't be considered valid.

            regards, tom lane

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

Предыдущее
От: rlowe@pablowe.net
Дата:
Сообщение: BUG #6497: Error sent to client, but data written anyway
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #6496: Why the SQL is not reported as incorrect? Is there a builtin column named "name"?