From: | sanyam jain <sanyamjain22(at)live(dot)in> |
---|---|
To: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | pgjdbc logical replication client throwing exception |
Date: | 2017-06-23 10:11:32 |
Message-ID: | BM1PR01MB1011AC4D16364BC3795273D8C0D80@BM1PR01MB1011.INDPRD01.PROD.OUTLOOK.COM |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Albe Laurenz | 2017-06-23 10:47:23 | Re: Logical replication: stuck spinlock at ReplicationSlotRelease |
Previous Message | Amit Langote | 2017-06-23 08:59:12 | Re: A bug in mapping attributes in ATExecAttachPartition() |