Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '01b596f1d9b8fe29977fa47f2cc610a374faa000' into pg15-mas…
…ter-merge Merge YB master commit 01b596f titled Use ldd to determine glibc version instead of scanning binaries. and committed 2024-03-12T13:07:42-07:00 into YB pg15. This is the commit right before bitmap scan support. YB pg15 initial merge refers to 55782d5. - TestPgAlterTableColumnType.java: - YB master 833fc83 deletes the file claiming tests get moved into regress test yb_alter_table_rewrite. YB pg15 touched the file. Delete the file. - TestPgReplicationSlot.java: - consumptionOnSubsetOfColocatedTables: YB master af9178c adds this new test. Adjacent lines conflict with @ignore("YB_TODO(stiwary)") added for replicationConnectionConsumption by YB pg15. Yet, this test also needs to be ignored because of assertion failure of Assert(HistoricSnapshotActive()) in RelationGetIdentityKeyBitmap. - testInnerLSNValues: YB master cc88c41 adds this test. It fails on YB pg15. For now, ignore the test and mark with todo as is done for other replication tests. - testReplicationConnectionUpdateRestartLSN: (same as testInnerLSNValues except it is YB master 350df35) - testReplicationConnectionUpdateRestartLSNWithRestarts: (same as testReplicationConnectionUpdateRestartLSN) - explain.c: - function declarations: YB master e48f1a8 adds parameter yb_estimated_docdb_result_width to ExplainIndexScanDetails. YB pg15 changes indentation of those lines. Trivial merge. - tablecmds.c: - ATRewriteCatalogs: YB pg15 initial merge changes IsYBRelation(rel) to IsYBRelation(tab->rel) in some if conditions. YB master 833fc83 adds !yb_enable_alter_table_rewrite to those same if conditions. Trivial merge. - ATRewriteTable: YB pg15 initial merge changes heap_beginscan to table_beginscan. Adjacent lines conflict with YB master 833fc83 adding logic oldrel->rd_att = oldTupDesc; Trivial resolution. - ATPostAlterTypeParse: upstream PG 87259588d0ab0b8e742e30596afa7ae25caadb18 adds stmt->reset_default_tblspc = true; in the same location YB master 833fc83 adds an if condition. Trivial resolution. - createplan.c: - function declarations: like in explain.c, YB master e48f1a8 adds parameter yb_estimated_docdb_result_width to two functions which YB pg15 changes indentation for. Trivial resolution. - yb_decode.c: - YBDecodeInsert: YB master 7ea6665 removes RelationClose at the end of the function. Adjacent line conflict with YB pg15 merge 417e9b3 which adds extra argument to the ReorderBufferQueueChange function call. Trivial resolution. - YBDecodeDelete: like YB pg15 merge 417e9b3, pass false for the new argument of the new ReorderBufferQueueChange call. - pgoutput.c: - pgoutput_send_begin: YB master cc88c41 modifies send_replication_origin definition to have !IsYugaByteEnabled. Adjacent lines conflict with upstream PG d5a9d86d8ffcadc52ff3729cd00fbd83bc38643c. Furthermore, YB pg15 merge 417e9b3 had issues in this area before, particularly with upstream PG a8fd13cab0ba815e9925dc9676e6309f699b5f72. Upon further inspection, find that upstream PG introduced more uses of the send_repl_origin function that YB likely does not want to enter. Solve it with new code: - For all calls to send_repl_origin, make sure the local variable send_replication_origin passed to it is set to false in case !IsYugaByteEnabled. This also should cover any prior uses of the local variable. In order to do this in a way that has less diff with upstream PG, leave the initial definition as is and only overwrite it with YB logic after. This means reworking YB master cc88c41 which modifies the definition itself. - Within send_repl_origin, assert !IsYugaByteEnabled. This means reverting the extra !IsYugaByteEnabled check before calling send_repl_origin that YB pg15 merge 417e9b3 added because as long as send_replication_origin is false, calling the function should be a no-op. And this way makes diff with upstream PG smaller. - pquery.c: - function declarations: YB master 9e0f33a removes parameter isSingleRowModifyTxn from ProcessQuery. Upstream PG 8255c7a5eeba8f1a38b7a431c04909bde4f5e67d and 2f9661311b83dc481fc19f6e3bda015392010a40 change parameters and indentation of this same function. Trivial merge. - ProcessQuery: - signature: (same as function declarations minus indentation) - YbIsSingleRowModifyTxnPlanned call: YB master 9e0f33a moves some code to helper YbIsSingleRowModifyTxnPlanned in ybcModifyTable.c. YB pg15 161efd6 translates some of that code for PG 15. Transfer those edits to the new location. - PortalRunMulti: - ProcessQuery call: (same as function declarations) - ybcModifyTable.c: (see pquery.c ProcessQuery). - ruleutils.c: - function declarations: - YB master 833fc83 adds new parameter is_yb_alter_table to some functions. YB pg15 changes indentation. Trivial merge. - YB master 833fc83 also adds new function yb_decompile_pk_column_index_array where upstream PG also adds new function get_reloptions. Trivial merge. - pg_get_indexdef_worker: conflict between upstream PG 87259588d0ab0b8e742e30596afa7ae25caadb18 and YB master 833fc83 which moves the code under two if conditions. - pg_get_constraintdef_worker: - an indexId definition: YB master 833fc83 moves one indexId definition under !is_yb_alter_table condition. Upstream PG 8b069ef5dca97cd737a5fd64c420df3cd61ec1c9 and 94aa7cc5f707712f592885995a28e018c7c80488 change and move this code higher. Move the conditioning to the new location. Since both is_yb_alter_table and !is_yb_alter_table conditions need to be moved up, combine them to a single ternary operation. - tblspc definition: again, conflict between upstream PG 87259588d0ab0b8e742e30596afa7ae25caadb18 and YB master 833fc83 which moves the code under one if condition. One difference is that tblspc declaration is left outside the if scope to reduce diff with upstream PG. - guc.c: - ResetAllOptions: upstream PG 2432b1a04087edc2fd9536c7c9aa4ca03fd1b363 modifies if body and YB master d8fc67d changes if condition. Apply both. - AtEOXact_GUC: (same as ResetAllOptions) - ReportGUCOption: same upstream PG 2432b1a04087edc2fd9536c7c9aa4ca03fd1b363 moves condition (record->flags & GUC_REPORT) into new function ReportChangedGUCOptions. Same YB master d8fc67d touches that condition. Translate to the new location. - set_config_option_ext: (same as ResetAllOptions) - pathnodes.h: - IndexOptInfo: adjacent lines conflict between upstream PG 74dfe58a5927b22c744b29534e67bfdd203ac028 and YB master e48f1a8 (relation.h). - timestamp regress tests: - merge with YB master 77d71da. - costsize.c: - includes: upstream PG f09346a9c6218dd239fdf3a79a729716c0d305bd removes optimizer/var.h. Use optimizer/optimizer.h instead. This was already added by the initial merge 55782d5. - yb_get_ybctid_width: YB master e48f1a8 adds heap_open/heap_close. Change to table_open/table_close. This requires adding table.h include. - yb_get_docdb_result_width: (same as yb_get_ybctid_width) - yb_virtual_wal_client.c: - CleanupAckedTransactions: YB master 350df35 introduces code using lnext, but upstream PG 1cff1b95ab6ddae32faa3efe0d95a820dbfdc164 adds another parameter, so pass it. Similarly, list_delete_cell is also affected to remove a parameter, so don't pass it. - pg15_tests/passing_tests.tsv: - remove TestPgAlterTableColumnType tests since that file was deleted by YB master 833fc83. - TestSessionParameters.java: - SessionParameters: YB master d8fc67d expects extra_float_digits default to be 0, but upstream PG 02ddd499322ab6f2f0d58692955dc9633c2150fc changed the default to 1, so adjust accordingly.
- Loading branch information