On Tue, Jan 10, 2017 at 10:35 PM, Tom DalPozzo <t.dalpozzo@xxxxxxxxx> wrote: > I redid the tests following your suggestion to issue a checkpoint manually. > IT WORKS! > Just a question: when the standby server starts, I see the log error > messages (ex.: "invalid record length...") when WAL end is reached. I know > that it's normal. > But I'm wondering if the system, in order to detect the end of the WAL, > controls only the validity of the records in the WAL. You may want to look at xlogreader.c and track report_invalid_record() to see what are the error checks being done. No full checks are done depending on the record types, but there are some checks for the backup blocks, the size record, etc. > I mean, could random bytes appear as a valid record (very unlikely, but > possible)? Yes, that could be possible if some memory or disk is broken. That's why, while it is important to take backups, it is more important to make sure that they are able to restore correctly before deploying them. -- Michael -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general