[#1011283] Pl/Proxy: partitions must be numbered consecutively

View Trackers | Bugs | Download .csv | Monitor

Date:
2012-11-23 12:54
Priority:
3
State:
Open
Submitted by:
Timur Luchkin (thamerlan)
Assigned to:
Nobody (None)
Category:
None
Group:
None
Resolution:
None
 
Summary:
Pl/Proxy: partitions must be numbered consecutively

Detailed description
Originally posted to pgsql-bugs BUG #7684 (http://archives.postgresql.org/pgsql-bugs/2012-11/msg00162.php). Guys asked me to post it here.


Looks like pg_dumpall sorts 'create server FOREIGN DATA WRAPPER' options
(keys) as varchar and not as integer.
Example from dumped sql (see "pX" option key):

CREATE SERVER can_master_cluster FOREIGN DATA WRAPPER plproxy OPTIONS (
connection_lifetime '1800',
p0 'dbname=database11 host=xxx-11 port=9811',
p1 'dbname=database12 host=xxx-12 port=9812',
p10 'dbname=database21 host=xxx-21 port=9821',
p11 'dbname=database22 host=xxx-22 port=9822',
p12 'dbname=database23 host=xxx-23 port=9823',
p13 'dbname=database24 host=xxx-24 port=9824',
p14 'dbname=database25 host=xxx-25 port=9825',
p15 'dbname=database26 host=xxx-26 port=9826',
p2 'dbname=database13 host=xxx-13 port=9813',
p3 'dbname=database14 host=xxx-14 port=9814',
p4 'dbname=database15 host=xxx-15 port=9815',
p5 'dbname=database16 host=xxx-16 port=9816',
p6 'dbname=database17 host=xxx-17 port=9817',
p7 'dbname=database18 host=xxx-18 port=9818',
p8 'dbname=database19 host=xxx-19 port=9819',
p9 'dbname=database20 host=xxx-20 port=9820'
);

which causes next error during the load:
ERROR: Pl/Proxy: partitions must be numbered consecutively
HINT: next valid partition number is 2
STATEMENT: CREATE SERVER can_master_cluster ...

Old 9.0 'pg_dumpall' doing job correct.

Followup

Message
Date: 2012-11-23 12:55
Sender: Timur Luchkin

PostgreSQL version: 9.2.1
Operating system: OpenSolaris

Attached Files:

Changes:

No Changes Have Been Made to This Item

Powered By FusionForge