Package: postgresql-common Version: 118 Severity: minor Tags: patch
Here is a small patch to update the pg_hba.conf patching of pg_createcluster for 9.1. Use the new preferred spelling "peer" instead of "ident", and fix the whitespace a bit to make the added lines fit better within the existing file.
diff -Nru postgresql-common-118/debian/changelog postgresql-common-118+nmu1/debian/changelog --- postgresql-common-118/debian/changelog 2011-06-14 15:52:15.000000000 +0300 +++ postgresql-common-118+nmu1/debian/changelog 2011-07-05 08:47:55.000000000 +0300 @@ -1,3 +1,11 @@ +postgresql-common (118+nmu1) unstable; urgency=low + + * pg_createcluster: + - Use "peer" instead of "ident" from 9.1 on. + - Update comment alignment to match existing file better. + + -- Peter Eisentraut <pet...@debian.org> Tue, 05 Jul 2011 08:35:44 +0300 + postgresql-common (118) unstable; urgency=low * Update Catalan debconf translations, thanks Innocent De Marchi. diff -Nru postgresql-common-118/pg_createcluster postgresql-common-118+nmu1/pg_createcluster --- postgresql-common-118/pg_createcluster 2011-05-10 13:35:53.000000000 +0300 +++ postgresql-common-118+nmu1/pg_createcluster 2011-07-05 08:41:36.000000000 +0300 @@ -28,7 +28,9 @@ # Arguments: <version> <data directory> <owner uid> <owner gid> sub init_db { $datadir = (-l $_[1]) ? readlink $_[1] : $_[1]; - if ($_[0] ge '8.4') { + if ($_[0] ge '9.1') { + $ident_method = 'peer'; + } elsif ($_[0] ge '8.4') { $ident_method = 'ident'; } else { $ident_method = 'ident sameuser'; @@ -132,13 +134,11 @@ $su_comment = " # DO NOT DISABLE! # If you change this first entry you will need to make sure that the -# database -# super user can access the database using some other method. -# Noninteractive -# access to all databases is required during automatic maintenance -# (custom daily cronjobs, replication, and similar tasks). +# database superuser can access the database using some other method. +# Noninteractive access to all databases is required during automatic +# maintenance (custom daily cronjobs, replication, and similar tasks). # -# Database administrative login by UNIX sockets +# Database administrative login by Unix domain socket "; open (F, $fname) or error "could not open $fname for reading"; @@ -148,7 +148,7 @@ # add superuser entry before column description line if ($search && /#.*TYPE\s+DATABASE/) { push @lines, $su_comment; - $s = sprintf "%-7s %-11s %-33s %s\n", 'local', 'all', $user, $ident_method; + $s = sprintf "%-7s %-15s %-39s %s\n", 'local', 'all', $user, $ident_method; push @lines, $s; push @lines, "\n"; $search = 0;