ListCell *lc;
TimeLineHistoryEntry **tlep;
int num_wal_ranges;
- int i;
bool found_backup_start_tli = false;
TimeLineID earliest_wal_range_tli = 0;
XLogRecPtr earliest_wal_range_start_lsn = InvalidXLogRecPtr;
*/
expectedTLEs = readTimeLineHistory(backup_state->starttli);
tlep = palloc0(num_wal_ranges * sizeof(TimeLineHistoryEntry *));
- for (i = 0; i < num_wal_ranges; ++i)
+ for (int i = 0; i < num_wal_ranges; ++i)
{
backup_wal_range *range = list_nth(ib->manifest_wal_ranges, i);
bool saw_earliest_wal_range_tli = false;
* anything here. However, if there's a problem staring us right in the
* face, it's best to report it, so we do.
*/
- for (i = 0; i < num_wal_ranges; ++i)
+ for (int i = 0; i < num_wal_ranges; ++i)
{
backup_wal_range *range = list_nth(ib->manifest_wal_ranges, i);
while (1)
{
- unsigned nblocks;
- unsigned i;
+ unsigned int nblocks;
nblocks = BlockRefTableReaderGetBlocks(reader, blocks,
BLOCKS_PER_READ);
if (nblocks == 0)
break;
- for (i = 0; i < nblocks; ++i)
+ for (unsigned int i = 0; i < nblocks; ++i)
BlockRefTableMarkBlockModified(ib->brtab, &rlocator,
forknum, blocks[i]);
}
* subselect must have that outer level as parent.
*/
ParseState mypstate = {0};
- Index levelsup;
/* this loop must work, since GetRTEByRangeTablePosn did */
- for (levelsup = 0; levelsup < netlevelsup; levelsup++)
+ for (Index level = 0; level < netlevelsup; level++)
pstate = pstate->parentParseState;
mypstate.parentParseState = pstate;
mypstate.p_rtable = rte->subquery->rtable;
* could be an outer CTE (compare SUBQUERY case above).
*/
ParseState mypstate = {0};
- Index levelsup;
/* this loop must work, since GetCTEForRTE did */
- for (levelsup = 0;
- levelsup < rte->ctelevelsup + netlevelsup;
- levelsup++)
+ for (Index level = 0;
+ level < rte->ctelevelsup + netlevelsup;
+ level++)
pstate = pstate->parentParseState;
mypstate.parentParseState = pstate;
mypstate.p_rtable = ((Query *) cte->ctequery)->rtable;