David, * David Steele (da...@pgmasters.net) wrote: > On 12/12/17 8:48 PM, Stephen Frost wrote: > > I don't think there is, because, as David points out, the unlogged > > tables are cleaned up first and then WAL replay happens during recovery, > > so the init fork will cause the relation to be overwritten, but then > > later the logged 'drop table' and subsequent re-use of the relfilenode > > to create a new table (or persistence change) will all be in the WAL and > > will be replayed over top and will take care of this. > > Files can be copied in any order, so if an OID is recycled the backup > could copy its first, second, or nth incarnation. It doesn't really > matter since all of it will be clobbered by WAL replay. > > The new base backup code just does the non-init fork removal in advance, > following the same rules that would apply on recovery given the same > file set.
Just to be clear- the new base backup code doesn't actually *do* the non-init fork removal, it simply doesn't include the non-init fork in the backup when there is an init fork, right? We certainly wouldn't want a basebackup actually running around removing the main fork for unlogged tables on a running and otherwise healthy system. ;) Thanks! Stephen
signature.asc
Description: Digital signature