Skip to content
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

postgresql: fix regression in NixOS after update to 11.2 #56146

Merged
merged 1 commit into from Feb 21, 2019

Conversation

danbst
Copy link
Contributor

@danbst danbst commented Feb 21, 2019

ryantm bot updates psqlSchema alongside with version: #50646, #55860
but psqlSchema is used to generate stateDir. It shouldn't be updated.

Ideally it should be equal to postgresql major version for pg versions,
but we already have deployments in /var/lib/postgresql/11.1. Strange why
nobody complained when it was changed from 11.0 -> 11.1.

I propose do correct naming for PG12+, but status quo for current versions.

Fixes #56134

ryantm bot updates `psqlSchema` alongside with version: NixOS#50646, NixOS#55860
but `psqlSchema` is used to generate `stateDir`. It shouldn't be updated.

Ideally it should be equal to postgresql major version for pg versions,
but we already have deployments in /var/lib/postgresql/11.1. Strange why
nobody complained when it was changed from 11.0 -> 11.1.

I propose do correct naming for PG12+, but status quo for current versions.

Fixes NixOS#56134
@ryantm
Copy link
Member

ryantm commented Feb 21, 2019

Thanks for fixing this, I'll keep it in mind next time I consider merging psql. For PG12+, can we do:

psqlSchema = lib.versions.major version;

major = v: builtins.elemAt (splitVersion v) 0;

@danbst danbst merged commit d0d0992 into NixOS:master Feb 21, 2019
@danbst danbst deleted the fix-postgresql-schema branch February 21, 2019 17:21
@danbst
Copy link
Contributor Author

danbst commented Feb 21, 2019

It's also unfortunate that there were 5 days, when people on "unstable" could already use 11.2 state dir. Probably even more, as these changes are not propagated instantly to nixos-unstable.

@ryantm I assume bot won't update "11.1" to "11.3" when 11.3 comes out, right?

@ryantm
Copy link
Member

ryantm commented Feb 21, 2019

@danbst Yes, that's right, because it tries to update all instances of the old version to the new one.

@ghost
Copy link

ghost commented Feb 21, 2019

The unstable channel was only updated in the last 48h. Last night was the first time 11.2 was offered, the night before that at 4:40 it was still 11.1.

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

Successfully merging this pull request may close these issues.

None yet

3 participants