forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3142a88
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 parent69a674a commit3142a88
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 |
| |
| |||
3044 | 3045 |
| |
3045 | 3046 |
| |
3046 | 3047 |
| |
| 3048 | + | |
3047 | 3049 |
| |
3048 | 3050 |
| |
3049 | 3051 |
| |
|
0 commit comments
Comments
(0)