Re: BUG #14963: Number of wal files are keep on increasing - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #14963: Number of wal files are keep on increasing
Date
Msg-id 20171214104815.ldrhdbq6vxfevx7h@alvherre.pgsql
Whole thread Raw
In response to Re: BUG #14963: Number of wal files are keep on increasing  (Raghavendra Rao J S V <raghavendrajsv@gmail.com>)
Responses Re: BUG #14963: Number of wal files are keep on increasing  (Stephen Frost <sfrost@snowman.net>)
List pgsql-bugs
Raghavendra Rao J S V wrote:
> Thank you very much for your explanation.
> 
> We are taking the backup of database everyday using pg_basebackup utility. We
> have implemented a pg_basebackup utility through shell script.This will be
> invoked everyday at 2AM and takes the backup of database.

This is a bad idea.  If you don't have a very firm grasp of how to write
a backup system, it's better not to write it yourself, because there are
many possible errors you can make that can lead you to end up with
backups that look ok but are actually invalid.

I suggest you use a battle-tested tool such as https://pgbarman.org/ to
do the backups for you.  It comes with instructions about what to use in
archive_command, how to take base backups, simple mechanism to remove
old backups, easy to use restore operations, etc.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-bugs by date:

Previous
From: Evgeniy Kozlov
Date:
Subject: Re: BUG #14972: row duplicate on first SELECT from CTE (by JOIN/FORUPDATE) from which UPDATE performed recently
Next
From: skaurus@gmail.com
Date:
Subject: BUG #14973: hung queries