← Back to team overview

launchpad-dev team mailing list archive

Re: Devs switch to PG 9.1

 

On Sun, May 6, 2012 at 11:16 AM, Stuart Bishop
<stuart.bishop@xxxxxxxxxxxxx> wrote:
> Hi.
>
> Devs will need to switch over to PostgreSQL 9.1  - our first landing
> is happening with sampledata generated from PG 9.1. As usual,
> sampledata diffs are huge when generated by different PostgreSQL
> versions so to avoid unnecessary huge commits (>1MB) we all need to be
> running the same version from now on.
>
> You need to make the switch before the next time you regenerate the
> sampledata as part of a DB patch landing. The various setup scripts
> are all believed to work with PG 9.1, so the upgrade process should be
> simple enough - uninstall PostgreSQL 8.4, install PostgreSQL 9.1,
> confirm it is listening on port 5432 (check
> /etc/postgresql/9.1/main/postgresql.conf), run the Launchpad database
> setup script or whatever alternative process you use to set things up.
>

I followed these instructions, and have found that they don't work.

$ sudo apt-get remove postgresql-8.4
$ sudo apt-get install postgresql-9.1
$ sudo vi /etc/postgresql/9.1/main/postgresql.conf
# Update to 5432
$ sudo /etc/init.d/postgresql restart
$ cd ~/src/launchpad
$ ./utilities/launchpad-database-setup jml

Creating Launchpad database for jml
Using postgres 9.1
 * Stopping PostgreSQL 9.1 database server

                                            [ OK ]
Purging postgresql data...
Re-creating postgresql database...
Creating new cluster (configuration: /etc/postgresql/9.1/main, data:
/var/lib/postgresql/9.1/main)...
Moving configuration file /var/lib/postgresql/9.1/main/postgresql.conf
to /etc/postgresql/9.1/main...
Moving configuration file /var/lib/postgresql/9.1/main/pg_hba.conf to
/etc/postgresql/9.1/main...
Moving configuration file /var/lib/postgresql/9.1/main/pg_ident.conf
to /etc/postgresql/9.1/main...
Configuring postgresql.conf to use port 5433...
Applying postgresql configuration changes...
0+1 records in
0+1 records out
272 bytes (272 B) copied, 9.7776e-05 s, 2.8 MB/s
9+1 records in
9+1 records out
4649 bytes (4.6 kB) copied, 0.000110766 s, 42.0 MB/s

##
## Launchpad configuration
##
# Enable launchpad full text searching in database
search_path='$user,public,ts2'
# Per Bug #90809, standard_conforming_strings should be 'on'
standard_conforming_strings=off
escape_string_warning=off

#enable_seqscan=false
log_statement='none'
log_line_prefix='[%t] %q%u@%d '
fsync = off

 * Starting PostgreSQL 9.1 database server

                                            [ OK ]
Waiting 10 seconds for postgresql to come up...
Creating postgresql user jml
createuser: could not connect to database postgres: could not connect
to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

Looks like everything went ok.
Now run "make schema" at the top level of the launchpad tree.



The script seems to configure postgres to run on port 5433. At the
time of starting the script, there are no services running on port
5432. This is in a lucid LXC instance on my precise laptop.

Thanks,
jml


Follow ups

References