Replies: 2 comments
-
Here is an example of achieving the same thing via # - set up the PGDG apt-archive repo
apt_repository 'pgdg-archive' do
uri "https://apt-archive.postgresql.org/pub/repos/apt"
key "https://www.postgresql.org/media/keys/ACCC4CF8.asc"
distribution ""
components ["#{node['lsb']['codename']}-pgdg-archive", 'main']
action :add
end
# - pin the desired version
apt_preference 'pg_partman' do
package_name "postgresql-#{node['postgres']['version']}-partman"
pin "version #{node['postgres']['pg_partman']['version']}"
pin_priority 900
end
# Install pg_partman
package "postgresql-#{node['postgres']['version']}-partman" |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for this! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm in the middle of some big migrations so having to worry about possible breakage from a surprise pg_partman package update was something I'd like to avoid. After discussing with @keithf4, I decided the simples & safest bet would be to just pin the partman package at 4.7.4 for the time being until my other major projects are done and I can focus on the partman 5.0.0 upgrade steps.
These instructions have been tested on Ubuntu 22.04 (jammy) with the PGDG apt repository setup.
First, you need to add the apt-archive PGDG repo, as that is where 4.7.4 and all older version can be found. Typically you would do this by adding these lines to your
/etc/apt/sources.list
:Next, pin the desired version by adding a file with these contents to
/etc/apt/preferences.d/
(assumes you are on postgresql-15, change if otherwise):You want the priority to be higher than the default (typically
500
). I picked999
to be sure of that.Now you should be able to update and install the package and it will install
4.7.4-2
(or keep it there)Hope this helps if you're in a similar situation.
Beta Was this translation helpful? Give feedback.
All reactions