View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000444 | Pgpool-II | Bug | public | 2018-11-13 00:35 | 2018-11-26 14:28 |
| Reporter | pensnarik | Assigned To | hoshiai | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | 3.7.6 | ||||
| Target Version | 3.7.7 | Fixed in Version | 3.7.7 | ||
| Summary | 0000444: pgpool does not take into account parameters order in startup packet | ||||
| Description | During comparison startup packets in function get_backend_connection() pgpool ignores parameter order. Since order is not defined in the PostgreSQL protocol it may cause problems for clients who implements the protocols by itself. For instance, golang PostgreSQL driver pq (https://github.com/lib/pq). As a consequence of this applications that use go pq library are not able to take advantage of pgpool connection caching. Possible solutions are: 1) Sort or normalize parameters in startup packets during connection initialization 2) Compare startup packets regardless of parameter order Link to the discussion in the mailing list: https://www.pgpool.net/pipermail/pgpool-general/2018-November/006327.html | ||||
| Steps To Reproduce | 1) Write test application in golang which uses go pq library and connects to database with name different from template0, template1, postgres, regression. 2) Enable connection pooling in pg_pool 3) Observe in error log (with debug level > 0) messages "connection exists but startup packet contents is not identical" for each client connection | ||||
| Tags | connection cache, go, pgpool-II | ||||
|
|
I confirm this problem. |
|
|
I reproduced it using simple go lang program. |
|
|
I created the patch for Pgpoo-II V3.7 for fixed this problem. This patch sort the parameter in startup packet, when received startup packet. |
|
|
Thank you for your patch, hoshiai. At what date/version it could be expected to see this code in the upstream? |
|
|
Now I am testing this patch. I am planing to include it in next minor version, So will commit it by then. Next minor version release date is on Thursday, November 22nd, 2018. |
|
|
I commited patch by 3.4 - 4.0 branches. So this problem will fix by next minor version. commit log: https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=ffb998517bb91c512b77fbe1ca8ee331e492f131 |
|
|
Last week, new minor version relased , this problem fixed. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2018-11-13 00:35 | pensnarik | New Issue | |
| 2018-11-13 00:35 | pensnarik | Tag Attached: connection cache | |
| 2018-11-13 00:35 | pensnarik | Tag Attached: pgpool-II | |
| 2018-11-13 00:35 | pensnarik | Tag Attached: go | |
| 2018-11-13 15:13 | hoshiai | Assigned To | => hoshiai |
| 2018-11-13 15:13 | hoshiai | Status | new => assigned |
| 2018-11-13 16:57 | hoshiai | Note Added: 0002244 | |
| 2018-11-19 11:13 | hoshiai | Status | assigned => confirmed |
| 2018-11-19 11:13 | hoshiai | Note Added: 0002267 | |
| 2018-11-19 11:25 | hoshiai | File Added: bug444_sort_startup_packet.patch | |
| 2018-11-19 11:25 | hoshiai | File Added: test.go | |
| 2018-11-19 11:25 | hoshiai | Note Added: 0002268 | |
| 2018-11-19 11:28 | hoshiai | Note Edited: 0002268 | |
| 2018-11-19 11:36 | pensnarik | Note Added: 0002269 | |
| 2018-11-19 13:53 | hoshiai | Note Added: 0002271 | |
| 2018-11-21 15:07 | hoshiai | Product Version | => 3.7.6 |
| 2018-11-21 15:07 | hoshiai | Target Version | => 3.7.7 |
| 2018-11-21 15:07 | hoshiai | Note Added: 0002276 | |
| 2018-11-26 14:28 | hoshiai | Status | confirmed => resolved |
| 2018-11-26 14:28 | hoshiai | Resolution | open => fixed |
| 2018-11-26 14:28 | hoshiai | Fixed in Version | => 3.7.7 |
| 2018-11-26 14:28 | hoshiai | Note Added: 0002284 |