I used pg_basebackup for full backups. pg_receivewal for collecting latest WALs from Primary Server.
The scenario I described was for full database restoration in a situation of complete Primary database server unrecoverable crash.
So, it is not the situation when orignial Primary may return back.
I did not use archive_command, because it seemed to be obsolete when pg_receivewal is is used.
In my procedures there is nothing different from standard usage described in Postgres manual.
"pg_receivewal creates files with ".partial" extensions that are semantically different from what the core system ".partial" files" - does it mean that files are useless for database restoring from backup?
From pg_receivewal documentation:
"
pg_receivewal streams the write-ahead log in real time as it's being generated on the server, and does not wait for segments to complete like
archive_command and
archive_library do. For this reason, it is not necessary to set
archive_timeout when using
pg_receivewal." - What is it for? Especially with this "archive_timeout" and " does not wait for segments to complete" remarks.
In a case of server crash usable WAL part file is not accessible (putting pg_wal directory on i.e. NFS Server is not a good idea in my opinion).
It seems that advantage of Postgres database with almost continuous WAL backup compared to some commercial databases when equivalent to archive_timeout must be set to i.e. 10 minutes and end up with a lot of "empty" WALs i.e. during weekends is not true.
It is a pity, because Postgres has all tools to have this advantage, but they must be properly modified. Or there is something I do not understand and this functionality is somehow available.
Wojciech S.