Migrate PostgreSQL cluster to PG14 #625
Labels
Clear labels
monitoring
bug
design
dev environment
docs
duplicate
enhancement
feature
good first issue
idea
invalid
kredits-1
kredits-2
kredits-3
on hold
ops
question
security
ui/ux
wontfix
service
discourse
Kosmos Community Forums
Infrastructure metrics, alerts, notifications, etc.
service
accounts
Kosmos Accounts
service
drone-ci
Kosmos Drone CI
service
email
mail.kosmos.org
service
garage
S3-compatible object storage
service
gitea
Kosmos Gitea
service
ipfs
Kosmos IPFS
service
mastodon
kosmos.social
service
nostr
Relays, Blossom server, etc.
service
postgres
Database cluster
service
remotestorage
Portable data storage for the Web
service
wiki
Kosmos Wiki
service
xmpp
Kosmos Chat
Something is not working
Graphic/visual design
Config, builds, CI, deployment, etc.
Documentation
This issue or pull request already exists
Improving existing functionality
New functionality
Dive in, and start contributing
Something to consider
Not a bug
Small contribution
Medium contribution
Large contribution
Currently not actionable
Manual IT ops activities
Looking for an answer
release
major
release
minor
release
patch
All your base are belong to us
User interface, process design, etc.
This won't be fixed
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: kosmos/chef#625
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Adds a bunch of management scripts and other changes to aid with cluster migration by replication.
Since physical replication is not supported between major versions, we set up a new standalone primary/cluster, import a dump from the current cluster, and then use logical replication to keep data in sync until the switchover.
See
doc/postgres/migration.mdfor the full migration runbook and usage of scripts.closes #504
Databases
@@ -0,0 +1,9 @@#!/bin/bashcd /tmp && \(pg_dumpall --globals-only > globals.sql) && \psql -Atqc "SELECT datname FROM pg_database WHERE datallowconn AND datname NOT IN (''template0'',''postgres'')" | \Why is it
template0instead oftemplate1like in all the other places?Ohai @fsmanuel, (very) long time no see!
That's a good catch, it should be
template1, becausetemplate0is automatically excluded by the preceding condition (it doesn't allow connections).Thanks! 🙏
Added more changes and fixes, as well as the new cluster node configs. I think we're ready to merge...
@@ -0,0 +7,4 @@role "replica_logical"end# primary = postgresql_primaryWere these lines left here intentionally?
Not really, just didn't care I guess. I removed them.
👍