Add WAL logging for CREATE/DROP DATABASE and CREATE/DROP TABLESPACE.
Tom Lane <tgl@sss.pgh.pa.us>
Add WAL logging for CREATE/DROP DATABASE and CREATE/DROP TABLESPACE. Fix TablespaceCreateDbspace() to be able to create a dummy directory in place of a dropped tablespace's symlink. This eliminates the open problem of a PANIC during WAL replay when a replayed action attempts to touch a file in a since-deleted tablespace. It also makes for a significant improvement in the usability of PITR replay.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/backup.sgml | modified | +3 −11 |
| src/backend/access/transam/rmgr.c | modified | +7 −5 |
| src/backend/commands/dbcommands.c | modified | +146 −4 |
| src/backend/commands/tablespace.c | modified | +239 −54 |
| src/include/access/rmgr.h | modified | +3 −1 |
| src/include/commands/dbcommands.h | modified | +26 −2 |
| src/include/commands/tablespace.h | modified | +23 −6 |
| src/include/port.h | modified | +2 −1 |
| src/port/path.c | modified | +34 −22 |