On Wed, 16 Aug 2000, Jimmy Wu wrote:
> Hello,
>
> My name is Jimmy Wu. I work for a startup company called eServ. Our OS is
> FreeBSD, web server is Apache, and I use PHP to write some web application
> accessing PostgreSQL database(Version 7.0.2).
> I have some questions:
> 1. I explicitly locked a table and the program somehow crashed. Then that
> post process just sitting there never return the lock. How can I prevent
> this from happening?
Which program crashed? The php application? I'm guessing from the
following thing of the postgres process sitting there, it didn't.
Well, if the postgres process crashed (or maybe if you can SIGSEGV it in
that state), you hopefully will get a core you can back trace. Also,
do your backend logs have any warning or error messages from before it
occurred?
> 2. After the crash, I don't why...there are two duplicate rows in that
> table. This should never happen since there are primary keys.
Did the session that crashed insert a value into the table?