aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2023-07-06 17:25:29 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2023-07-06 17:29:12 +0300
commit25624c5d3f2907e3ffd5dee05240e3d33785915a (patch)
treeb4cbca5b11a6e7824c103dfdb5da3c558365d001 /src/backend/tcop/postgres.c
parenta5f312c58d67bcad622a1582776c20643c7dd43b (diff)
downloadpostgresql-25624c5d3f2907e3ffd5dee05240e3d33785915a.tar.gz
postgresql-25624c5d3f2907e3ffd5dee05240e3d33785915a.zip
WAL-log the creation of the init fork of unlogged indexes.
We create a file, so we better WAL-log it. In practice, all the built-in index AMs and all extensions that I'm aware of write a metapage to the init fork, which is WAL-logged, and replay of the metapage implicitly creates the fork too. But if ambuildempty() didn't write 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 files created in the replica: the init fork is not created on the replica. 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 Haas Discussion: https://www.postgresql.org/message-id/6e5bbc08-cdfc-b2b3-9e23-1a914b9850a9%40iki.fi
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions