forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit32f327f
committed
WAL-log the creation of the init fork of unlogged indexes.
We create a file, so we better WAL-log it. In practice, all thebuilt-in index AMs and all extensions that I'm aware of write ametapage to the init fork, which is WAL-logged, and replay of themetapage implicitly creates the fork too. But if ambuildempty() didn'twrite any page, we would miss it.This can be seen with dummy_index_am. Set up replication, create a'dummy_index_am' index on an unlogged table, and look at the filescreated in the replica: the init fork is not created on thereplica. Dummy_index_am doesn't do anything with the relation files,however, so it doesn't lead to any user-visible errors.Backpatch to all supported versions.Reviewed-by: Robert HaasDiscussion:https://www.postgresql.org/message-id/6e5bbc08-cdfc-b2b3-9e23-1a914b9850a9%40iki.fi1 parentcf3e298 commit32f327f
1 file changed
+2
-0
lines changedLines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
54 | 54 |
| |
55 | 55 |
| |
56 | 56 |
| |
| 57 | + | |
57 | 58 |
| |
58 | 59 |
| |
59 | 60 |
| |
| |||
3024 | 3025 |
| |
3025 | 3026 |
| |
3026 | 3027 |
| |
| 3028 | + | |
3027 | 3029 |
| |
3028 | 3030 |
| |
3029 | 3031 |
| |
|
0 commit comments
Comments
(0)