PostgreSQL uses Write-Ahead Logging (WAL) as its approach to transaction logging. WAL's central concept is that changes to data files (where tables and indexes reside) must be written only after those changes have been logged, that is, when log records describing the changes have been flushed to permanent storage. If we follow this procedure, we do not need to flush data pages to disk on every transaction commit, because we know that in the event of a crash we will be able to recover the database using the log: any changes that have not been applied to the data pages can be redone from the log records. (This is roll-forward recovery, also known as REDO.)
This is from link below:
But anything coming from memory to disk will start at redo plus databases only guarantee committed transactions. Anything which is only in memory is not committed and non-recoverable. Some HA mechanisms do exist for saving transaction in memory but not PostgreSQL.