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

[wip] add postgresql14, remove postgresql12 #33195

Merged
merged 6 commits into from Dec 18, 2021

Conversation

Chocimier
Copy link
Member

No description provided.

@TinfoilSubmarine
Copy link
Contributor

Hi there! I'm testing this out right now, actually bumped it up to 14.1. I had to migrate using pg_dumpall instead of pg_upgrade. I saw there was some history in #243 about installing multiple versions at once so that pg_upgrade could be used, but it seems like that cannot be done anymore due to postgresql-libs version needing to match the major version of postgresql installed. Maybe I'm doing something wrong?

@Chocimier
Copy link
Member Author

Chocimier commented Dec 9, 2021 via email

@TinfoilSubmarine
Copy link
Contributor

My system has postgresql13 and postgresql13-client (and postgresql-libs-13.5_1 as dependency).

I ran ./xbps-src pkg postgresql14 -K and afterwards xi postgresql14 and it spits out the following dependency error:

postgresql-libs-14.1_1 in transaction breaks installed pkg `postgresql13-13.5_1'
postgresql-libs-14.1_1 in transaction breaks installed pkg `postgresql13-client-13.5_1'
Transaction aborted due to unresolved dependencies

I did find an interesting error when mucking around with this in a (completely fresh) chroot:

$ ./xbps-src chroot
=> xbps-src: updating repositories for host (x86_64)...
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/x86_64-repodata' ...
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/nonfree/x86_64-repodata' ...
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/debug/x86_64-repodata' ...
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/multilib/x86_64-repodata' ...
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/multilib/nonfree/x86_64-repodata' ...
[joel@/home/joel/repos/void-packages/masterdir /]$ xbps-install postgresql13 postgresql14

Name            Action    Version           New version            Download size
icu-libs        install   -                 69.1_2                 11MB 
libxml2         install   -                 2.9.10_5               662KB 
pam-libs        install   -                 1.5.2_1                35KB 
postgresql13    install   -                 13.5_1                 6612KB 
postgresql-libs install   -                 14.1_1                 - 
postgresql14    install   -                 14.1_1                 - 

Size to download:               19MB
Size required on disk:          84MB
Space available on disk:       310GB

Do you want to continue? [Y/n] y

[*] Downloading packages
icu-libs-69.1_2.x86_64.xbps.sig: 512B [avg rate: 15MB/s]
icu-libs-69.1_2.x86_64.xbps: 11MB [avg rate: 76KB/s]
icu-libs-69.1_2: verifying RSA signature...
libxml2-2.9.10_5.x86_64.xbps.sig: 512B [avg rate: 16MB/s]
libxml2-2.9.10_5.x86_64.xbps: 662KB [avg rate: 59KB/s]
libxml2-2.9.10_5: verifying RSA signature...
pam-libs-1.5.2_1.x86_64.xbps.sig: 512B [avg rate: 15MB/s]
pam-libs-1.5.2_1.x86_64.xbps: 35KB [avg rate: 130KB/s]
pam-libs-1.5.2_1: verifying RSA signature...
postgresql13-13.5_1.x86_64.xbps.sig: 512B [avg rate: 14MB/s]
postgresql13-13.5_1.x86_64.xbps: 6612KB [avg rate: 68KB/s]
postgresql13-13.5_1: verifying RSA signature...

[*] Verifying package integrity
postgresql-libs-14.1_1: verifying SHA256 hash...
postgresql14-14.1_1: verifying SHA256 hash...

[*] Collecting package files
icu-libs-69.1_2: collecting files...
libxml2-2.9.10_5: collecting files...
pam-libs-1.5.2_1: collecting files...
postgresql13-13.5_1: collecting files...
postgresql-libs-14.1_1: collecting files...
postgresql14-14.1_1: collecting files...

[*] Unpacking packages
icu-libs-69.1_2: unpacking ...
libxml2-2.9.10_5: unpacking ...
pam-libs-1.5.2_1: unpacking ...
postgresql13-13.5_1: unpacking ...
postgresql-libs-14.1_1: unpacking ...
postgresql14-14.1_1: unpacking ...

[*] Configuring unpacked packages
icu-libs-69.1_2: configuring ...
icu-libs-69.1_2: installed successfully.
libxml2-2.9.10_5: configuring ...
libxml2-2.9.10_5: installed successfully.
pam-libs-1.5.2_1: configuring ...
pam-libs-1.5.2_1: installed successfully.
postgresql13-13.5_1: configuring ...
WARNING: cannot create postgres system account (missing useradd or usermod)
The following system account must be created:
   Account: postgres
   Description: 'PostgreSQL database server user'
   Homedir: '/var/lib/postgresql'
   Shell: '/bin/sh'
chown: invalid user: ‘postgres:postgres’
Failed to set perms 0750 postgres:postgres to ./var/lib/postgresql!
chown: invalid user: ‘postgres:postgres’
Failed to set perms 0750 postgres:postgres to ./var/lib/postgresql13!
postgresql13-13.5_1: installed successfully.
postgresql-libs-14.1_1: configuring ...
postgresql-libs-14.1_1: installed successfully.
postgresql14-14.1_1: configuring ...
WARNING: cannot create postgres system account (missing useradd or usermod)
The following system account must be created:
   Account: postgres
   Description: 'PostgreSQL database server user'
   Homedir: '/var/lib/postgresql'
   Shell: '/bin/sh'
chown: invalid user: ‘postgres:postgres’
Failed to set perms 0750 postgres:postgres to ./var/lib/postgresql!
chown: invalid user: ‘postgres:postgres’
Failed to set perms 0750 postgres:postgres to ./var/lib/postgresql14!
postgresql14-14.1_1: installed successfully.

4 downloaded, 6 installed, 0 updated, 6 configured, 0 removed.

I'm honestly still trying to wrap my head around the dependency situation here. I tried to build postgresql13 again to include postgresql13-libs, but it gives the same results afterwards as well.

@Chocimier
Copy link
Member Author

Chocimier commented Dec 9, 2021 via email

@TinfoilSubmarine
Copy link
Contributor

I wasn't actually pointing to the failure to create user, but rather the fact that when installing postgresql13/14 simultaneously it does not error due to postgresql-libs. Regardless, I think this is fixed by your suggestion. However, I did need to bump the revision on postgresql13 for my system to actually upgrade.

One issue though: when I remove postgresql13 it disables the postgres user even though postgresql14 is installed, which uses that user. Is this an XBPS error when multiple packages are trying to use the same user?

@Chocimier Chocimier marked this pull request as ready for review December 18, 2021 14:05
@Chocimier Chocimier merged commit c69c998 into void-linux:master Dec 18, 2021
@Chocimier Chocimier deleted the postgresql14 branch December 18, 2021 14:05
@Chocimier
Copy link
Member Author

Good to hear it's working.

Is this an XBPS error when multiple packages are trying to use the same user?

Yes, run xbps-reconfigure -f postgresql14 if you need the account active.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants