But what I am supposed to do when content differs? Still return success and ignore or return error? If I return error, wouldn't that prevent wal archiver slave from pushing further WALs?Hi David,thanks for the answer. I read this in documentation but here there is a corner case that I am not sure how to handle:
"""
This requires more care in the archive_command, as it must be careful to not overwrite an existing file with different contents, but return success if the exactly same file is archived twice.
"""
As Adrian said - I'm not seeing the point to even dealing with a shared archive. My solution would be to avoid the problem completely by pointing the standby WAL elsewhere.
That said, if I was a guessing man, I would say that, yes, you indicate failure. The file in question will exist within the archive and will contain the contents from the master. The standby's view of the file would be discarded.
"as it must be careful to not overwrite an existing file with different contents, but return success if the exactly same file is archived twice." - the unspoken flip side is not returning true if the "not overwrite" provision took precedence.
David J.