Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'ac9164b6c047ff4535edfd498632c954da854215' into pg15-mas…
…ter-merge Merge YB master commit ac9164b titled [#23173] DocDB: Allow large bytes to be passed to RateLimiter and committed 2024-07-19T11:00:31-07:00 into YB pg15. YB pg15 initial merge refers to 55782d5. - BasePgSQLTest.java: - MAX_ATTEMPTS_TO_DESTROY_CONTROL_CONN: adjacent conflict between YB master 58b746e adding this variable and YB pg15 6e887a9 removing FailOnConflictTestGflags. - TestYsqlUpgrade.java: - migratingIsEquivalentToReinitdb: YB master 2ec9224 moves this test lower while YB pg15 4638d7d adds @ignore line. - indexam.c: - yb_index_getbitmap: adjacent conflict between YB master b8fedf6 removing third argument to function call and upstream PG 346ed70b0ad7efc574711a97812692dab4542712 changing rd_amroutine to rd_indam. - xact.c: - TopTransactionStateData: YB master 3494424 adds false ybIsInternalRcSubTransaction at the end of the struct. Upstream PG 98afa68d935215e8ab2c7de7fb45972a03e3da26 changes the style. As part of merging, remove the redundant code comments. - bootstrap.c: - BootstrapModeMain: YB pg15 3e44ae9 changes YbFirstBootstrapObjectId to FirstGenbkiObjectId and reindents all arguments of the YBCCreateDatabase function call. YB master 8becd35 removes "template0" and changes the last argument of the same function call. Merge. - tablecmds.c: - declarations: YB master 19ab966 adds a new parameter yb_tab to the function ATExecDropColumn. Adjacent lines conflict with changes to surrounding functions by upstream PG. - ATExecDropColumn: upstream PG commit 1df5875d39383b3981b804666ee1f4b0ff65943f changes to use performMultipleDeletions instead of performDeletion. YB master commit 7c8343d changes the performDeletion call to use YB_SKIP_YB_DROP_COLUMN as the flag parameter. Resolve the conflict by using YB_SKIP_YB_DROP_COLUMN as the flag parameter in the performMultipleDeletions call. - nodeValuesscan.c: - ExecInitValuesScan: conflict with YB master 471c7c4 which is an upstream PG point import of an old commit already present in REL_15_2. Discard the incoming master change. - nodeYbBitmapIndexscan.c: - MultiExecYbBitmapIndexScan: YB pg15 6368931 changes ybscan->relation to ybscan->rs_base.rs_rd while YB master b8fedf6 removes this code. Remove it. - misc.c: - YB master 0a73bdd is an import of upstream PG e082734c8e78e6622a0422e612a870278721e83f on REL_11_STABLE. The REL_15_STABLE equivalent is 595c988c90024acdc56479d0a631a232a9d19e36, and it does not affect this file since the functions have moved to signalfuncs.c. - signalfuncs.c: - pg_signal_backend: apply the 595c988c90024acdc56479d0a631a232a9d19e36 patch here (see misc.c explanation). - syscache.c: - includes: adjacent conflict. YB pg15 initial merge moves genam.h and heapam.h includes to new Yugabyte includes section. YB master 968e831 adds assert.h include. - yb_cache_index_name_table: - Adjacent conflict between YB pg15 bea1ffb removing YbPinnedObjectKey, YbPinnedObjectsCacheData, YbPinnedObjectsCache and YB master 968e831 adding yb_cache_index_name_table. - Between PG 11.2 and 15.2, six additional catcache entries need to be added into the yb_cache_index_name_table array: - "pg_parameter_acl_parname_index", - "pg_parameter_acl_oid_index", - "pg_publication_namespace_oid_index", - "pg_publication_namespace_pnnspid_pnpubid_index", - "pg_range_rngmultitypid_index", - "pg_statistic_ext_data_stxoid_inh_index", - pg_dump.c: - help: adjacent conflict between YB master eb77547 adding --read-time option and YB pg15 7e413a0f82c8f8e9abb3981839191414de3aae08 adding --rows-per-insert option. - execnodes.h: - YbBitmapIndexScanState: adjacent conflict between YB master 7e413a0f82c8f8e9abb3981839191414de3aae08 adding biss_requires_recheck and YB pg15 cd1df46 changing the type biss_ScanDesc. - ValuesScanState: YB master 471c7c4 is an upstream PG point import of an old commit already present in REL_15_2. Discard the incoming master change. - catcache.h: - SetCatCacheTuple: adjacent conflict between YB pg15 initial merge adding SetCatCacheTuple, SetCatCacheList, RelationHasCachedLists and YB master 968e831 renaming GetCatCacheMisses to YbGetCatCacheMisses and adding YbGetCatCacheIdMisses. - syscache.h - YbInitPinnedCacheIfNeeded: adjacent conflict between YB pg15 bea1ffb removing YbInitPinnedCacheIfNeeded, YbResetPinnedCache, YbIsObjectPinned, YbPinObjectIfNeeded and YB master 968e831 adding YbCheckCatalogCacheIndexNameTable and YbGetCatalogCacheIndexName. - privileges.out: - pg_signal_backend can't signal superusers: YB master 0a73bdd is an import of upstream PG e082734c8e78e6622a0422e612a870278721e83f on REL_11_STABLE. The REL_15_STABLE equivalent is 595c988c90024acdc56479d0a631a232a9d19e36. Update the test in accordance with that, which should apply cleanly. - yb_pg_privileges.out: (similar to privileges.out with trivial conflict) - privileges.sql: (similar to privileges.out) - yb_pg_privileges.sql: (similar to yb_pg_privileges.out) - yb_pg_dml_serial_schedule: - YB pg15 4f17a04 splits yb_pg_dml_serial_schedule to that and yb_dml_serial_schedule. YB master 471c7c4 adds test yb_dml to yb_pg_dml_serial_schedule. Place it in yb_dml_serial_schedule instead. - yb_dml_serial_schedule: (see above) - source_ddl_end_handler.c: - ProcessSourceEventTriggerDDLCommands: YB master 8142fdc renames some variables from camel case to snake case. YB pg15 07f3c7d adapts this code in accordance with upstream PG 2f9661311b83dc481fc19f6e3bda015392010a40 changing char* to CommandTag enum. - ybc_pg_typedefs.h: - YBCPgGFlagsAccessor: YB master 1773ae2 adds ysql_use_fast_backward_scan while both YB pg15 fedbdac and YB master 56d2d2d add TEST_generate_ybrowid_sequentially. Take both. - ybc_pggate.cc: (similar to ybc_pg_typedefs.h) - yb_pg_metrics.c: - statementType: YB master 968e831 adds CatCacheMisses_# entries. Due to six additional cache entries between PG 11.2 and 15.2 (see syscache.c explanation), add six more entries here: - CatCacheMisses_79, - CatCacheMisses_80, - CatCacheMisses_81, - CatCacheMisses_82, - CatCacheMisses_83, - CatCacheMisses_84, - pg_proc.dat: - yb_reset_analyze_statistics: YB master 9f2f70e introduces this code. Upstream PG 814c9019aa7b0ce3a4f19415023a256fdd717b20 changes prolang => '14' to prolang => 'sql' Do the same here to avoid the following initdb error: unresolved OID reference "14" in pg_proc.dat field prolang line 12041 - yb_system_views.sql: - yb_reset_analyze_statistics: YB master 9f2f70e introduces this function. - Upstream PG 6cbfb784c3c91146148a76d50cda6f69ae6a79fb splits pg_statistic_ext to that and pg_statistic_ext_data, so adapt the function accordingly. - Upstream PG 3d351d916b20534f973eda760cde17d96545d4c4 makes reltuples = -1 by default instead of 0. Adapt the function accordingly. - YB master appears to miss the case for handling partitioned tables. This likely didn't surface in tests on master because reltuples = 0 by default in master. - V52__22028__yb_reset_analyze_statistics.sql: - yb_reset_analyze_statistics: (same) - yb_reset_analyze.sql, yb_reset_analyze.out: - This test is introduced by YB master 9f2f70e. Adapt to PG 15: - Add GRANT ALL ON SCHEMA public for non-super users. - Adapt to pg_statistic_ext_data change by upstream PG 6cbfb784c3c91146148a76d50cda6f69ae6a79fb similarly to the above resolution. - Adapt to reltuples = -1 change by upstream PG 3d351d916b20534f973eda760cde17d96545d4c4 similar to the above resolution. - Update an expected output for pg_database ncolstats from 13 to 16 since pg_database now has more columns. - explain.c: - yb_fix_indexpr_mutator: YB master de8c392 adds this function. Change varnoold to varnosyn in accordance with upstream PG 9ce77d75c5ab094637cc4a446296dc3be6e3c221. - ybccmds.c: - YBCDropColumn: YB master 19ab966 adds a raw_parser call. Upstream PG 844fe9f159a948377907a63d0ef3fb16dc51ce50 adds a new argument for raw_parser. Pass the appropriate argument RAW_PARSE_DEFAULT. - yb_alter_table_rewrite.out: - ALTER TABLE test_drop_pk_column_part DROP COLUMN id: YB master 19ab966 adds this test. Change the error message according to upstream PG a0555ddab9b672a04681ce0d9f6c94104c01b15f. - nodeYbBitmapTablescan.c: - YbBitmapTableNext: YB master b8fedf6 adds CreateTemplateTupleDesc and ExecInitScanTupleSlot calls. The signatures of those functions changes between PG 11.2 and 15.2. Follow a similar transformation as in nodeYbSeqscan.c YbSeqNext. - procarray.c: - GetSnapshotDataReuse: YB master edbd06b sets yb_read_time_point_handle in GetSnapshotData. Upstream PG 623a9ba79bbdd11c5eccb30b8bd5c446130e521c adds an additional GetSnapshotDataReuse alongside GetSnapshotData. Set yb_read_time_point_handle there as well. - yb_query_diagnostics.c: - BuiltinTrancheNames: YB master 47f40bb adds LWLockRegisterTranche call. Upstream PG 29c3e2dd5a6aeaf1a23d7d83d665501e2dcc6955 replaces that with a BuiltinTrancheNames array. Translate to lwlock.c BuiltinTrancheNames. - DumpToFile: YB master 47f40bb adds FileWrite function call. Upstream PG c24dcd0cfd949bdf245814c4c2b3df828ee7db36 adds extra offset parameter. Pass 0. - lwlock.c: - BuiltinTrancheNames: (see yb_query_diagnostics.c BuiltinTrancheNames) - hba.c: - get_hba_options: YB master 18bb9b8 adds if (hba->yb_jwt_jwks_url) block to this function. The function moves to hbafuncs.c by upstream PG d4781d8873f8c3fc8b0957cc03ce91627576cf36. - hbafuncs.c: (see hba.c) - wait_event.h: - WaitEventActivity: YB master 47f40bb adds YB_WAIT_EVENT_QUERY_DIAGNOSTICS_MAIN to WaitEventActivity in pgstat.h. Upstream PG a333476b925134f6185037eaff3424c07a9f466f moves this code to wait_event.h. - wait_event.c: - pgstat_get_wait_activity: (similar to wait_event.h) - yb_index_schedule: - YB master 56d2d2d removes yb_index_serial_schedule and yb_index_serial2_schedule and makes yb_index_schedule and yb_pg_index_schedule. YB pg15 9690419 adds yb_index_including test to yb_index_serial_schedule. Move that test to yb_index_schedule. - ipci.c - CreateSharedMemoryAndSemaphores: upstream PG 0bd305ee1d427ef29f5fa4fa20567e3b3f5ff792 moves code into CalculateShmemSize. YB 47f40bb adds code there. Move that code to the new location. Note also upstream PG 4f2400cb3f10aa79f99fba680c198237da28dd38 modifying an adjacent line. - backend/utils/misc/MakeFile: - OBJS: YB master 47f40bb adds yb_query_diagnostics.o to the list. YB pg15 changes the style. - snapmgr.c: - RestoreSnapshot: adjacent conflict between YB master edbd06b defining yb_read_time_point_handle and upstream PG 623a9ba79bbdd11c5eccb30b8bd5c446130e521c defining snapXactCompletionCount. - dbcommands.c: - createdb: upstream PG aa01051418f10afbdfa781b8dc109615ca785ff9 creates if (OidIsValid(dboid)) and else case, moving existing code into the else case. YB master dee7691 adds "CREATE DATABASE using templates other than template0 and template1" code in the same place. Order the YB master added code before the if-else. Secondly, the same YB master commit modifies a YBCCreateDatabase function call. There are two such calls here, one for each branch of the if-else (for history, follow YB pg15 07f3c7d commit message). Modify each call. - snapshot.h: - struct YbReadTimePointHandle: adjacent conflict between upstream PG 63746189b23815415cacc715fdc4f6b991f1a5e7 removing SnapshotSatisfiesFunc code and YB master edbd06b adding YbReadTimePointHandle code. - struct SnapshotData: adjacent conflict between upstream PG 623a9ba79bbdd11c5eccb30b8bd5c446130e521c adding snapXactCompletionCount field and YB master edbd06b adding yb_read_time_point_handle field. - pg_dml.cc: - BindColumn: adjacent lines conflict between YB pg15 0df60d3 changing code in function and YB master 47da28c changing function signature style. - has_aggregate_targets: adjacent lines conflict between YB pg15 5e6edbf removing has_system_targets and YB master 47da28c removing both has_aggregate_targets and has_system_targets. - pg_dml.h: - has_secondary_index_with_doc_op: adjacent lines conflict betewen YB pg15 5e6edbf removing has_system_targets and YB master 47da28c adding [[nodiscard]] to multiple functions (including has_system_targets) and filling in definitions for them. - pg_sample.cc: - PgSample::InitRandomState: YB pg15 055f04e splits rand_state to rand_state_s0 and rand_state_s1, and YB master 47da28c makes other changes to the function. - PrepareSamplingState: YB pg15 055f04e splits rand_state to rand_state_s0 and rand_state_s1, and YB master 47da28c moves this code into class PgSamplePicker. - pg_sample.h: - PrepareSamplingState: YB pg15 055f04e splits rand_state to rand_state_s0 and rand_state_s1, and YB master 47da28c deletes the code since pg_sample.cc now has the function defined in the class. - pg15_tests/passing_tests.tsv: - TestPgRegressWaitQueues: YB master 3494424 causes this test to crash, so remove it from the list to investigate later.
- Loading branch information