Add attstattarget to FormExtraData_pg_attribute
authorPeter Eisentraut <[email protected]>
Sun, 17 Mar 2024 11:38:27 +0000 (12:38 +0100)
committerPeter Eisentraut <[email protected]>
Sun, 17 Mar 2024 11:38:27 +0000 (12:38 +0100)
commit6a004f1be87d34cfe51acf2fe2552d2b08a79273
treedf26d6c12042def7b2af3d346ad9fe4c48167e44
parentd939cb2fd612acde0304913213cfbdb01994e682
Add attstattarget to FormExtraData_pg_attribute

This allows setting attstattarget when a relation is created.

We make use of this by having index_concurrently_create_copy() copy
over the attstattarget values when the new index is created, instead
of having index_concurrently_swap() fix it up later.

Reviewed-by: Tomas Vondra <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/4da8d211-d54d-44b9-9847-f2a9f1184c76@eisentraut.org
src/backend/catalog/heap.c
src/backend/catalog/index.c
src/backend/catalog/toasting.c
src/backend/commands/indexcmds.c
src/include/catalog/index.h
src/include/catalog/pg_attribute.h