Re: Disable Transaction - plans ?
От | Mike Mascari |
---|---|
Тема | Re: Disable Transaction - plans ? |
Дата | |
Msg-id | 3BD76761.532AC5D3@mascari.com обсуждение исходный текст |
Ответ на | Re: Disable Transaction - plans ? ("Dominic J. Eidson" <sauron@the-infinite.org>) |
Список | pgsql-general |
Tom Lane wrote: > > Thomas Lockhart <lockhart@fourpalms.org> writes: > > There is a client-side termination handshake, and it could be tied to > > that. If we can distinguish between an intentional exit and an > > unexpected termination, then istm that a commit would be safe to apply > > for the former. > > I assert that we cannot safely determine that; it's too easy for a > client logic error to tell libpq to close the connection at the wrong > time, and we should NOT default to committing when that happens. > > I think a client using this mode should be expected to send an explicit > commit command before exiting. With respect to Oracle, use of the libpq's equivalent to PQFinish(), OCISessionEnd(), implicitly issues a COMMIT before disconnecting, so it appears to be the client's responsibility wrt Oracle. SQL*Plus users will note that, if their SQL*Plus session is exited normally via the QUIT command, their work will also be committed, since it is probably just calling OCISessionEnd() itself. So would it be possible to modify PQFinish() to examine whether autocommit = true, and if so, issue a commit before disconnect, else just disconnect? Mike Mascari mascarm@mascari.com
В списке pgsql-general по дате отправления: