Skip to content

Commit

Permalink
[MERGE PG15] Initdb: Bootstrap step working
Browse files Browse the repository at this point in the history
Summary: Initdb bootstrap step working

Test Plan: Jenkins: skip

Reviewers: mihnea, neil

Reviewed By: neil

Subscribers: yql

Differential Revision: https://phabricator.dev.yugabyte.com/D25090
  • Loading branch information
arpang authored and nocaway committed Jul 20, 2023
1 parent 69fa310 commit 1cc244c
Show file tree
Hide file tree
Showing 18 changed files with 402 additions and 339 deletions.
3 changes: 2 additions & 1 deletion src/postgres/src/backend/access/brin/brin.c
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,8 @@ summarize_range(IndexInfo *indexInfo, BrinBuildState *state, Relation heapRel,
state->bs_currRangeStart = heapBlk;
table_index_build_range_scan(heapRel, state->bs_irel, indexInfo, false, true, false,
heapBlk, scanNumBlks,
brinbuildCallback, (void *) state, NULL);
brinbuildCallback, (void *) state, NULL,
NULL /* bfinfo */, NULL /* bfresult */);

/*
* Now we update the values obtained by the scan with the placeholder
Expand Down
8 changes: 7 additions & 1 deletion src/postgres/src/backend/access/heap/heapam.c
Original file line number Diff line number Diff line change
Expand Up @@ -1310,6 +1310,12 @@ heap_endscan(TableScanDesc sscan)
HeapTuple
heap_getnext(TableScanDesc sscan, ScanDirection direction)
{

if (IsYBRelation(sscan->rs_rd))
{
return ybc_heap_getnext(sscan);
}

HeapScanDesc scan = (HeapScanDesc) sscan;

/*
Expand Down Expand Up @@ -6067,7 +6073,7 @@ heap_inplace_update(Relation relation, HeapTuple tuple, bool yb_shared_update)

YB_FOR_EACH_DB(pg_db_tuple)
{
Oid dboid = YbHeapTupleGetOid(pg_db_tuple); /* TODO(Alex) */
Oid dboid = ((Form_pg_database) GETSTRUCT(pg_db_tuple))->oid;
/* YB doesn't use PG locks so it's okay not to take them. */
YBCUpdateSysCatalogTupleForDb(dboid, relation, NULL /* oldtuple */, tuple);
}
Expand Down
Loading

0 comments on commit 1cc244c

Please sign in to comment.