Force primary postgresql server to ship WAL files to Barman

432 views
Skip to first unread message

Amanda Simpson

unread,
Jan 15, 2015, 12:02:14 PM1/15/15
to pgba...@googlegroups.com
Hi,

Our system does a nightly Vacuum full analyze on primary postgresql server and I have used the method suggested by Gabriele to disable postgresql to temporary send WALs to /bin/true (so they don't go to Barman.)

I discovered that those WALs generated right before our Vacuum full analyze were not shipped to Barman, hence got lost when vacuum full starts and generates tons of WALs.

Is there any way to force ship WALs before we start vacuum full? 

Thank you,
Amanda
Message has been deleted

Gabriele Bartolini

unread,
Jan 16, 2015, 8:46:39 AM1/16/15
to pgba...@googlegroups.com
Hi Amanda,

  pg_archivecleanup serves for different purposes - and I would not like to treat them in this mailing list as they regard PostgreSQL replication.

  If you want to force the switch of a log file, you can execute the following query on Postgres:

  SELECT pg_switch_xlog();


Cheers,
Gabriele

--
 Gabriele Bartolini - 2ndQuadrant Italia - Managing Director
 PostgreSQL Training, Services and Support
 gabriele....@2ndQuadrant.it | www.2ndQuadrant.it

2015-01-16 14:42 GMT+01:00 Amanda Simpson <alj...@gmail.com>:
I later found that I should be able to use pg_archivecleanup() to force closing WALs. 

My problem now is how do you put it in a shell script?

thanks,
Amanda

--
--
You received this message because you are subscribed to the "Barman for PostgreSQL" group.
To post to this group, send email to pgba...@googlegroups.com
To unsubscribe from this group, send email to
pgbarman+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/pgbarman?hl=en?hl=en-GB

---
You received this message because you are subscribed to the Google Groups "Barman, Backup and Recovery Manager for PostgreSQL" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pgbarman+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages