2

We are running a legacy application which requires PostgreSQL 8.2 on Debian Etch. Since Debian dropped support for etch, we're seriously considering to upgrade to Debian Lenny. However, we are stuck if we will be able to continue to run PostgreSQL 8.2 on Debian Lenny.

Therefore, is it possible to continue to run PostgreSQL 8.2 (not upgrade and perhaps pin it) on a Debian Lenny system, which will be upgraded from Debian Etch? If so, how?

Lashae
  • 183
  • 1
  • 12

2 Answers2

1

It is possible to run (practically) any version of Postgres on (almost) any unix-like system -- Simply grab the source code from the Postgres web site and compile it (detailed instructions here).
If you're feeling ambitious you can follow the packaging instructions for your operating system as well and install your downgraded database as a package, but you can skip that step just as easily with few ill effects.

It is probably best to compile/install the old version in a unique path (/opt/postgres82, /usr/local/postgres82, etc.) to ensure that your OS won't stomp on it.

Note that when going this route you need to be aware of when underlying libraries change (which could break your database server if Postgres is linked against the library, necessitating a re-compile), and you will probably need to install your own startup script in a way appropriate to your operating system.

voretaq7
  • 79,345
  • 17
  • 128
  • 213
  • Thank you @voretaq7, I'm aware of compiling from source. However, as you wrote in detail, choosing the home-made way is far expensive in terms of maintenance. – Lashae Feb 17 '11 at 07:55
  • You also have the option to statically link Postgres if you compile it yourself -- This makes the Postgres binaries substantially larger, but avoids the "Stuff broke because packages got upgraded" issue... – voretaq7 Feb 17 '11 at 15:27
0

If you just upgrade from etch to lenny, your installed postgresql-8.2 package isn't going to disappear. That's how it's designed. (Check the aptitude output when you're upgrading to be sure. You could set the package to hold if needed, but it shouldn't be needed.)

Peter Eisentraut
  • 3,575
  • 1
  • 23
  • 21
  • This is the real good news Peter! Just to be sure, how am I supposed to configure aptitude to hold PostgreSQL at 8.2? – Lashae Feb 17 '11 at 08:10
  • `aptitude hold postgresql-8.2` – Peter Eisentraut Feb 17 '11 at 08:46
  • The only issue here is what other packages are going to be held to satisfy dependencies (and which parts of the system may not be able to upgrade because of that) -- You also don't get the benefits of security fixes in major version bumps of shared libraries if you go this route unless they were backported, which may or may not be important in your environment... – voretaq7 Feb 17 '11 at 15:26
  • Well, try it out. It should work, but you can probably construct a scenario where it won't. – Peter Eisentraut Feb 17 '11 at 19:04