RE: PostgreSQL and Unicode

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: rmager(at)vgkk(dot)co(dot)jp
Cc: ishii(at)postgresql(dot)org, hackers(at)postgresql(dot)org
Subject: RE: PostgreSQL and Unicode
Date: 2000-05-16 09:30:48
Message-ID: 20000516183048I.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Regarding the "postmaster processes not going away" problem...
>
> We're developing a Java application that connects to a PostgreSQL db. During
> our development process we debug the code and sometimes kill the program in
> the middle of the run. Sometimes this means that an open Connection to the
> database is not properly closed. Now, I realize that this is an unfriendly
> thing to do to PG but I would think it would eventually recover. What
> happens instead is that the postmaster/postgres process that was handling
> that connection never terminates. I have seen processes that are more than 2
> weeks old before we noticed and restarted postmaster manually.
>
> The problem is that eventually PG runs out of connections and stops allowing
> new ones.
>
> So, is there a way to tell PG to timeout unused connections after some
> specified time? I've looked through all the docs and could not find anything
> like this. I realize that this is a difficult issue because if there is an
> unresolved transaction what do you do with it. I guess all you could do is
> roll it back.
>
> Any other suggestions? If not, can I request this as a future feature?
> Although our problems are happening during debugging, they could happen
> during deployment given a hardware problem or, *gasp*, a bug in our code.

What about adding KEEPALIVE option to the socket? This would take a
while to detect orphaned socket, though.
--
Tatsuo Ishii

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Patrick Welche 2000-05-16 09:42:05 Re: reading row in backend
Previous Message Dave Page 2000-05-16 09:17:21 ODBC & v7.0(Rel) Errors with Users and Databases