pg_upgradecluster fails with an SQL syntax error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
postgresql-common (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I'm trying to upgrade my PostgreSQL 8.4 cluster on Ubuntu 12.04 LTS to PostgreSQL 9.1, by running:
pg_dropcluster 9.1 main --stop
pg_
This fails with an SQL syntax error because apparently one of the tables in one of the databases has a column named "new" that ought to be quoted appropriately in the generated dump file:
Stopping old cluster...
Disabling connections to the old cluster during upgrade...
Restarting old cluster with restricted connections...
Creating new cluster (configuration: /etc/postgresql
Moving configuration file /var/lib/
Moving configuration file /var/lib/
Moving configuration file /var/lib/
Configuring postgresql.conf to use port 5433...
Disabling connections to the new cluster during upgrade...
Roles, databases, schemas, ACLs...
Fixing hardcoded library paths for stored procedures...
Upgrading database pov3...
pg_dump: SQL command failed
pg_dump: Error message from server: ERROR: syntax error at or near "new"
LINE 1: ...verse, adjusted_
pg_dump: The command was: COPY public.
pg_restore: [custom archiver] unexpected end of file
Re-enabling connections to the old cluster...
Re-enabling connections to the new cluster...
Error during cluster dumping, removing new cluster
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: postgresql-common 129ubuntu1
ProcVersionSign
Uname: Linux 3.2.0-101-generic x86_64
ApportVersion: 2.0.1-0ubuntu17.13
Architecture: amd64
Date: Tue Apr 26 09:50:03 2016
MarkForUpload: True
PackageArchitec
ProcEnviron:
LC_CTYPE=
TERM=xterm-
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: postgresql-common
UpgradeStatus: Upgraded to precise on 2012-07-31 (1364 days ago)