[pgpool-committers: 865] pgpool: Fix pool_has_pgpool_regclass() to check execute privilege of pg
Tatsuo Ishii
ishii at postgresql.org
Sun Apr 7 12:33:03 JST 2013
Fix pool_has_pgpool_regclass() to check execute privilege of pgpool_regclass().
Bug track #53 shows that if pgpool cannot execute pgpool_regclass(),
the connection to backend hangs. You can reproduce the problem by just
dropping the execute privilege from pgpool_regclass and do some insert
in native replication mode:
2013-04-07 11:47:54 LOG: pid 11799: DB node id: 0 backend pid: 11918 statement: SELECT count(*) FROM pg_catalog.pg_proc AS p WHERE p.proname = 'pgpool_regclass'
2013-04-07 11:47:54 LOG: pid 11799: DB node id: 0 backend pid: 11918 statement: SELECT count(*) FROM pg_catalog.pg_attrdef AS d, pg_catalog.pg_class AS c WHERE d.adrelid = c.oid AND d.adsrc ~ 'nextval' AND c.oid = pgpool_regclass('t1')
2013-04-07 11:47:54 ERROR: pid 11799: do_query: error message from backend: permission denied for function pgpool_regclass
2013-04-07 11:47:54 ERROR: pid 11799: pool_search_relcache: do_query failed
2013-04-07 11:47:54 LOG: pid 11799: DB node id: 0 backend pid: 11918 statement: SELECT attname, d.adsrc, coalesce((d.ads
To fix the problem, use has_function_privilege() for the query and
passes username to pool_search_relcache() instead of
"pgpool_regclass"(this is just a fake parameter) as the search
key. Also number of cache entries now raises to
pool_config->relcache_size.
Branch
------
V3_2_STABLE
Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=182a192e75de1bdecf95089143dc956745393f11
Modified Files
--------------
pool_select_walker.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
More information about the pgpool-committers
mailing list