forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit80abec3
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 parent162aa47 commit80abec3
1 file changed
+2
-0
lines changedLines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
| 55 | + | |
55 | 56 |
| |
56 | 57 |
| |
57 | 58 |
| |
| |||
3012 | 3013 |
| |
3013 | 3014 |
| |
3014 | 3015 |
| |
| 3016 | + | |
3015 | 3017 |
| |
3016 | 3018 |
| |
3017 | 3019 |
| |
|
0 commit comments
Comments
(0)