Committed updates don't seem to be committed.

From: Frank Kurzawa <fkurzawa(at)topazsoftware(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Committed updates don't seem to be committed.
Date: 2004-06-22 17:24:29
Message-ID: 1087925069.10905.80.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

We are using postgres as the back-end to our webapp which is built with
Jakarta Tomcat, Struts, and Hibernate.

Most of our database-related activity is very simple and so most of our
selects, updates, etc. are not explicitly wrapped in a transaction on
the webapp side.

We are finding that our updates are not appearing in the database. In
particular:

1. If I update from the web-app, then the results of those updates
appear in the webapp until it is restarted (i.e. the database connection
is terminated). After restart, it is as if the updates did not occur.the

2. If I query the database from another tool right after an update from
the webapp I cannot find these changes. The webapp sees these changes at
this point, presumably because it has it cached.

2. BUT, if I look in the postgres log, I can see that postgres is
handling the updates and appears to be committing them:
DEBUG: StartTransactionCommand
LOG: query: update calendar_abstract_task set parent=1145000001,
userID=241, completed='f', completed_date=null, subject=null,
start_date=null, description='A new task' where CTaskTID=1183000000
DEBUG: ProcessQuery
DEBUG: CommitTransactionCommand

3. I thought perhaps that due to some interaction with the webapp, that
when the webapp was stopped that I would find a log entry in which this
update is rolled back, but that is not the case.

4. And I know that the webapp is not simply hoarding these updates and
not passing them on since they are appearing in the postgres log.

So I am confronted with the conundrum that the postgres log seems to be
saying that the update has been successfully committed but the reality
is that it has not been committed.

BTW, our configuration has autocommit=ON.

Thanks in advance,

--
Frank Kurzawa

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message mike g 2004-06-23 03:06:21 Re: Committed updates don't seem to be committed.
Previous Message Bruno Wolff III 2004-06-22 13:57:20 Re: BUG #1176: PHP connection