Обсуждение: [HACKERS] pgjdbc logical replication client throwing exception

Поиск
Список
Период
Сортировка

[HACKERS] pgjdbc logical replication client throwing exception

От
sanyam jain
Дата:

Hi,

I'm trying to create something like pg_recvlogical.c in java using pgjdbc.Its working for small transactions but when i do a big transaction client throws below exception:



org.postgresql.util.PSQLException: Database connection failed when reading from copy
at org.postgresql.core.v3.QueryExecutorImpl.readFromCopy(QueryExecutorImpl.java:1028)
at org.postgresql.core.v3.CopyDualImpl.readFromCopy(CopyDualImpl.java:41)
at org.postgresql.core.v3.replication.V3PGReplicationStream.receiveNextData(V3PGReplicationStream.java:150)
at org.postgresql.core.v3.replication.V3PGReplicationStream.readInternal(V3PGReplicationStream.java:119)
at org.postgresql.core.v3.replication.V3PGReplicationStream.readPending(V3PGReplicationStream.java:73)
at XLogApplier.main(XLogApplier.java:63)
Caused by: java.net.SocketException: Socket closed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:140)
at org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:109)
at org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:191)
at org.postgresql.core.PGStream.receive(PGStream.java:495)
at org.postgresql.core.PGStream.receive(PGStream.java:479)
at org.postgresql.core.v3.QueryExecutorImpl.processCopyResults(QueryExecutorImpl.java:1161)
at org.postgresql.core.v3.QueryExecutorImpl.readFromCopy(QueryExecutorImpl.java:1026)
... 5 more


PG Server reports a broken pipe.
Can someone please tell what can be wrong?Its happening only when i add millions of rows.

Thanks,
Sanyam Jain

Re: [HACKERS] pgjdbc logical replication client throwing exception

От
Peter Eisentraut
Дата:
On 6/23/17 06:11, sanyam jain wrote:
> I'm trying to create something like pg_recvlogical.c in java using
> pgjdbc.Its working for small transactions but when i do a big
> transaction client throws below exception:

What does the server log say?  If nothing interesting, turn up debugging.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Re: [HACKERS] pgjdbc logical replication client throwing exception

От
sanyam jain
Дата:

Hi,


>What does the server log say?  If nothing interesting, turn up debugging.

I receive the following Log on server
LOG:  could not send data to client: Broken pipe

Thanks,
Sanyam Jain

Re: [HACKERS] pgjdbc logical replication client throwing exception

От
sanyam jain
Дата:

Hi,

I suspect its happening because of delay in status update by client but even after trying forceUpdateStatus its quitting prematurely.


Thanks,

Sanyam Jain


From: sanyam jain <sanyamjain22@live.in>
Sent: Tuesday, June 27, 2017 6:47:55 AM
To: Peter Eisentraut; Pg Hackers
Subject: Re: [HACKERS] pgjdbc logical replication client throwing exception
 

Hi,


>What does the server log say?  If nothing interesting, turn up debugging.

I receive the following Log on server
LOG:  could not send data to client: Broken pipe

Thanks,
Sanyam Jain

Re: [HACKERS] pgjdbc logical replication client throwing exception

От
dipesh
Дата:
Hi,

I am also facing the same issue. Have you solved the problem?
Could you please guide me how to deal with it.

Thanks,
Dipesh



--
Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html