Skip to content

Create an image based on Postgres 9.5 #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
md5 opened this issue Jul 8, 2015 · 27 comments
Closed

Create an image based on Postgres 9.5 #8

md5 opened this issue Jul 8, 2015 · 27 comments

Comments

@md5
Copy link
Contributor

md5 commented Jul 8, 2015

cf. docker-library/postgres#70

@md5
Copy link
Contributor Author

md5 commented Jul 24, 2015

Just checked again today whether there's a PostGIS 2.1 package available for Postgres 9.5 and there doesn't appear to be one yet.

@ImreSamu
Copy link
Member

+1

Is it possible to create 9.5-2.2 version ? ("PostgreSQL 9.5 with PostGIS 2.2 )

"PostgreSQL 9.5 and PostGIS 2.2 are both in development. We plan to not support PostgreSQL 9.5 in 2.1 (changes have already happened in 9.5 that make it incompatible with 2.1 (these fixes have been put in 2.2 but not backported to 2.1)) https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS

I am testing programs with different postgre + postgis versions,
so Is it possible to create all Postgre + PostGis supported versions ?
like :

  • 9.0-1.5 ; 9.0-2.0
  • 9.1-1.5 ; 9.1-2.0 ; 9.1-2.2
  • 9.2-1.5 ; 9.2-2.0 ; 9.2-2.2
  • 9.3-2.2
  • 9.4-2.2

( https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS#PostGISSupportMatrix )

@md5
Copy link
Contributor Author

md5 commented Aug 22, 2015

I just checked again and I don't see any PostGIS 2.2 packages at all (I checked both jessie-pgdg and jessie-pgdg-testing). I also don't see any 1.5 or 2.0 packages for any Postgres version.

$ curl -fsSL http://apt.postgresql.org/pub/repos/apt/dists/jessie-pgdg/main/binary-amd64/Packages | grep -w 'Package: postgresql-.*postgis-2.1$' 

Package: postgresql-9.0-postgis-2.1
Package: postgresql-9.1-postgis-2.1
Package: postgresql-9.2-postgis-2.1
Package: postgresql-9.3-postgis-2.1
Package: postgresql-9.4-postgis-2.1

If you can figure out where the packages are (if they exist) and provide a PR that adds the relevant directories and updates the update.sh script, I'll be willing to merge it.

This isn't the first time that I've ran into issues with the maintenance of the PostGIS Debian packages. The more common problem is that packages that used to exist in the index suddenly disappear when a new version is packaged. This has broken the automated build for this package after a new build was triggered by an update to the postgres image more times that I've kept count of.

@md5
Copy link
Contributor Author

md5 commented Aug 22, 2015

I just realized that last curl command was a bit off (it's past my bedtime). But even with the right curl command there are only 2.1 packages in jessie-pgdg:

$ curl -fsSL http://apt.postgresql.org/pub/repos/apt/dists/jessie-pgdg/main/binary-amd64/Packages | grep -w 'Package: postgresql-.*postgis-.*$' |
 grep -v -- -scripts
Package: postgresql-9.0-postgis-2.1
Package: postgresql-9.1-postgis-2.1
Package: postgresql-9.2-postgis-2.1
Package: postgresql-9.3-postgis-2.1
Package: postgresql-9.4-postgis-2.1

It's possible that those packages exist under wheezy-pgdg or some other distro, but I'm only supporting jessie since that's what the base postgres image is based on.

@md5
Copy link
Contributor Author

md5 commented Aug 22, 2015

Looks like there are 2.0 packages for wheezy, but I can't find any 1.5 packages:

$ curl -fsSL http://apt.postgresql.org/pub/repos/apt/dists/wheezy-pgdg/main/binary-amd64/Packages | grep 'Package:.*-postgis-' | grep -v -- -scripts
Package: postgresql-8.4-postgis-2.0
Package: postgresql-9.0-postgis-2.0
Package: postgresql-9.0-postgis-2.1
Package: postgresql-9.1-postgis-2.0
Package: postgresql-9.1-postgis-2.1
Package: postgresql-9.2-postgis-2.0
Package: postgresql-9.2-postgis-2.1
Package: postgresql-9.3-postgis-2.1
Package: postgresql-9.4-postgis-2.1
$ curl -fsSL http://apt.postgresql.org/pub/repos/apt/dists/squeeze-pgdg/main/binary-amd64/Packages | grep 'Package:.*-postgis-' | grep -v -- -scripts
$ curl -fsSL http://apt.postgresql.org/pub/repos/apt/dists/etch-pgdg/main/binary-amd64/Packages | grep 'Package:.*-postgis-' | grep -v -- -scripts
$ 

@md5
Copy link
Contributor Author

md5 commented Aug 26, 2015

FWIW, I've started a branch for 9.5-2.2: https://github.com/appropriate/docker-postgis/tree/postgres-9.5-postgis-2.2

It doesn't yet have a package version in it, since there isn't a package yet, but I'll update it when the first packages are published.

@emilbayes
Copy link

Looks like RMPs available for Postgres 9.5, maybe that helps further the work on this? :)

@md5
Copy link
Contributor Author

md5 commented Oct 19, 2015

@emilbayes Thanks for the heads-up, but it looks like only RPMs were pushed, not *.deb packages. Using RPMs would involve a lot of work switching the base image to centos and would be a breaking change for existing users.

@ImreSamu
Copy link
Member

I have found 9.4-2.2 in the debian "experimental" repo : postgresql-9.4-postgis-2.2 ,

@md5
Copy link
Contributor Author

md5 commented Nov 16, 2015

Thanks @ImreSamu. I saw those packages as well. I haven't had a chance to look at how they differ from the packages provided by the pgdg repositories at http://apt.postgresql.org, but I'd be hesitant to switch to them unless they're fully compatible.

@ImreSamu
Copy link
Member

I'd be hesitant to switch to them unless they're fully compatible.

ok , no problem ... :)

@willfarrell
Copy link

9.5 is now stable and used as the latest at https://hub.docker.com/_/postgres/

Should be a lot easier to add it in now.

@hildo
Copy link

hildo commented Jan 13, 2016

Postgres 9.5 and PostGis 2.2 would be good. Happy to lend a hand if it will help move things along.

@md5
Copy link
Contributor Author

md5 commented Jan 13, 2016

I still don't see packages in the Apt repo for PostGIS 2.2. I also don't see PostGIS 2.1 packages for Postgres 9.5, so I'm afraid we're stuck with the packages we have until that situation is resolved.

If someone can point me to where I can get the packages or provide a PR, I'm happy to review.

$ curl -fsSL http://apt.postgresql.org/pub/repos/apt/dists/jessie-pgdg/main/binary-amd64/Packages | grep -w 'Package: postgresql-.*postgis-.*$' |  grep -v -- -script
s
Package: postgresql-9.0-postgis-2.1
Package: postgresql-9.1-postgis-2.1
Package: postgresql-9.2-postgis-2.1
Package: postgresql-9.3-postgis-2.1
Package: postgresql-9.4-postgis-2.1

@md5
Copy link
Contributor Author

md5 commented Jan 13, 2016

Looks like @sebastic has been working on the Debian package for PostGIS 2.2 over at https://anonscm.debian.org/cgit/pkg-grass/postgis.git

Hope you don't mind the ping @sebastic, but do you have a rough sense of when a PostGIS 2.2 package for Debian will be available and whether it will be targeting jessie or squeeze? It looks like Postgres 9.5 has been packaged for jessie by the PGDG (cf. docker-library/postgres@2c72165), so it would be awesome if I could update this Docker image to PostGIS 2.2 and still keep it based on the postgres image.

@md5
Copy link
Contributor Author

md5 commented Jan 13, 2016

Sorry, I meant stretch, not squeeze.

@sebastic
Copy link

PostGIS 2.2.1 was uploaded to Debian unstable yesterday. Markus Wanner (@mwanner) takes care of the postgis package in PGDG/pgApt, this is complicated somewhat because SFCGAL is only available in stretch & sid.

When PostGIS 2.2.1 migrates to testing I'll update it along with sfcgal for jessie-backports.

@md5
Copy link
Contributor Author

md5 commented Jan 13, 2016

Thanks @sebastic!

@ImreSamu
Copy link
Member

:)

$ curl -fsSL http://apt.postgresql.org/pub/repos/apt/dists/jessie-pgdg/main/binary-amd64/Packages | grep -w 'Package: postgresql-.*postgis-.*$' |  grep -v -- -scripts
Package: postgresql-9.0-postgis-2.1
Package: postgresql-9.1-postgis-2.1
Package: postgresql-9.1-postgis-2.2
Package: postgresql-9.2-postgis-2.1
Package: postgresql-9.2-postgis-2.2
Package: postgresql-9.3-postgis-2.1
Package: postgresql-9.3-postgis-2.2
Package: postgresql-9.4-postgis-2.1
Package: postgresql-9.4-postgis-2.2
Package: postgresql-9.5-postgis-2.2

@md5
Copy link
Contributor Author

md5 commented Jan 24, 2016

Thanks for the bump @ImreSamu. Travis checks are running on a PR now: #17

@md5
Copy link
Contributor Author

md5 commented Jan 24, 2016

Unfortunately, it looks like the updates made to apt.postgresql.org included removing the 2.1 version of the postgis package 😭 (the postgresql-9.x-postgis-2.1 packages are still there, but not postgis 2.1).

@sebastic Do you know who manages apt.postgresql.org? Disappearing package versions have been a recurring problem with that repository.

@sebastic
Copy link

To quote the Apt page on wiki.postgresql.org to which you're redirected from apt.postgresql.org:

The PostgreSQL Global Development Group (PGDG) maintains an APT repository of PostgreSQL packages for Debian and Ubuntu located at http://apt.postgresql.org/pub/repos/apt/. We aim at building PostgreSQL server packages as well as extensions and modules packages on several Debian/Ubuntu releases for all PostgreSQL versions supported.

That page further documents:

Contact

Bugs

Please report bugs on the [email protected] mailing list, or open a bug in the Debian BTS.

@md5
Copy link
Contributor Author

md5 commented Jan 24, 2016

Thanks @sebastic!

@md5
Copy link
Contributor Author

md5 commented Jan 24, 2016

Looks like that postgis package only includes the PostGIS userland binaries:

/usr/bin/pgsql2shp
/usr/bin/shp2pgsql
/usr/bin/raster2pgsql
/usr/bin/shp2pgsql-gui

I believe I can update the 2.1 Docker images to stop installing postgis, but then those binaries will no longer be available.

@md5
Copy link
Contributor Author

md5 commented Jan 24, 2016

I just sent a message to [email protected]. I realize now that providing both 2.1 and 2.2 versions of postgis in the same repository would be problematic since the packages don't have version numbers in their names.

I'm wondering now whether the 2.2 version of the PostGIS userland binaries are still compatible with an installation of postgresql-9.x-postgis-2.1. If so, I can just unpin the version of the postgis package to get the images to build.

@md5
Copy link
Contributor Author

md5 commented Jan 25, 2016

I got a very helpful response from @mwanner on pgsql-pkg-debian and the conclusion was that this image should only support PostGIS 2.2 going forward. Since Postgres 9.0 is EOL, I've opened an issue in the docker-library/postgres repository to remove the postgres:9.0 image from the list of supported tags (see docker-library/postgres#121).

By removing support for Postgres 9.0, we can limit this image to only those Postgres releases that are not EOL, all of which have published packages from PostGIS 2.2.

I'll update this PR later today with the fixes.

@md5 md5 closed this as completed in #17 Jan 28, 2016
@md5
Copy link
Contributor Author

md5 commented Jan 28, 2016

I've merged #17 and the new images based on 2.2 are building now. The test builds on Travis worked fine, so hopefully Docker Hub has no issues building them.

Thanks for your patience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants