Re: pgpool master or slave goes down java access error - Mailing list pgsql-performance

From Waldo Nell
Subject Re: pgpool master or slave goes down java access error
Date
Msg-id DD70E845-3460-475F-815D-E1C883B49459@telkomsa.net
Whole thread Raw
In response to pgpool master or slave goes down java access error  (jenopob <jenopob@126.com>)
List pgsql-performance
On 2011-08-12, at 03:58 , jenopob wrote:

>
>     I do some db falt tests
>     1)the test code run always connect pgpool,
>     2)test master or slave go down
>
>     but when mster or slave go down ,java code throws exception :
>
>     org.postgresql.util.PSQLException: An I/O error occurred while sending to
> the backend
>     org.postgresql.util.PSQLException: The connection attempt failed.
>
>     the error happened once for little time,then goes normal.
>
> what should I do to solve this problem?and show the reason about the matter.

I do not know much about pgpool but it sounds to me like the TCP connection is broken, and threads die and new threads
makenew connections they start working again.  If I understand you correctly, you need to write code that detects this
IOExceptionand then retries the connection attempt and re-execute the query. 

pgsql-performance by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Recommended optimisations slows down PostgreSQL 8.4
Next
From: Merlin Moncure
Date:
Subject: Re: Streaming replication performance