It looks like I have a serious problem here.
I have AOLserver 3.2, OpenACS 3.2.4 and PostgresQL 7.0.3
installed and running. Everything works fine, except when I
replicate a "double-click" event. I'll describe the situation: I decide
to insert a new item (any item that has a unique column in the
database - a user, a bboard topic, a general-comment, almost
anything). I fill out the forms, submit, confirm - everything goes
well. Then I click the "back" button in my browser. The "confirm"
page, or previous form page in the absence of a confirm page, is
displayed, but not reloaded, because my browser loaded it from
cache.
IMPORTANT: This confirm or form page has already
generated a "unique" primary key from the sequence, so I'm
trying to reuse a primary key. In some cases, such as in
general-comments, I back up twice, to get to the page that
actually generates the primary key. This page is also loaded
from cache.
When I hit "submit," AOLserver hangs. PostgreSQL stays
happy and alive. In my postgresql /var/log/ file I get an "ERROR:
Cannot insert a duplicate key into unique index users_pkey" (or
whichever unique btree it couldn't insert into). In my server.log
(for AOLserver) is a message like this:
[17/Dec/2000:17:52:57][18836.6149][-conn1-] Error:
There is no newline at the end of this message. AOLserver
seems to have hung while trying to write the message (I'm not
guessing that the actual writing of the message was what hung
AOLserver). It obviously has sent the query to postgres, but I
don't know if it's having problems receiving an error message
from postgres, throwing an exception, catching that exception, or
what.
Summary: anytime I try to insert a new row with the
same primary key as an existing row, PostgreSQL simply rejects
it, and AOLserver hangs.
PLEASE, if anyone has any suggestions, help! I'm already
two days past deadline on this project, and I'm at my wit's end.