Does not build for PostgreSQL 8.2 (or earlier)

Bug #236749 reported by Stuart Bishop
6
Affects Status Importance Assigned to Milestone
slony1 (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

There are no postgresql-8.2-slony1 packages (or packages for earlier PG releases either).

One of the major use cases of slony is to allow minimal downtime upgrades of large databases between major PostgreSQL releases starting with PostgreSQL 7.4. This is currently not possible as there are no slony1 packages for anything except PostgreSQL 8.3 in Ubuntu 8.04.

http://slony.info/documentation/versionupgrade.html

Revision history for this message
Stuart Bishop (stub) wrote :
Download full text (9.1 KiB)

I'm unable to come up with a workaround, as it no longer appears possible to build Slony 1.2.13 against PostgreSQL 8.2 on Hardy.

sudo apt-get install postgresql-server-dev-8.2
wget -S http://main.slony.info/downloads/1.2/source/slony1-1.2.13.tar.bz2
bunzip2 -c slony1-1.2.13.tar.bz2 | tar xf -
cd slony1-1.2.13
./configure --with-pgconfigdir=/usr/lib/postgresql/8.2/bin
make

produces:

make[1]: Entering directory `/home/stub/src/slony1-1.2.13/src'
make[2]: Entering directory `/home/stub/src/slony1-1.2.13/src/xxid'
gcc -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I../.. -I/usr/include/postgresql/ -I/usr/include/postgresql/8.2/server/ -c -o xxid.o xxid.c
In file included from /usr/include/postgresql/8.2/server/storage/bufpage.h:17,
                 from /usr/include/postgresql/8.2/server/access/relscan.h:18,
                 from /usr/include/postgresql/8.2/server/access/heapam.h:18,
                 from /usr/include/postgresql/8.2/server/executor/spi.h:22,
                 from xxid.c:20:
/usr/include/postgresql/8.2/server/storage/bufmgr.h:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/postgresql/8.2/server/storage/bufmgr.h:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘char’
/usr/include/postgresql/8.2/server/storage/bufmgr.h:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int32’
/usr/include/postgresql/8.2/server/storage/bufmgr.h:37: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/postgresql/8.2/server/storage/bufmgr.h:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Block’
/usr/include/postgresql/8.2/server/storage/bufmgr.h:39: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int32’
In file included from /usr/include/postgresql/8.2/server/access/relscan.h:19,
                 from /usr/include/postgresql/8.2/server/access/heapam.h:18,
                 from /usr/include/postgresql/8.2/server/executor/spi.h:22,
                 from xxid.c:20:
/usr/include/postgresql/8.2/server/utils/tqual.h:62: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Snapshot’
/usr/include/postgresql/8.2/server/utils/tqual.h:73: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Snapshot’
/usr/include/postgresql/8.2/server/utils/tqual.h:74: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Snapshot’
/usr/include/postgresql/8.2/server/utils/tqual.h:75: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Snapshot’
In file included from /usr/include/postgresql/8.2/server/storage/lock.h:20,
                 from /usr/include/postgresql/8.2/server/storage/lmgr.h:17,
                 from /usr/include/postgresql/8.2/server/access/heapam.h:24,
                 from /usr/include/postgresql/8.2/server/executor/spi.h:22,
                 from xxid.c:20:
/usr/include/postgresql/8.2/server/storage/shmem.h:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘SHMEM_OFFSET’
In file included from /usr/include/postgresql/8.2/server/utils/resowner.h:23,
                 from /usr/include/postgresql/8.2/server/utils/portal.h:50,
                 from /...

Read more...

Revision history for this message
Stuart Bishop (stub) wrote :

A build can be made by hacking Makefile.global after running configure. Swapping the include order of /usr/include/postgresql and /usr/include/postgresql/8.2/server and adding -DNAMEDATALEN=64 to the CPPFLAGS.

Revision history for this message
Martin Pitt (pitti) wrote :

I changed the bug title. We won't introduce a new package into stables, nor will we add an -8.2 package to intrepid, since the only supported PostgreSQL version in 8.04 and intrepid is 8.3.

postgresql-8.2 was removed from Debian unstable and Intrepid, too.

Revision history for this message
Martin Pitt (pitti) wrote :

Since we can't upload this to turn it into a proper package, I do not see much sense to change anything in the source package. You have to manually build the extension yourself for hardy and intrepid anyway.

If you still use 8.2 for production, I recommend to run Ubuntu 7.10 (Gutsy), where 8.2 is supported, and postgresql-8.2-slony1 is available.

Changed in slony1:
status: New → Won't Fix
Revision history for this message
Stuart Bishop (stub) wrote :

The use case for this bug is migrating to PG 8.2 from PG 8.3 with little downtime. This is not possible on either Gutsy or Hardy without manually building slony1 from source, as slony1 isn't available for PG 8.3 in Gutsy. Launchpad Production database servers are already running Hardy however so I'm only really interested in that. Downgrading the OS isn't an option as the whole point for me is to avoid a 4 hour downtime window of Launchpad.

If we had packages available somewhere, a PPA or just a .deb uploaded somewhere, we will be fine as far as Launchpad is concerned.

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 236749] Re: Does not build for PostgreSQL 8.2 (or earlier)

Stuart Bishop [2008-06-09 8:50 -0000]:
> The use case for this bug is migrating to PG 8.2 from PG 8.3 with little
> downtime. This is not possible on either Gutsy or Hardy without manually
> building slony1 from source, as slony1 isn't available for PG 8.3 in
> Gutsy.

The idea is that you upgrade gutsy to hardy, which won't uninstall the
8.2 packages (you'll just get a debconf note about the deprecated 8.2
and instructions how to update the package).

> If we had packages available somewhere, a PPA or just a .deb uploaded
> somewhere, we will be fine as far as Launchpad is concerned.

The one in gutsy should work fine:

  http://archive.ubuntu.com/ubuntu/pool/universe/s/slony1/postgresql-8.2-slony1_1.2.9-3_i386.deb

Revision history for this message
Stuart Bishop (stub) wrote :

The gutsy package is 1.2.9 which cannot be used with the PG 8.3 package which is 1.2.13. Similarly, the 1.2.13 tools cannot be used with 1.2.9 version available for PG 8.2. You need to have the same slony version for both PG 8.2 and PG 8.3 to do the migration.

Revision history for this message
Stuart Bishop (stub) wrote :

Turns out we have a large downtime window pending, so I'm no longer personally affected by this as I can do my migration the traditional way (at least until 8.3 -> 8.4 migration ;) )

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.