Archive_command

Started by Martin Marquesalmost 18 years ago2 messagesgeneral
Jump to latest
#1Martin Marques
martin@marquesminen.com.ar

I have a question related to the archive_command option of postgresql.conf.

In the documentation[1]http://www.postgresql.org/docs/8.3/interactive/continuous-archiving.html I found examples that add a "< /dev/null" at the
end of the cp command. I know what the redirection from /dev/null does
(send an EOF), but is it really needed? In [2]http://www.postgresql.org/docs/8.3/interactive/runtime-config-wal.html#GUC-ARCHIVE-COMMAND there are examples that
don't have the redirection of STDIN from /dev/null.

[1]: http://www.postgresql.org/docs/8.3/interactive/continuous-archiving.html
http://www.postgresql.org/docs/8.3/interactive/continuous-archiving.html
[2]: http://www.postgresql.org/docs/8.3/interactive/runtime-config-wal.html#GUC-ARCHIVE-COMMAND
http://www.postgresql.org/docs/8.3/interactive/runtime-config-wal.html#GUC-ARCHIVE-COMMAND

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Martin Marques (#1)
Re: Archive_command

Martin Marques <martin@marquesminen.com.ar> writes:

I have a question related to the archive_command option of postgresql.conf.
In the documentation[1] I found examples that add a "< /dev/null" at the
end of the cp command. I know what the redirection from /dev/null does
(send an EOF), but is it really needed?

The examples that have that are using "cp -i", and the point of the
redirect is to ensure that cp doesn't eat any input intended for someone
else if it actually does see a conflict (and try to prompt the user).

regards, tom lane