[Pgpool-general] INSERT INTO ... SELECT alternative that pgpool-II supports

calimlimvl at nationalbookstore.com.ph calimlimvl at nationalbookstore.com.ph
Wed Sep 10 06:55:56 UTC 2008


Hello!

I get the following error when doing INSERT INTO ... SELECT. I understand
that it is not supported but I need to get merged results somewhere
because my database contains a lot of different schemas with same tables
in them (salesdtl). Any other way to deal with this problem? Thank you so
much.

Sincerely,
Viril

-=-=-=-=-=
SQL error:

ERROR:  pgpool detected difference of the number of update tuples
HINT:  check data consistency between master and other db node
ERROR:  pgpool detected difference of the number of update tuples
HINT:  check data consistency between master and other db node
ERROR:  kind mismatch between backends
HINT:  check data consistency between master and other db node
server closed the connection unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request.

In statement:

CREATE TEMP TABLE temp_salesdtl (
    orno character varying(22) NOT NULL,
    dtltype character varying(5) NOT NULL,
    trxno character varying(22) NOT NULL,
    lineno smallint NOT NULL,
    skuno character varying(20) NOT NULL,
    skudesc character varying(30) NOT NULL,
    qtysold numeric(12,2) NOT NULL,
    costprice numeric(12,2) NOT NULL,
    orig_rep character varying(10) NOT NULL,
    retailprice numeric(12,2) NOT NULL,
    sellprice numeric(12,2) NOT NULL,
    vattype character(2) NOT NULL,
    deptcode character varying(10) NOT NULL,
    classcode character varying(10) NOT NULL,
    subclasscode character varying(10) NOT NULL,
    vendorcode character varying(10) NOT NULL,
    disccode character varying(10) NOT NULL,
    discperc numeric(12,2) NOT NULL,
    eventcode character varying(10) NOT NULL,
    serialno character varying(20) NOT NULL,
    itemtype character varying(10) NOT NULL,
    upc character varying(50) NOT NULL,
    scconverted smallint NOT NULL,
    ohconverted smallint NOT NULL,
    loconverted smallint NOT NULL,
    branchmonth character varying(5) NOT NULL
);

INSERT INTO temp_salesdtl
SELECT * FROM lb_m01_str001.salesdtl
ORDER BY qtysold DESC
OFFSET 0 LIMIT 10;

INSERT INTO temp_salesdtl
SELECT * FROM lb_m01_str002.salesdtl
ORDER BY qtysold DESC
OFFSET 0 LIMIT 10;

SELECT * FROM temp_salesdtl;
-=-=-=-=-=



More information about the Pgpool-general mailing list