[Pgpool-general] Problem with tables with same name

Marcin Kwiatkowski marcik4 at gmail.com
Fri Aug 6 13:20:02 UTC 2010


Hello

I'm using pgpool in replication mode and i have a big problem with
tables with same name. It happens with postgres 8.4.4 and pgpool-II
2.3.3. I'm attaching a simplified dump of a database. It has 2 tables:
mytable in schema public and in schema buffor. They both have very
different columns. And when i try to make an insert:

"INSERT INTO mytable (p5, p9, p8, p6, p7, p2, p3, p4, p10, p11, p12,
p13, p14, p15, p17, p18, p1) values ('2010-08-04 15:38:43.808000
+02:00:00', '2010-08-04 15:38:43.791000 +02:00:00', NULL, NULL, true,
599112, 599113, 1, NULL, NULL, NULL, NULL, NULL, null, NULL, NULL,
299299);"

which should go into public.mytable i get an error:
"ERROR:  column "p59" of relation "mytable" does not exist
LINE 1: ... p17, p18, p1) values ('2010-08-04 15:38:43.808000 +02:00:00..."

The problem that there's no column p59 in public.mytable - it exists
only in buffor.mytable.

Pgpool log says:
"SimpleQuery: Error or notice message from backend: : DB node id: 0
backend pid: 18429 statement: INSERT INTO "mytable"("p5", "p9", "p8",
"p6", "p7", "p2", "p3", "p4", "p10", "p11", "p12", "p13", "p14",
"p15", "p17", "p18", "p1", "p59") VALUES ('2010-08-04 15:38:43.808000
+02:00:00','2010-08-04 15:38:43.791000
+02:00:00',NULL,NULL,'t'::bool,599112,599113,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,299299,'2010-08-06
15:14:37.669948+02') message: column "p59" of relation "mytable" does
not exist"

It seems then that it's pgpool which added that column to my insert.
It works ok when i explicit write public.mytable in insert but that
insert is autogenerated by an hibernate so i can't workaround it that
way.That insert also works ok if i run it on same postgres but without
pgpool.

Any idea how to fix it?

-- 
Pozdrawiam
Marcin Kwiatkowski
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgpool-test.sql
Type: text/x-sql
Size: 4428 bytes
Desc: not available
URL: <http://pgfoundry.org/pipermail/pgpool-general/attachments/20100806/cc729106/attachment.bin>


More information about the Pgpool-general mailing list