Amit Kapila <amit.kapil...@gmail.com> writes: > > I am not sure about rsync, in my production server I have for example > > 111 GB in pg_xlog and if I run rsync for pg_xlog it must send ~ 40GB > > of new WALs I think. > > > > Isn't the difference between old and new is just the last WAL segment > file? What is the source of this difference?
Postgres generate WAL files forward, and at standby too :-( For example: === master === $ psql -c 'select pg_current_xlog_insert_location()' pg_current_xlog_insert_location --------------------------------- 4ED09/34A74590 (1 row) $ ls 9.2/main/pg_xlog/ | awk '/4ED0900000034/,/xxx/ { print }' | wc -l 2262 ============== === standby === $ psql -c 'select pg_last_xlog_replay_location()' pg_last_xlog_replay_location ------------------------------ 4ED0A/AECFD7B8 (1 row) postgres@avi-sql29:~$ ls 9.2/main/pg_xlog/ | awk '/4ED0A000000AE/,/xxx/ { print }' | wc -l 2456 =============== See https://www.postgresql.org/docs/9.2/static/wal-configuration.html > they are recycled (renamed to become the next segments in the numbered > sequence) -- Sergey Burladyan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers