forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit25624c5
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 parenta5f312c commit25624c5
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 |
| |
| |||
3033 | 3034 |
| |
3034 | 3035 |
| |
3035 | 3036 |
| |
| 3037 | + | |
3036 | 3038 |
| |
3037 | 3039 |
| |
3038 | 3040 |
| |
|
0 commit comments
Comments
(0)