View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000550 | Pgpool-II | General | public | 2019-10-07 20:35 | 2019-10-16 12:37 |
| Reporter | gsl23 | Assigned To | pengbo | ||
| Priority | normal | Severity | minor | Reproducibility | sometimes |
| Status | closed | Resolution | open | ||
| Platform | linux | OS | redhat | OS Version | 7 |
| Product Version | 3.7.3 | ||||
| Summary | 0000550: Pgpool system queries | ||||
| Description | Hi friends ! (and sorry for may bad english) We observe some load on db generated by queries : "SELECT count(*) FROM pg_class AS c, pg_namespace AS n WHERE c.oid = pg_catalog.to_regclass(?) AND c.relnamespace = n.oid AND n.nspname = ?" "SELECT current_setting(?)" We can't find thoese statements anywhere in code, but I find first query in https://github.com/pgpool/pgpool2/blob/master/src/utils/pool_select_walker.c Why pgpool so frequently query this statements and how to minimize it ? Config + stat data about this queries in attachments. | ||||
| Tags | No tags attached. | ||||
|
|
|
|
|
> Why pgpool so frequently query this statements and how to minimize it ? When Pgpool-II receives a client query, Pgpool-II need to inquiry PostgreSQL's system catalogs to determine that - if a table in client's query is a temporary table or not - if a table in client's query is an unlogged table or not - if a function in client's query is "immutable" or not Because such client's queries should be sent to PostgreSQL primary server only. So, Pgpool-II issues queries to PostgreSQL's system catalogs, when a table or function appears in client's query. However, this behaviour is improved in the coming major release Pgpool-II 4.1. In 4.1 new parameter "enable_shared_relcache" is added. If enable_shared_relcache is on, the relation stored in memory cache can be shared among Pgpool-II child processes. This feature can reduce the queries issued to PostgreSQL's system catalogs. |
|
|
Thx, pengbo |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2019-10-07 20:35 | gsl23 | New Issue | |
| 2019-10-07 20:35 | gsl23 | File Added: pgpool.conf | |
| 2019-10-07 20:35 | gsl23 | File Added: high_sql_data-1570447913732.txt | |
| 2019-10-07 20:35 | gsl23 | File Added: high_sql1.JPG | |
| 2019-10-07 20:35 | gsl23 | File Added: high_sql2.JPG | |
| 2019-10-08 10:18 | pengbo | Status | new => assigned |
| 2019-10-08 10:37 | pengbo | Note Added: 0002910 | |
| 2019-10-08 10:38 | pengbo | Assigned To | => pengbo |
| 2019-10-08 10:38 | pengbo | Status | assigned => feedback |
| 2019-10-08 15:10 | gsl23 | Note Added: 0002913 | |
| 2019-10-08 15:10 | gsl23 | Status | feedback => assigned |
| 2019-10-16 12:37 | pengbo | Status | assigned => closed |