Thread: suppress empty archive_command warning message

suppress empty archive_command warning message

From
Pavel Tide
Date:
Hello everyone,

Is there a way to suppress the WARNING that is thrown in PG logs if archive_mode is enabled but the archive command is empty? Maybe some configuration key which I have overlooked?

Thanks!

Re: suppress empty archive_command warning message

From
Bruce Momjian
Date:
On Fri, Apr 23, 2021 at 08:48:39PM +0200, Pavel Tide wrote:
> Hello everyone,
> 
> Is there a way to suppress the WARNING that is thrown in PG logs if
> archive_mode is enabled but the archive command is empty? Maybe some
> configuration key which I have overlooked?

Have you tried putting "/bin/true" in there, for non-Windows?

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  If only the physical world exists, free will is an illusion.




Re: suppress empty archive_command warning message

From
Keith
Date:


On Fri, Apr 23, 2021 at 3:02 PM Pavel Tide <paveltide@gmail.com> wrote:
Hello everyone,

Is there a way to suppress the WARNING that is thrown in PG logs if archive_mode is enabled but the archive command is empty? Maybe some configuration key which I have overlooked?

Thanks!

If you're on linux, set the archive_command to "/bin/true"

Keith

Re: suppress empty archive_command warning message

From
Stephen Frost
Date:
Greetings,

* Bruce Momjian (bruce@momjian.us) wrote:
> On Fri, Apr 23, 2021 at 08:48:39PM +0200, Pavel Tide wrote:
> > Is there a way to suppress the WARNING that is thrown in PG logs if
> > archive_mode is enabled but the archive command is empty? Maybe some
> > configuration key which I have overlooked?
>
> Have you tried putting "/bin/true" in there, for non-Windows?

Erm, that would cause all WAL to just be silently thrown away..  To have
the same behavior as having it be unset, you'd set it to '/bin/false'.

Of course, which you want depends, but generally you should be using a
real archive command to archive your WAL, not throwing it away.

Thanks,

Stephen

Attachment

Re: suppress empty archive_command warning message

From
Yogesh Jadhav
Date:
Greetings,

Why would anyone want to set archive_mode on and empty archive_command?

Thanks,
Yogesh

> On 24-Apr-2021, at 1:08 AM, Stephen Frost <sfrost@snowman.net> wrote:
> 
> Greetings,
> 
> * Bruce Momjian (bruce@momjian.us) wrote:
>> On Fri, Apr 23, 2021 at 08:48:39PM +0200, Pavel Tide wrote:
>>> Is there a way to suppress the WARNING that is thrown in PG logs if
>>> archive_mode is enabled but the archive command is empty? Maybe some
>>> configuration key which I have overlooked?
>> 
>> Have you tried putting "/bin/true" in there, for non-Windows?
> 
> Erm, that would cause all WAL to just be silently thrown away..  To have
> the same behavior as having it be unset, you'd set it to '/bin/false'.
> 
> Of course, which you want depends, but generally you should be using a
> real archive command to archive your WAL, not throwing it away.
> 
> Thanks,
> 
> Stephen