Created
February 13, 2012 15:32
-
-
Save bfritz/1817618 to your computer and use it in GitHub Desktop.
pg_upgradecluster patch to upgrade from 8.2 to 8.4 (Lenny --> Squeeze)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /usr/bin/pg_upgradecluster 2012-02-13 10:23:56.000000000 -0500 | |
+++ /usr/bin/pg_upgradecluster.mod 2012-02-13 10:23:44.000000000 -0500 | |
@@ -270,6 +270,11 @@ | |
error 'could not get cluster collating locale' unless $old_lc_collate; | |
} | |
+$encoding = "UTF-8"; | |
+$lc_ctype = "en_US.UTF-8"; | |
+$lc_collate = "en_US.UTF-8"; | |
+ | |
+ | |
if (cluster_exists $newversion, $cluster) { | |
error "target cluster $newversion/$cluster already exists"; | |
} | |
@@ -282,7 +287,8 @@ | |
# stopping old cluster, so that we notice early when there are still | |
# connections | |
print "Stopping old cluster...\n"; | |
-my @argv = ('pg_ctlcluster', $version, $cluster, 'stop', '--', '-t', '5'); | |
+#my @argv = ('pg_ctlcluster', $version, $cluster, 'stop', '--', '-t', '5'); | |
+my @argv = ('pg_ctlcluster', $version, $cluster, 'stop'); | |
error "Could not stop old cluster" if system @argv; | |
# Disable access to clusters during upgrade | |
@@ -422,6 +428,8 @@ | |
# Upgrade databases | |
for my $db (keys %databases) { | |
next if $db eq 'template0'; | |
+ next if $db eq 'template1'; | |
+ next if $db eq 'postgres'; | |
print "Fixing hardcoded library paths for stored procedures...\n"; | |
(system $psql, '-h', $oldsocket, '-p', $info{'port'}, '-q', '-d', |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based on patch in:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=461836#15