[pgpool-hackers: 191] pgpool stucks in pgpool_regclass() call

Tatsuo Ishii ishii at postgresql.org
Fri Apr 5 15:03:06 JST 2013


Hi,

Recently we have multiple reports complaining that pgpool-II stucks
and PostgreSQL is left in parsing SELECT pgpool_regclass.

Today in bug report http://www.pgpool.net/mantisbt/view.php?id=53 ,
the reporter identified that that was a problem with user side.  They
do have pgpool_regclass() but they do *not* have execute privilege on
the function. I know

You can reproduce the problem by revoking execute privilege from a
user something like this:

createuser foo
revoke revoke all on function pgpool_regclass(cstring) from public;
grant execute on function pgpool_regclass(cstring) to postgres; 

The apparent solution is before calling pgpool_regclass(), make sure
that the user has a privilege to execute the function. This is easy
but will add lots of overhead. Checking the existence is managed by
relcache module, and it is not a problem. However checking the
privilege would be a BIG performance problem.

So I lean to the idea that if calling pgpool_regclass() fails, just
report it and exit the session.

Thoughts?
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list