pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: WAL-log the creation of the init fork of unlogged indexes. 7+ messages / 1 participants [nested] [flat]
* pgsql: WAL-log the creation of the init fork of unlogged indexes. @ 2023-07-06 14:30 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 7+ messages in thread From: Heikki Linnakangas @ 2023-07-06 14:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/3142a8845b44699761e41955a4e97ccee07c3734 Modified Files -------------- src/backend/catalog/index.c | 2 ++ 1 file changed, 2 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: WAL-log the creation of the init fork of unlogged indexes. @ 2023-07-06 14:30 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 7+ messages in thread From: Heikki Linnakangas @ 2023-07-06 14:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/bf7b70e6bf4ad07f4a46c51a7f866ef89f82404c Modified Files -------------- src/backend/catalog/index.c | 2 ++ 1 file changed, 2 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: WAL-log the creation of the init fork of unlogged indexes. @ 2023-07-06 14:30 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 7+ messages in thread From: Heikki Linnakangas @ 2023-07-06 14:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/25624c5d3f2907e3ffd5dee05240e3d33785915a Modified Files -------------- src/backend/catalog/index.c | 2 ++ 1 file changed, 2 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: WAL-log the creation of the init fork of unlogged indexes. @ 2023-07-06 14:30 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 7+ messages in thread From: Heikki Linnakangas @ 2023-07-06 14:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/32f327f681d5ea86582c50e3eaf8f52a9ee65754 Modified Files -------------- src/backend/catalog/index.c | 2 ++ 1 file changed, 2 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: WAL-log the creation of the init fork of unlogged indexes. @ 2023-07-06 14:30 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 7+ messages in thread From: Heikki Linnakangas @ 2023-07-06 14:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c50b869edad40455efc9a7287c45648d7a2715b2 Modified Files -------------- src/backend/catalog/index.c | 2 ++ 1 file changed, 2 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: WAL-log the creation of the init fork of unlogged indexes. @ 2023-07-06 14:30 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 7+ messages in thread From: Heikki Linnakangas @ 2023-07-06 14:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/80abec3870692454c42b6b809f4b26cf72ea0736 Modified Files -------------- src/backend/catalog/index.c | 2 ++ 1 file changed, 2 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: WAL-log the creation of the init fork of unlogged indexes. @ 2023-07-06 14:30 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 7+ messages in thread From: Heikki Linnakangas @ 2023-07-06 14:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/988719b88d1e558e9a45d53bb36ba4a748f42b24 Modified Files -------------- src/backend/catalog/index.c | 2 ++ 1 file changed, 2 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2023-07-06 14:30 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-07-06 14:30 pgsql: WAL-log the creation of the init fork of unlogged indexes. Heikki Linnakangas <heikki.linnakangas@iki.fi> 2023-07-06 14:30 pgsql: WAL-log the creation of the init fork of unlogged indexes. Heikki Linnakangas <heikki.linnakangas@iki.fi> 2023-07-06 14:30 pgsql: WAL-log the creation of the init fork of unlogged indexes. Heikki Linnakangas <heikki.linnakangas@iki.fi> 2023-07-06 14:30 pgsql: WAL-log the creation of the init fork of unlogged indexes. Heikki Linnakangas <heikki.linnakangas@iki.fi> 2023-07-06 14:30 pgsql: WAL-log the creation of the init fork of unlogged indexes. Heikki Linnakangas <heikki.linnakangas@iki.fi> 2023-07-06 14:30 pgsql: WAL-log the creation of the init fork of unlogged indexes. Heikki Linnakangas <heikki.linnakangas@iki.fi> 2023-07-06 14:30 pgsql: WAL-log the creation of the init fork of unlogged indexes. Heikki Linnakangas <heikki.linnakangas@iki.fi>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox