Re: BUG #14963: Number of wal files are keep on increasing

From: Raghavendra Rao J S V <raghavendrajsv(at)gmail(dot)com>
To: Francisco Olarte <folarte(at)peoplecall(dot)com>, Sergei Kornilov <sk(at)zsrv(dot)org>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14963: Number of wal files are keep on increasing
Date: 2017-12-12 09:51:10
Message-ID: CAEHH7R50pwkKJ13NPxxA3od+oL3pOX9vMAdxMxFzaRaKo9m0xg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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.

We don't have any building standby server. In order to take the backup of
the database through pg_basebackup utility, we have enable below things.

wal_level = archive
archive_mode = on
max_wal_senders = 1

Through your update, I understand we haven't enabled archive_command
(#archive_command
= '') due to this number of wal files are keep on growing in pg_xlog. How
to meet my requirement? Please guide me .

Regards,
Raghavendra Rao

On Tue, Dec 12, 2017 at 2:32 PM, Francisco Olarte <folarte(at)peoplecall(dot)com>
wrote:

> Raghavendra :
>
> On Tue, Dec 12, 2017 at 9:52 AM, Raghavendra Rao J S V
> <raghavendrajsv(at)gmail(dot)com> wrote:
> > Below error is there in several times in log file.
> > WARNING,01000,"archive_mode enabled, yet archive_command is not
> > set",,,,,,,,,""
>
> This tells it all.
>
> Archive mode tells postgres you want to keep all the log files, for
> backup purposes or building standby or whatever.
>
> To implement this postgres calls your archive_command to copy the log
> files, and if it fails logs and KEEPS the file, assuming it will
> succeed later, but it doesn't delete them, as postgres tries very hard
> to avoid loosing any data.
>
> In your case you should probably disable archive mode, since you are
> not archiving. Or maybe implement archive command ( see the section on
> archiving on the docs ).
>
> Also note your are hitting this behaviour for archive_command,
> explicitly written in the docs: "If archive_command is an empty string
> (the default) while archive_mode is enabled, WAL archiving is
> temporarily disabled, but the server continues to accumulate WAL
> segment files in the expectation that a command will soon be provided.
> "
>
> This is for situation like a change in log storage, postgres
> accumulates logs until you finish the switch, then you restart with a
> new working archive command and all the logs are copied and deleted.
>
> Francisco Olarte.
>

--
Regards,
Raghavendra Rao J S V
Mobile- 8861161425

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message martinsson.patrik 2017-12-12 10:00:46 BUG #14967: Postgresql won't start after upgrade from postgresql93-9.3.20-1PGDG.rhel7.x86_64
Previous Message Sergei Kornilov 2017-12-12 09:44:48 Re: BUG #14963: Number of wal files are keep on increasing