I'm following this doc https://www.postgresql.org/docs/current/pgupgrade.html to upgrade my cluster postgres an its replica, but when I run the rsync command, it duplicate the data folder, consuming all the disk space crashing the rsync. Here is the rsync command "rsync --archive --delete --hard-links --size-only --no-inc-recursive old_cluster new_cluster remote_dir". Any thoughts?
why rsync command to postgres upgrade replica are duplicating data folder size increasing disc space
Asked
Active
Viewed 199 times
0
-
1When you upgraded the master, did you do it in link mode? β jjanes Sep 12 '22 at 23:03
-
Yes. and for the rsync i used this "rsync --exclude pg_wal --archive --delete --hard-links --size-only --no-inc-recursive /pgdata/homologacao /pgdata/homologacao/14 pg-replica:/pgdata/homologacao" β argdenis Sep 13 '22 at 11:38
1 Answers
0
The problem was the alignment of directories, due to the difference between origin and destination it ended up getting lost and copying everything. well succeeded command: "rsync --exclude pg_wal --archive --delete --hard-links --size-only --no-inc-recursive /pgdata/homologacao/11 /pgdata/homologacao/14 hom-replica:/pgdata/homologacao"

argdenis
- 21
- 4
-
As itβs currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). β Community Sep 20 '22 at 01:58