View Issue Details

IDProjectCategoryView StatusLast Update
0000093Pgpool-IIBugpublic2014-02-26 16:41
ReporterhootfrancoisAssigned Tonagata 
Status assignedResolutionopen 
PlatformOSUbuntuOS Version12.04 LTS
Product Version 
Target VersionFixed in Version 
Summary0000093: Prepared statements don't respect partitioning rules
DescriptionPrepared statements don't respect partitioning rules – the data is instead replicated to all nodes.
Steps To Reproduce- Enable replication and parallel querying.

- Create a following rule.
INSERT INTO pgpool_catalog.dist_def VALUES (
    ARRAY['id', 'username', 'member_id'],
    ARRAY['character varying(100)', 'character varying(254)', 'bigint'],
CREATE OR REPLACE FUNCTION pgpool_catalog.dist_def_autocomplete(anyelement)
RETURNS integer AS $$
  SELECT (($1 - 1) % 4)::integer;
$$ LANGUAGE sql;

- Create a table.
CREATE TABLE autocomplete (
    id character varying(100) NOT NULL,
    username character varying(254),
    member_id bigint

- Create a prepared statement and insert a recor./
PREPARE test (varchar, varchar, bigint) AS INSERT INTO autocomplete VALUES ($1, $3, $4);
EXECUTE test('4542586_test1', 'test1', 4542586);
TagsNo tags attached.



2014-02-01 10:26

reporter   ~0000390

I just wanted to point out that this also happen when you specify the field names in the prepared statement:

PREPARE test (varchar, varchar, bigint) AS INSERT INTO autocomplete (id, username, member_id) VALUES ($1, $2, $3);

Issue History

Date Modified Username Field Change
2014-02-01 09:00 hootfrancois New Issue
2014-02-01 10:26 hootfrancois Note Added: 0000390
2014-02-26 16:41 nagata Assigned To => nagata
2014-02-26 16:41 nagata Status new => assigned