Skip to content

Commit b999dc6

Browse files
authored
Upgrade to Pg 15.7 (#6521)
1 parent 87e2787 commit b999dc6

File tree

1,632 files changed

+108939
-73139
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,632 files changed

+108939
-73139
lines changed

ydb/library/yql/parser/pg_wrapper/cflags.inc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,19 @@ CFLAGS(
116116
-Dpg_hmac_init=yql_pg_hmac_init
117117
-Dpg_hmac_create=yql_pg_hmac_create
118118
-Dpg_pwritev_with_retry=yql_pg_pwritev_with_retry
119+
-Dpg_cryptohash_error=yql_pg_cryptohash_error
120+
-Dpg_hmac_error=yql_pg_hmac_error
121+
-Dpg_global_prng_state=yql_pg_global_prng_state
122+
-Dpg_prng_bool=yql_pg_prng_bool
123+
-Dpg_prng_double=yql_pg_prng_double
124+
-Dpg_prng_int32p=yql_pg_prng_int32p
125+
-Dpg_prng_int32=yql_pg_prng_int32
126+
-Dpg_prng_uint32=yql_pg_prng_uint32
127+
-Dpg_prng_int64p=yql_pg_prng_int64p
128+
-Dpg_prng_int64=yql_pg_prng_int64
129+
-Dpg_prng_uint64_range=yql_pg_prng_uint64_range
130+
-Dpg_prng_uint64=yql_pg_prng_uint64
131+
-Dpg_prng_fseed=yql_pg_prng_fseed
132+
-Dpg_prng_seed_check=yql_pg_prng_seed_check
133+
-Dpg_prng_seed=yql_pg_prng_seed
119134
)

ydb/library/yql/parser/pg_wrapper/copy_src.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ def make_sources_list(build_dir):
327327
for line in fsrc:
328328
#print(line.strip())
329329
name = line.strip()
330+
if name.endswith("_scanner.c"): continue
330331
if name.endswith(".c") and need_copy(name) and name not in exclude_from_source_list:
331332
fdst.write(" " + name + "\n")
332333
fdst.write(")\n")

ydb/library/yql/parser/pg_wrapper/copy_src.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -eu
33

4-
VERSION="14.12"
4+
VERSION="15.7"
55

66
errexit() {
77
echo $1
@@ -45,6 +45,7 @@ echo collecting *.c file list
4545
for i in $(find postgresql -name "*.o" | sed -e 's/o$/c/'); do if [ -f $i ]; then realpath --relative-to=. $i; fi; done > src_files
4646
echo collecting *.h file list
4747
find postgresql -type f -name "*.h" | sort >> src_files
48+
find postgresql -type f -name "*_scanner.c" | sort >> src_files
4849
sort src_files > src_files.s
4950
mv src_files.s src_files
5051

ydb/library/yql/parser/pg_wrapper/generate_kernels.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ def main():
349349
'#undef fopen\n'
350350
'#undef bind\n'
351351
'#undef locale_t\n'
352+
'#undef strtou64\n'
352353
'}\n'
353354
'\n'
354355
'#include "arrow.h"\n'

ydb/library/yql/parser/pg_wrapper/pg_aggs.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ extern "C" {
2020
#undef fopen
2121
#undef bind
2222
#undef locale_t
23+
#undef strtou64
2324
}
2425

2526
#include "arrow.h"

ydb/library/yql/parser/pg_wrapper/pg_aggs.inc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,6 +1198,26 @@ auto MakePgAgg_range_intersect_agg_4450() {
11981198
false, false, false, false
11991199
>({}, {}, nullptr, nullptr, nullptr);
12001200
}
1201+
auto MakePgAgg_max_5099() {
1202+
return TGenericAgg<
1203+
TPgDirectFunc<&xid8_larger>, true, TArgs_xid8_larger_Policy,
1204+
TPgDirectFunc<&xid8_larger>, true, TArgs_xid8_larger_Policy,
1205+
false, TPgIndirectFunc, TDefaultArgsPolicy,
1206+
false, TPgIndirectFunc, TDefaultArgsPolicy,
1207+
false, TPgIndirectFunc, false, TDefaultArgsPolicy,
1208+
true, true, true, false
1209+
>({}, {}, nullptr, nullptr, nullptr);
1210+
}
1211+
auto MakePgAgg_min_5100() {
1212+
return TGenericAgg<
1213+
TPgDirectFunc<&xid8_smaller>, true, TArgs_xid8_smaller_Policy,
1214+
TPgDirectFunc<&xid8_smaller>, true, TArgs_xid8_smaller_Policy,
1215+
false, TPgIndirectFunc, TDefaultArgsPolicy,
1216+
false, TPgIndirectFunc, TDefaultArgsPolicy,
1217+
false, TPgIndirectFunc, false, TDefaultArgsPolicy,
1218+
true, true, true, false
1219+
>({}, {}, nullptr, nullptr, nullptr);
1220+
}
12011221
auto MakePgAgg_bit_xor_6164() {
12021222
return TGenericAgg<
12031223
TPgDirectFunc<&int2xor>, true, TArgs_int2xor_Policy,

ydb/library/yql/parser/pg_wrapper/pg_aggs.slow.inc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,6 +1198,26 @@ auto MakePgAgg_range_intersect_agg_4450() {
11981198
false, false, false, false
11991199
>(&range_intersect_agg_transfn, &range_intersect_agg_transfn, nullptr, nullptr, nullptr);
12001200
}
1201+
auto MakePgAgg_max_5099() {
1202+
return TGenericAgg<
1203+
TPgIndirectFunc, true, TDefaultArgsPolicy,
1204+
TPgIndirectFunc, true, TDefaultArgsPolicy,
1205+
false, TPgIndirectFunc, TDefaultArgsPolicy,
1206+
false, TPgIndirectFunc, TDefaultArgsPolicy,
1207+
false, TPgIndirectFunc, false, TDefaultArgsPolicy,
1208+
true, true, true, false
1209+
>(&xid8_larger, &xid8_larger, nullptr, nullptr, nullptr);
1210+
}
1211+
auto MakePgAgg_min_5100() {
1212+
return TGenericAgg<
1213+
TPgIndirectFunc, true, TDefaultArgsPolicy,
1214+
TPgIndirectFunc, true, TDefaultArgsPolicy,
1215+
false, TPgIndirectFunc, TDefaultArgsPolicy,
1216+
false, TPgIndirectFunc, TDefaultArgsPolicy,
1217+
false, TPgIndirectFunc, false, TDefaultArgsPolicy,
1218+
true, true, true, false
1219+
>(&xid8_smaller, &xid8_smaller, nullptr, nullptr, nullptr);
1220+
}
12011221
auto MakePgAgg_bit_xor_6164() {
12021222
return TGenericAgg<
12031223
TPgIndirectFunc, true, TDefaultArgsPolicy,

ydb/library/yql/parser/pg_wrapper/pg_aggs_register.inc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ std::unique_ptr<IPreparedBlockAggregator<IBlockAggregatorCombineAll>> PrepareCom
2727
case 3526: return MakePgAgg_max_3526().PrepareCombineAll(filterColumn, argsColumns, aggDesc);
2828
case 3564: return MakePgAgg_max_3564().PrepareCombineAll(filterColumn, argsColumns, aggDesc);
2929
case 4189: return MakePgAgg_max_4189().PrepareCombineAll(filterColumn, argsColumns, aggDesc);
30+
case 5099: return MakePgAgg_max_5099().PrepareCombineAll(filterColumn, argsColumns, aggDesc);
3031
default: throw yexception() << "Unsupported agg id: " << aggDesc.AggId;
3132
}
3233
}
@@ -58,6 +59,7 @@ std::unique_ptr<IPreparedBlockAggregator<IBlockAggregatorCombineKeys>> PrepareCo
5859
case 3526: return MakePgAgg_max_3526().PrepareCombineKeys(argsColumns, aggDesc);
5960
case 3564: return MakePgAgg_max_3564().PrepareCombineKeys(argsColumns, aggDesc);
6061
case 4189: return MakePgAgg_max_4189().PrepareCombineKeys(argsColumns, aggDesc);
62+
case 5099: return MakePgAgg_max_5099().PrepareCombineKeys(argsColumns, aggDesc);
6163
default: throw yexception() << "Unsupported agg id: " << aggDesc.AggId;
6264
}
6365
}
@@ -90,6 +92,7 @@ std::unique_ptr<IPreparedBlockAggregator<IBlockAggregatorFinalizeKeys>> PrepareF
9092
case 3526: return MakePgAgg_max_3526().PrepareFinalizeKeys(argsColumns.front(), aggDesc);
9193
case 3564: return MakePgAgg_max_3564().PrepareFinalizeKeys(argsColumns.front(), aggDesc);
9294
case 4189: return MakePgAgg_max_4189().PrepareFinalizeKeys(argsColumns.front(), aggDesc);
95+
case 5099: return MakePgAgg_max_5099().PrepareFinalizeKeys(argsColumns.front(), aggDesc);
9396
default: throw yexception() << "Unsupported agg id: " << aggDesc.AggId;
9497
}
9598
}
@@ -123,6 +126,7 @@ std::unique_ptr<IPreparedBlockAggregator<IBlockAggregatorCombineAll>> PrepareCom
123126
case 3527: return MakePgAgg_min_3527().PrepareCombineAll(filterColumn, argsColumns, aggDesc);
124127
case 3565: return MakePgAgg_min_3565().PrepareCombineAll(filterColumn, argsColumns, aggDesc);
125128
case 4190: return MakePgAgg_min_4190().PrepareCombineAll(filterColumn, argsColumns, aggDesc);
129+
case 5100: return MakePgAgg_min_5100().PrepareCombineAll(filterColumn, argsColumns, aggDesc);
126130
default: throw yexception() << "Unsupported agg id: " << aggDesc.AggId;
127131
}
128132
}
@@ -154,6 +158,7 @@ std::unique_ptr<IPreparedBlockAggregator<IBlockAggregatorCombineKeys>> PrepareCo
154158
case 3527: return MakePgAgg_min_3527().PrepareCombineKeys(argsColumns, aggDesc);
155159
case 3565: return MakePgAgg_min_3565().PrepareCombineKeys(argsColumns, aggDesc);
156160
case 4190: return MakePgAgg_min_4190().PrepareCombineKeys(argsColumns, aggDesc);
161+
case 5100: return MakePgAgg_min_5100().PrepareCombineKeys(argsColumns, aggDesc);
157162
default: throw yexception() << "Unsupported agg id: " << aggDesc.AggId;
158163
}
159164
}
@@ -186,6 +191,7 @@ std::unique_ptr<IPreparedBlockAggregator<IBlockAggregatorFinalizeKeys>> PrepareF
186191
case 3527: return MakePgAgg_min_3527().PrepareFinalizeKeys(argsColumns.front(), aggDesc);
187192
case 3565: return MakePgAgg_min_3565().PrepareFinalizeKeys(argsColumns.front(), aggDesc);
188193
case 4190: return MakePgAgg_min_4190().PrepareFinalizeKeys(argsColumns.front(), aggDesc);
194+
case 5100: return MakePgAgg_min_5100().PrepareFinalizeKeys(argsColumns.front(), aggDesc);
189195
default: throw yexception() << "Unsupported agg id: " << aggDesc.AggId;
190196
}
191197
}

ydb/library/yql/parser/pg_wrapper/pg_bc.1.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LLVM_BC(
55
postgresql/src/backend/utils/adt/rangetypes_gist.c
66
postgresql/src/backend/utils/adt/rangetypes_typanalyze.c
77
postgresql/src/backend/utils/adt/tsginidx.c
8+
postgresql/src/backend/utils/adt/windowfuncs.c
89
pg_kernels.1.cpp
910

1011
NAME PgFuncs1
@@ -150,4 +151,7 @@ LLVM_BC(
150151
arrow_timetz_zone
151152
arrow_timetztypmodin
152153
arrow_timetztypmodout
154+
arrow_window_dense_rank_support
155+
arrow_window_rank_support
156+
arrow_window_row_number_support
153157
)

ydb/library/yql/parser/pg_wrapper/pg_bc.14.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ LLVM_BC(
106106
arrow_void_out
107107
arrow_void_recv
108108
arrow_void_send
109+
arrow_xid8_larger
110+
arrow_xid8_smaller
109111
arrow_xid8cmp
110112
arrow_xid8eq
111113
arrow_xid8ge

ydb/library/yql/parser/pg_wrapper/pg_bc.16.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ LLVM_BC(
8383
arrow_pg_reload_conf
8484
arrow_pg_rotate_logfile
8585
arrow_pg_rotate_logfile_v2
86+
arrow_pg_settings_get_flags
8687
arrow_pg_terminate_backend
8788
arrow_set_config_by_name
8889
arrow_show_config_by_name

ydb/library/yql/parser/pg_wrapper/pg_bc.17.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,17 @@ LLVM_BC(
1818
arrow_binary_upgrade_set_missing_value
1919
arrow_binary_upgrade_set_next_array_pg_type_oid
2020
arrow_binary_upgrade_set_next_heap_pg_class_oid
21+
arrow_binary_upgrade_set_next_heap_relfilenode
2122
arrow_binary_upgrade_set_next_index_pg_class_oid
23+
arrow_binary_upgrade_set_next_index_relfilenode
2224
arrow_binary_upgrade_set_next_multirange_array_pg_type_oid
2325
arrow_binary_upgrade_set_next_multirange_pg_type_oid
2426
arrow_binary_upgrade_set_next_pg_authid_oid
2527
arrow_binary_upgrade_set_next_pg_enum_oid
28+
arrow_binary_upgrade_set_next_pg_tablespace_oid
2629
arrow_binary_upgrade_set_next_pg_type_oid
2730
arrow_binary_upgrade_set_next_toast_pg_class_oid
31+
arrow_binary_upgrade_set_next_toast_relfilenode
2832
arrow_binary_upgrade_set_record_init_privs
2933
arrow_btnametextcmp
3034
arrow_bttext_pattern_cmp

ydb/library/yql/parser/pg_wrapper/pg_bc.18.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ LLVM_BC(
2727
arrow_multirange_adjacent_range
2828
arrow_multirange_after_multirange
2929
arrow_multirange_after_range
30+
arrow_multirange_agg_transfn
3031
arrow_multirange_before_multirange
3132
arrow_multirange_before_range
3233
arrow_multirange_cmp

ydb/library/yql/parser/pg_wrapper/pg_bc.19.inc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,22 +84,18 @@ LLVM_BC(
8484
arrow_circle_same
8585
arrow_circle_send
8686
arrow_circle_sub_pt
87-
arrow_close_lb
8887
arrow_close_ls
8988
arrow_close_lseg
9089
arrow_close_pb
9190
arrow_close_pl
9291
arrow_close_ps
9392
arrow_close_sb
94-
arrow_close_sl
9593
arrow_construct_point
9694
arrow_cr_circle
97-
arrow_dist_bl
9895
arrow_dist_bp
9996
arrow_dist_bs
10097
arrow_dist_cpoint
10198
arrow_dist_cpoly
102-
arrow_dist_lb
10399
arrow_dist_lp
104100
arrow_dist_ls
105101
arrow_dist_pathp
@@ -159,7 +155,6 @@ LLVM_BC(
159155
arrow_path_add
160156
arrow_path_add_pt
161157
arrow_path_area
162-
arrow_path_center
163158
arrow_path_close
164159
arrow_path_distance
165160
arrow_path_div_pt

ydb/library/yql/parser/pg_wrapper/pg_bc.2.inc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ LLVM_BC(
33
postgresql/src/backend/access/hash/hash.c
44
postgresql/src/backend/access/spgist/spgkdtreeproc.c
55
postgresql/src/backend/access/transam/xlogfuncs.c
6+
postgresql/src/backend/commands/dbcommands.c
67
postgresql/src/backend/commands/sequence.c
78
postgresql/src/backend/tsearch/wparser_def.c
89
postgresql/src/backend/utils/adt/array_selfuncs.c
@@ -51,13 +52,14 @@ LLVM_BC(
5152
arrow_networkjoinsel
5253
arrow_networksel
5354
arrow_nextval_oid
54-
arrow_pg_backup_start_time
55+
arrow_pg_backup_start
56+
arrow_pg_backup_stop
5557
arrow_pg_create_restore_point
5658
arrow_pg_current_wal_flush_lsn
5759
arrow_pg_current_wal_insert_lsn
5860
arrow_pg_current_wal_lsn
61+
arrow_pg_database_collation_actual_version
5962
arrow_pg_get_wal_replay_pause_state
60-
arrow_pg_is_in_backup
6163
arrow_pg_is_in_recovery
6264
arrow_pg_is_wal_replay_paused
6365
arrow_pg_last_wal_receive_lsn
@@ -66,8 +68,6 @@ LLVM_BC(
6668
arrow_pg_promote
6769
arrow_pg_sequence_last_value
6870
arrow_pg_sequence_parameters
69-
arrow_pg_start_backup
70-
arrow_pg_stop_backup
7171
arrow_pg_switch_wal
7272
arrow_pg_wal_lsn_diff
7373
arrow_pg_wal_replay_pause

ydb/library/yql/parser/pg_wrapper/pg_bc.3.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ LLVM_BC(
4646
arrow_regexeqsel
4747
arrow_regexnejoinsel
4848
arrow_regexnesel
49+
arrow_text_starts_with_support
4950
arrow_texticlike_support
5051
arrow_texticregexeq_support
5152
arrow_textlike_support

ydb/library/yql/parser/pg_wrapper/pg_bc.6.inc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ LLVM_BC(
186186
arrow_pg_operator_is_visible
187187
arrow_pg_opfamily_is_visible
188188
arrow_pg_stat_clear_snapshot
189+
arrow_pg_stat_force_next_flush
189190
arrow_pg_stat_get_analyze_count
190191
arrow_pg_stat_get_archiver
191192
arrow_pg_stat_get_autoanalyze_count
@@ -257,7 +258,9 @@ LLVM_BC(
257258
arrow_pg_stat_get_live_tuples
258259
arrow_pg_stat_get_mod_since_analyze
259260
arrow_pg_stat_get_numscans
261+
arrow_pg_stat_get_replication_slot
260262
arrow_pg_stat_get_snapshot_timestamp
263+
arrow_pg_stat_get_subscription_stats
261264
arrow_pg_stat_get_tuples_deleted
262265
arrow_pg_stat_get_tuples_fetched
263266
arrow_pg_stat_get_tuples_hot_updated
@@ -278,12 +281,14 @@ LLVM_BC(
278281
arrow_pg_stat_get_xact_tuples_inserted
279282
arrow_pg_stat_get_xact_tuples_returned
280283
arrow_pg_stat_get_xact_tuples_updated
284+
arrow_pg_stat_have_stats
281285
arrow_pg_stat_reset
282286
arrow_pg_stat_reset_replication_slot
283287
arrow_pg_stat_reset_shared
284288
arrow_pg_stat_reset_single_function_counters
285289
arrow_pg_stat_reset_single_table_counters
286290
arrow_pg_stat_reset_slru
291+
arrow_pg_stat_reset_subscription_stats
287292
arrow_pg_statistics_obj_is_visible
288293
arrow_pg_table_is_visible
289294
arrow_pg_trigger_depth

ydb/library/yql/parser/pg_wrapper/pg_bc.8.inc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,28 @@ LLVM_BC(
111111
arrow_pg_replication_origin_session_setup
112112
arrow_pg_replication_origin_xact_reset
113113
arrow_pg_replication_origin_xact_setup
114+
arrow_pg_stop_making_pinned_objects
114115
arrow_pgsql_version
116+
arrow_regexp_count
117+
arrow_regexp_count_no_flags
118+
arrow_regexp_count_no_start
119+
arrow_regexp_instr
120+
arrow_regexp_instr_no_endoption
121+
arrow_regexp_instr_no_flags
122+
arrow_regexp_instr_no_n
123+
arrow_regexp_instr_no_start
124+
arrow_regexp_instr_no_subexpr
125+
arrow_regexp_like
126+
arrow_regexp_like_no_flags
115127
arrow_regexp_match
116128
arrow_regexp_match_no_flags
117129
arrow_regexp_split_to_array
118130
arrow_regexp_split_to_array_no_flags
131+
arrow_regexp_substr
132+
arrow_regexp_substr_no_flags
133+
arrow_regexp_substr_no_n
134+
arrow_regexp_substr_no_start
135+
arrow_regexp_substr_no_subexpr
119136
arrow_repeat
120137
arrow_rpad
121138
arrow_rtrim
@@ -132,6 +149,9 @@ LLVM_BC(
132149
arrow_textregexeq
133150
arrow_textregexne
134151
arrow_textregexreplace
152+
arrow_textregexreplace_extended
153+
arrow_textregexreplace_extended_no_flags
154+
arrow_textregexreplace_extended_no_n
135155
arrow_textregexreplace_noopt
136156
arrow_textregexsubstr
137157
arrow_translate

ydb/library/yql/parser/pg_wrapper/pg_bc.9.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ LLVM_BC(
7272
arrow_has_language_privilege_name
7373
arrow_has_language_privilege_name_id
7474
arrow_has_language_privilege_name_name
75+
arrow_has_parameter_privilege_id_name
76+
arrow_has_parameter_privilege_name
77+
arrow_has_parameter_privilege_name_name
7578
arrow_has_schema_privilege_id
7679
arrow_has_schema_privilege_id_id
7780
arrow_has_schema_privilege_id_name
@@ -171,6 +174,7 @@ LLVM_BC(
171174
arrow_int8inc
172175
arrow_int8inc_any
173176
arrow_int8inc_float8_float8
177+
arrow_int8inc_support
174178
arrow_int8larger
175179
arrow_int8lcm
176180
arrow_int8le

ydb/library/yql/parser/pg_wrapper/pg_compat.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ extern "C" {
2828
#undef open
2929
#undef FATAL
3030
#undef locale_t
31+
#undef strtou64

ydb/library/yql/parser/pg_wrapper/pg_kernels.0.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ extern "C" {
2020
#undef fopen
2121
#undef bind
2222
#undef locale_t
23+
#undef strtou64
2324
}
2425

2526
#include "arrow.h"

0 commit comments

Comments
 (0)