[pgsql-jp: 36907] pgpoolで\dエラー

Ken Murata - sonicjam Inc. ken @ sonicjam.co.jp
2006年 3月 22日 (水) 16:35:54 JST


村田と申します。

Linuxサーバ2台でpgpoolを使用していますが、
\dしようとするとエラーになる現象が出ています。
pgpoolを使用する場合のdrop, createの手順に
問題があるのでは?と考えています。
ご存知の方はご教授いただけないでしょうか。

■現象
pgpool経由でdropしたあとcreateしたテーブルに、
\dしようとするとエラーが表示される。

taaweb=> \d test_tbl
ERROR:  kind mismatch between backends
HINT:  check data consistency between master and secondary
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.

なおSELECTなどの発行は正常に実行されます。

■環境
マスター:
pgpool 3.0.1	port 5432
PostgreSQL 7.4.12	port 5431

セカンダリ:
PostgreSQL 7.4.12	port 5433

■pgpool経由で以下の作業を行いました
drop test_tbl;
create table test_tbl (id int, name char(20));
insert into test_tbl values (1, 'test1');
insert into test_tbl values (2, 'TEST2');
insert into test_tbl values (3, 'test3');

以下のコマンドで個別にダンプをとりました。
pg_dump -o -ttest_tbl -hdb01 -p5431 -Uusername username > test01o.dmp
pg_dump -o -ttest_tbl -hdb02 -p5433 -Uusername username > test02o.dmp

■ダンプ結果(db01)
--
-- PostgreSQL database dump
--

SET client_encoding = 'UNICODE';
SET check_function_bodies = false;

--
-- TOC entry 3 (OID 0)
-- Name: Max OID; Type: <Init>; Schema: -; Owner: 
--

CREATE TEMPORARY TABLE pgdump_oid (dummy integer);
COPY pgdump_oid WITH OIDS FROM stdin;
1866214	0
\.
DROP TABLE pgdump_oid;


SET SESSION AUTHORIZATION 'taaweb';

SET search_path = public, pg_catalog;

--
-- TOC entry 4 (OID 1866202)
-- Name: test_tbl; Type: TABLE; Schema: public; Owner: taaweb
--

CREATE TABLE test_tbl (
    id integer,
    name character(20)
);


--
-- Data for TOC entry 5 (OID 1866202)
-- Name: test_tbl; Type: TABLE DATA; Schema: public; Owner: taaweb
--

COPY test_tbl (id, name) WITH OIDS FROM stdin;
1866204	1	test1               
1866205	2	TEST2               
1866206	3	test3               
\.


■ダンプ結果(db02)
--
-- PostgreSQL database dump
--

SET client_encoding = 'UNICODE';
SET check_function_bodies = false;

--
-- TOC entry 3 (OID 0)
-- Name: Max OID; Type: <Init>; Schema: -; Owner: 
--

CREATE TEMPORARY TABLE pgdump_oid (dummy integer);
COPY pgdump_oid WITH OIDS FROM stdin;
1866208	0
\.
DROP TABLE pgdump_oid;


SET SESSION AUTHORIZATION 'taaweb';

SET search_path = public, pg_catalog;

--
-- TOC entry 4 (OID 1866200)
-- Name: test_tbl; Type: TABLE; Schema: public; Owner: taaweb
--

CREATE TABLE test_tbl (
    id integer,
    name character(20)
);


--
-- Data for TOC entry 5 (OID 1866200)
-- Name: test_tbl; Type: TABLE DATA; Schema: public; Owner: taaweb
--

COPY test_tbl (id, name) WITH OIDS FROM stdin;
1866202	1	test1               
1866203	2	TEST2               
1866204	3	test3               
\.

----------





pgsql-jp メーリングリストの案内