[Pgpool-general] Test case for pgpool-regclass

Tatsuo Ishii ishii at sraoss.co.jp
Wed Apr 13 07:49:31 UTC 2011


> I thought without pgpool_regclass, the pgpool will drop the schema name from the 
> query (SELECT statement).

No.

> Anyways, I use Master/Slave mode with sub mode as 'stream'. Replication mode is 
> off.  I have one Master (port 5432) and one Slave (5433)
> 
> I did the following steps to create table and then executed select query to see 
> the timestamp on both the nodes and they are same. I have not installed 
> pgpool_regclass yet.
> 
> Am I missing anything?

Oh ok, in master/slave mode, timestamp rewriting is not peformed. So
you don't need to install pgool_regclass.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

>> I just wanted to test the use of pgpool-regclass. I took the sources of 
>> pgpool-II 3.0.3 and PG9.0. I did not install pgpool-regclass to check the 
>> pgpoo-II's behaviour in case of missing pgpool-regclass.
>> 
>> Here, is what I did:
>> 1. Created a table t1 in the public schema, and inserted some values in it.
>> 2. Created a schema sch1 and created a table t1 in this schema, and inserted 
>> some values in it.
>> 
>> Then, how I execute, 
>> 
>> psql -p 9999 -c "select * from schema1.table1"
>> 
>> I thought, without regclass, this should fallback to :
>> psql -p 9999 -c "select * from table1"  
>> 
>> But NO, I get the values from the table present in schema1. That means, it is 
>> working fine. 
> 
> No. pgpool_regclass does not affect user's SELECT itself.
> 
> If you are using pgpool-II in replication mode, you could check the
> effect as follows:
> 
> create table schema1.table1(t timestamp default current_timestamp);
> create table public.table1(t int default 100);
> set search_path to schema1,public;
> insert into table1 values(default);
> 
> If you install pgpool_regclass, your database nodes have exactly same
> timestamp values because pgpool rewrite the query correctly.
> 
> On the other hand, if you do not install it, your database nodes have
> different timestamp values because pgpool does not recognize that
> table1 has timestamp column and needs to be written.
> --
> 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-general mailing list