View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000328 | Pgpool-II | Bug | public | 2017-08-11 15:30 | 2017-08-14 13:39 |
| Reporter | a.dushechkin | Assigned To | t-ishii | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | reopened | ||
| Platform | Linux | OS | Ubuntu | OS Version | 14.04 |
| Product Version | 3.6.5 | ||||
| Target Version | 3.6.6 | ||||
| Summary | 0000328: Malformed packet in response to simple query containing only '-- comment' | ||||
| Description | PostgreSQL 9.6.3, pg_dump/pg_restore 9.6.3, 9.6.4. If one takes DB backup with command: pg_dump -h $dbHost -p $dbPort -U $dbUser -d $dbName -F c -b -f $destination/$dumpname and then restores it via pgpool with command: pg_restore -n public -x -U $dbUser -p $dbPort -h $dbHost --no-owner --role=$dbUser -d $dbName $destination/$dumpname restore process outputs multiple warnings and overall return code 1, which breaks automated processes. Warnings are like: pg_restore: [archiver (db)] could not execute query: message contents do not agree with length in message type "C" Command was: -- Dumped by pg_dump version 9.6.3 There is no such issue when restoring dump directly to PostgreSQL. On the wire if connected to PostgreSQL directly: --> Simple query (0x51) <-- Empty query (0x49) length 4 <-- Ready for query (0x5a), length 5, status Idle (0x49) if connected via pgpool2: --> Simple query (0x51) <-- Command completion (0x43) length 4 <-- Ready for query (0x5a) of length 5, status Idle (0x49) Also reproduced on 3.6.4, not reproduced with extended query mode (JDBC) or with psql (I believe psql just ignores comments). | ||||
| Steps To Reproduce | Send simple query containing only comment, like "-- comment". | ||||
| Tags | No tags attached. | ||||
|
|
Good catch. Since psql ignores a comment only query, I did not notice it. Can you please try attached patch? |
|
|
Yes, the attached patch fixes the issue for me. Thank you. |
|
|
Thank you for testing. The patch has been committed/pushed to 3.6 and 3.5 stable trees (only those versions are affected by the bug). The issue resolved now. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2017-08-11 15:30 | a.dushechkin | New Issue | |
| 2017-08-11 19:37 | t-ishii | Assigned To | => t-ishii |
| 2017-08-11 19:37 | t-ishii | Status | new => assigned |
| 2017-08-11 19:40 | t-ishii | File Added: empty-query.diff | |
| 2017-08-11 19:40 | t-ishii | Note Added: 0001641 | |
| 2017-08-11 19:41 | t-ishii | Status | assigned => resolved |
| 2017-08-11 19:41 | t-ishii | Target Version | => 3.6.6 |
| 2017-08-11 19:43 | administrator | Status | resolved => feedback |
| 2017-08-11 19:43 | administrator | Resolution | open => reopened |
| 2017-08-14 13:23 | a.dushechkin | Note Added: 0001648 | |
| 2017-08-14 13:23 | a.dushechkin | Status | feedback => assigned |
| 2017-08-14 13:38 | t-ishii | Note Added: 0001649 | |
| 2017-08-14 13:39 | t-ishii | Status | assigned => resolved |