ANXS / postgresql

Fairly full featured Ansible role for Postgresql.
http://anxs.io/
MIT License
849 stars 573 forks source link

Support PostgreSQL v12 #450

Closed gclough closed 4 years ago

gclough commented 4 years ago

@thbar ... OK, I think it's working now. I had to do a smaller PR than I wanted to, but I'll follow up with an Ubuntu 18.04 one soon.

gclough commented 4 years ago

@thbar , I had to setup a new system to use different defaults for different versions, as some variables change between versions.

gclough commented 4 years ago

@thbar , @otakup0pe , @UnderGreen , @jlozadad . Could someone review this please?

thbar commented 4 years ago

@gclough I had a first quick look and things look reasonable.

I will try to the role on a < 12 setup to verify that nothing changes (although I don't expect any trouble), and will also try out the modified Vagrant setup to get my feet wet there.

thbar commented 4 years ago

@gclough I did a round of testing today, here is a first bit of feedback:

TASK [ANXS.postgresql : PostgreSQL | Extensions | Make sure the postgis extensions are installed | Debian] *********************************************************************************************************
fatal: [vagrant-geo]: FAILED! => changed=false 
  msg: No package matching 'postgresql-12-postgis-2.3' is available

I'll keep you posted if I have more information about that failure.

thbar commented 4 years ago

On PostGIS failure, it seems related to lack of available package for Postgres 12 (despite what is written on https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS).

Using postgresql_version: 12 and postgresql_ext_postgis_version: 2.5 still fails.

sudo apt-cache search postgis | grep postgresql-12-postgis will return empty result, while older versions (e.g. sudo apt-cache search postgis | grep postgresql-11-postgis) will return the currently in use convention (postgresql-11-postgis-2.5).

I don't know if it's a temporary trouble, or something that will need some care. Merging of this PR could be done, but we should probably open an issue for PostGIS on Postgres 12 once it's done to track this.

thbar commented 4 years ago

Likely explanation on the PostGIS issue I met: I believe 2.5 was recently (circa 4th of October) added to compatibility matrix, but packagers may not have built it yet (https://twitter.com/pwramsey/status/1180160479584378880).

gclough commented 4 years ago

Thanks @thbar ... so long as this doesn't affect backwards compatibility with older versions, then I'll commit the change and we can fix-forward.

I'm just resolving a conflict now, and then we should be good to go.

Cheers, Greg.