Downgrading postgresql database

I want to move a few postgresql databases from postgresql13 to postgresql12.
I think I install postgresql13 in a jail.
But what do i do next ?
 
timescaledb seems to have an annoying depedency on postgresql12-server.
I'll first give pg_upgrade a try.
But pg_upgrade returned ... this utility can only upgrade
 
There's no real tool provided by postgres to do this because forward compatibility is not a 'thing' with postgres as things change; sometimes a lot. If your database is simple, then a pg_dump followed by an import into a new v12 should get you 99% of the way.
 
I was going to suggest a build from ports to get around this because whatever specific dependency (if any) to v12 of PostgreSQL databases/timescaledb has would be in v13 unless it was a regression.
Your current approach of backup/restore would probably be easier and quicker, though.
 
The freebsd port is lagging, ie still depends on on postgresql12,
But i'll give this git repository a try,
 
The freebsd port is lagging, ie still depends on on postgresql12
I've encountered this problem until I figured out what was going on; freshports is listing only 1 version (usually the oldest) that is supported. Looking at the makefile for it the git tree, it lists either 12 or 13 as acceptable versions.
 
Interesting , in that case i change my make.conf:
Code:
DEFAULT_VERSIONS+=pgsq=l13
when building postgresql & timescaledb.
I'll give that a try
 
Last edited:
freshports is listing only 1 version (usually the oldest) that is supported.
Freshports shows the version that's set as default. And that's 12. See /usr/ports/Mk/bsd.default-versions.mk:
Code:
# Possible values: 9.6, 10, 11, 12, 13
PGSQL_DEFAULT?=		12

Code:
DEFAULT_VERSIONS+=pgsql13
You're missing an = here. That should be
Code:
DEFAULT_VERSIONS+= pgsql=13
 
Back
Top