Обсуждение: debug logs: query: rollback

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

debug logs: query: rollback

От
Bob Parkinson
Дата:
(With 7.0.3, going to 1.1 RSN'ish.)

I've just stared looking at logs and I'm getting lines in the log:

query: rollback

does this mean that a transaction has failed? I'm not seeing any other
error messages (mind you, I need to check my scripts and see what they
are loggingas errors).



usr/local/pgsql/bin/postmaster: reaping dead processes...
/usr/local/pgsql/bin/postmaster: CleanupProc: pid 13874 exited with status 0
CommitTransactionCommand
StartTransactionCommand
query: rollback
ProcessUtility: rollback
CommitTransactionCommand
StartTransactionCommand
query: begin
ProcessUtility: begin
CommitTransactionCommand
StartTransactionCommand
query: rollback
ProcessUtility: rollback
CommitTransactionCommand
proc_exit(0)
shmem_exit(0)
exit(0)

Cheers

Bob Parkinson
rwp@biome.ac.uk
------------------------------------------------------------------
Technical Manager:         Biome             http://biome.ac.uk/

Greenfield Medical Library,
Queens Medical Centre,
Nottingham.                          0115 9249924 x 42059
------------------------------------------------------------------
                        We are stardust


Re: debug logs: query: rollback

От
jdassen@cistron.nl (J.H.M. Dassen (Ray))
Дата:
Bob Parkinson <rwp@biome.ac.uk> wrote:
>query: rollback
>
>does this mean that a transaction has failed?

Indeed.

>I'm not seeing any other error messages

A rollback need not be the result of the backend raising an error. It can
also be triggered deliberately by your code that talks to the backend.

>(mind you, I need to check my scripts and see what they are loggingas
>errors).

And check that their transaction behaviour is what you intended. E.g. for
Perl's DBI, note what DBI(3pm) says about this:
:The transaction behavior of the `disconnect' method is, sadly,
:undefined. Some database systems (such as Oracle and Ingres) will
:automatically commit any out­ standing changes, but others (such as
:Informix) will rollback any outstanding changes. Applications not using
:`AutoCommit' should explicitly call `commit' or `rollback' before calling
:`disconnect'.

HTH,
Ray
--
No longer will we mistake music for a noun, as its containers have tempted
us to do for a century. We will realize once more that music is a verb, a
relationship, a constantly evolving life form.
    John Perry Barlow in http://technocrat.net/958163435/index_html