[pgpool-general: 1726] Re: Problems running jdbc testsuite

Tatsuo Ishii ishii at postgresql.org
Tue May 14 08:07:45 JST 2013


>> Re: Tatsuo Ishii 2013-05-12 <20130513.090827.1288036071461111568.t-ishii at sraoss.co.jp>
>>> One thing I noticed was in the default pgpool.conf.sample, there is a line
>>> 
>>> backend_hostname1 = 'host2'
>>> 
>>> This makes pgpool do fail over if there's no host "host2" and you have
>>> only one valid backend. I just commented out the line and everything
>>> seems works ok.  I'm going to comment out the line above in git
>>> repository.
>> 
>> I digged a bit more into this, and the reason seems to be that I
>> didn't have /usr/share/postgresql/9.1/contrib/pgpool-regclass.sql
>> loaded into the database. With that, the tests run through, otherwise
>> it gets stuck in this query:
>> 
>> SELECT count(*) FROM pg_catalog.pg_proc AS p WHERE
>> p.proname = 'pgpool_regclass' AND has_function_privilege('postgres',
>> 'pgpool_regclass(cstring)', 'execute')
>> 
>> ... which returns an error when run interactively, but when run from
>> the test driver, it looks like the result is never fetched. (In 9.2,
>> the query remains in "active" state in pg_stat_activity, but doesn't
>> consume any CPU anymore.)
>> 
>> This seems to be a change from the previous pgpool version where I
>> didn't load the file either, but the tests ran through.
>> 
>> I'll add the loading of the file to my test script, but it might make
>> sense if someone looked into why this isn't failing with a meaningful
>> error message.
> 
> Thanks for the problem analyze. Also It's strange because if
> pgpool_regclass does not exist, pgpool should be smart enough to avoid
> calling pgpool_regclass. However there's something wrong according to
> your report. I will look into this more.

Ok, I think I figured out what is wrong.

>> SELECT count(*) FROM pg_catalog.pg_proc AS p WHERE
>> p.proname = 'pgpool_regclass' AND has_function_privilege('postgres',
>> 'pgpool_regclass(cstring)', 'execute')

pgpool-II expects that this query returns 0 if pgpool_regclass() is
not installed, but actually it returns ERROR. Attached patch should
solve the problem.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pool_select_walker.c.patch
Type: text/x-patch
Size: 716 bytes
Desc: not available
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20130514/4539d23b/attachment.bin>


More information about the pgpool-general mailing list