View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000230 | Pgpool-II | Bug | public | 2016-08-09 11:30 | 2016-08-09 19:29 |
| Reporter | ysobj | Assigned To | t-ishii | ||
| Priority | urgent | Severity | major | Reproducibility | always |
| Status | resolved | Resolution | open | ||
| Product Version | 3.5.1 | ||||
| Target Version | 3.5.4 | ||||
| Summary | 0000230: pgpool does not return result set if the statement fetchSize is smaller than the result row count. | ||||
| Description | pgpool: 3.5.1 postgresql: 9.5.3 pgpool configuration: replication_mode=off, master_slave_mode=on, master_slave_sub_mode='stream' java version: 1.8.0_25 JdbcDriverVersion: 9.4.1209.jre7 pgpool does not return result set if the statement fetchSize is smaller than the result row count. | ||||
| Steps To Reproduce | D:\test>javac -cp postgresql-9.4.1209.jre7.jar Sample.java D:\test>java -cp postgresql-9.4.1209.jre7.jar;. Sample >result.log 2>&1 source code to reproduce this problem is following. --- import java.io.PrintWriter; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; import java.util.Properties; import org.postgresql.Driver; public class Sample { public Sample() { } public static void main(String[] args) throws Exception { Properties props = new Properties(); props.setProperty("user", "test"); props.setProperty("password", "test"); DriverManager.setLogWriter(new PrintWriter(System.out)); Driver.setLogLevel(2); Connection conn = DriverManager.getConnection( "jdbc:postgresql://xxx.xxx.xxx.xxx:9999/test", props); conn.setAutoCommit(false); Statement st = conn.createStatement(); st.setFetchSize(100); ResultSet rs = st.executeQuery("SELECT * from GENERATE_SERIES(1,1000)"); while (rs.next()) { System.out.println(rs.getString(1)); } rs.close(); } } --- This problem is not present in 3.5.0 I think this problem has occured by a changeset a6f15a0 'Fix extended query hangs'. | ||||
| Tags | No tags attached. | ||||
|
|
|
|
|
Good catch. Pgpool-II in streaming replication mode needs to handle when it receives "Portan Suspend" message from backend, so that it waits for input from clients. Attached patch should fix the problem. Can you please try the patch? |
|
|
|
|
|
Thank you. I will try this patch. |
|
|
I tested reproduce code and our product. This patch works fine for me. Thank your quick fixs. Do you have a plan for v3.5.4 release? |
|
|
Yes, we are going to release 3.5.4 by the end of August. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2016-08-09 11:30 | ysobj | New Issue | |
| 2016-08-09 11:30 | ysobj | File Added: result.log | |
| 2016-08-09 14:15 | t-ishii | Assigned To | => t-ishii |
| 2016-08-09 14:15 | t-ishii | Status | new => assigned |
| 2016-08-09 14:15 | t-ishii | Steps to Reproduce Updated | |
| 2016-08-09 17:08 | t-ishii | Note Added: 0000972 | |
| 2016-08-09 17:09 | t-ishii | Note Edited: 0000972 | |
| 2016-08-09 17:09 | t-ishii | File Added: portalsuspend.diff | |
| 2016-08-09 17:09 | t-ishii | Status | assigned => feedback |
| 2016-08-09 17:18 | t-ishii | Target Version | => 3.5.4 |
| 2016-08-09 17:34 | ysobj | Note Added: 0000973 | |
| 2016-08-09 17:34 | ysobj | Status | feedback => assigned |
| 2016-08-09 18:10 | ysobj | Note Added: 0000974 | |
| 2016-08-09 18:13 | t-ishii | Note Added: 0000975 | |
| 2016-08-09 19:29 | t-ishii | Status | assigned => resolved |