[Pkg-postgresql-public] Re: postgresql-8.0 and postgresql-7.4 packages in experimental

Martin Pitt mpitt@debian.org
Sat, 21 May 2005 11:12:11 +0200


--+xNpyl7Qekk2NvDX
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Andrew!

Andrew McMillan [2005-05-21 18:41 +1200]:
> Hi,
>=20
> Are the postgresql-7.4 packages in experimental supposed to be used, or
> are they superseded by the postgresql-8.0 packages?  I was hoping to be
> able to install this side-by-side with postgresql-8.0 and transition
> across.

That's in fact the reason why I developed postgresql-common and the
new architecture: to allow several major versions to be run in
parallel. So you can happily install 7.4 and 8.0 side by side.

> So far I've managed to install postgresql-7.4, and to move my databases
> across by just moving the files (base, global, pg_clog, pg_xlog) and
> then applying various existing permissions and so forth

You need to dump the 7.4 database and reload it into an 8.0 database.
That's what the pg_upgradecluster tool is for (see manpage). The next
version of postgresql-common will ship a README.Debian with some
introduction.

> , but it seems
> that the postgresql-7.4 packages are built with the socket in /tmp/
> rather than in /var/run/postgresql (or even in some version-dependent
> location).  Is this an error, or is it supposed to be this way?

Actually it is supposed to be this way, and in the new architecture
all client programs expect the socket in /tmp (which is upstream's
default). However, some people seem to like the old location [1]. I
did not yet follow up to this bug, will do ASAP. It's not that trivial
to put sockets into /var/run/postgresql since only the 'postgres' user
can write into this. However, a cluster can be owned by an arbitrary
Unix system user (on purpose). I still need to think about that.

> I've changed the /etc/postgresql/7.4/main/postgresql.conf file to
> specify the socket location (so now my other applications are working
> again), but that setting doesn't seem to be read by psql, and psql
> doesn't appear to have options to use a socket other than what is
> compiled in.

That's why the packages are still in experimental; other packages
dealing with PostgreSQL need to be recompiled anyway against libpq4,
and they have to be adapted to the new paths. This was the major
reason why the new packages did not go into Sarge.

> Also, I was thinking of writing a script that would enable easy
> transition from the existing postgresql (7.4.8) to postgresql-7.4
> (7.4.8) by moving files around.  Would you be interested in such a
> script, as an accessory to the package?

It already exists. :-) The postgresql package in experimental (version
7.5.x) is a transition package which cares for that. So in the end,
you just need to apt-get dist-upgrade and everything will be settled
for you. :-)

Martin

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D308597

--=20
Martin Pitt              http://www.piware.de
Ubuntu Developer   http://www.ubuntulinux.org
Debian Developer        http://www.debian.org

--+xNpyl7Qekk2NvDX
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCjvtrDecnbV4Fd/IRAtn5AJ0erNXClg8lDXj557HI875Xp10L3gCfY1mt
+a47mcyxsc8itBx7btW1zXI=
=rra/
-----END PGP SIGNATURE-----

--+xNpyl7Qekk2NvDX--