postgresql/src
Amit Kapila 12eece5fd5 Fix uninitialized index information access during apply.
The issue happens when building conflict information during apply of
INSERT or UPDATE operations that violate unique constraints on leaf
partitions.

The problem was introduced in commit 9ff68679b5, which removed the
redundant calls to ExecOpenIndices/ExecCloseIndices. The previous code was
relying on the redundant ExecOpenIndices call in
apply_handle_tuple_routing() to build the index information required for
unique key conflict detection.

The fix is to delay building the index information until a conflict is
detected instead of relying on ExecOpenIndices to do the same. The
additional benefit of this approach is that it avoids building index
information when there is no conflict.

Author: Hou Zhijie <houzj.fnst@fujitsu.com>
Reviewed-by:Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Discussion: https://postgr.es/m/TYAPR01MB57244ADA33DDA57119B9D26494A62@TYAPR01MB5724.jpnprd01.prod.outlook.com
2025-04-08 15:35:42 +05:30
..
backend Fix uninitialized index information access during apply. 2025-04-08 15:35:42 +05:30
bin Allow NOT NULL constraints to be added as NOT VALID 2025-04-07 19:19:50 +02:00
common Use XLOG_CONTROL_FILE macro consistently for control file name. 2025-04-07 09:27:33 +09:00
fe_utils add new list type simple_oid_string_list to fe-utils/simple_list 2025-04-04 16:01:22 -04:00
include Introduce file_copy_method setting. 2025-04-08 21:35:38 +12:00
interfaces libpq: Fix some issues in TAP tests for service files 2025-04-07 12:55:09 +09:00
makefiles Add support for basic NUMA awareness 2025-04-07 23:08:17 +02:00
pl plpython: Add test for returning Python set from SETOF function 2025-04-03 11:09:50 +02:00
port Add support for basic NUMA awareness 2025-04-07 23:08:17 +02:00
template thread-safety: gmtime_r(), localtime_r() 2024-08-23 07:43:04 +02:00
test Fix uninitialized index information access during apply. 2025-04-08 15:35:42 +05:30
timezone pg_noreturn to replace pg_attribute_noreturn() 2025-03-13 12:37:26 +01:00
tools Introduce file_copy_method setting. 2025-04-08 21:35:38 +12:00
tutorial Doc: simplify the tutorial's window-function examples. 2025-01-21 14:43:21 -05:00
.gitignore
DEVELOPERS
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
Makefile.global.in Add support for basic NUMA awareness 2025-04-07 23:08:17 +02:00
Makefile.shlib Remove AIX support 2024-02-28 15:17:23 +04:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
nls-global.mk Remove distprep 2023-11-06 15:18:04 +01:00