remove redundant initializations
Reported-by: Ranier Vilela Discussion: https://postgr.es/m/CAEudQAo1+AcGppxDSg8k+zF4+Kv+eJyqzEDdbpDg58-=MQcerQ@mail.gmail.com Author: Ranier Vilela Backpatch-through: master
This commit is contained in:
parent
844c05abc3
commit
e36e936e0e
@ -405,7 +405,6 @@ gistRedoPageReuse(XLogReaderState *record)
|
|||||||
* logged value is very old, so that XID wrap-around already happened
|
* logged value is very old, so that XID wrap-around already happened
|
||||||
* on it, there can't be any snapshots that still see it.
|
* on it, there can't be any snapshots that still see it.
|
||||||
*/
|
*/
|
||||||
nextXid = ReadNextFullTransactionId();
|
|
||||||
diff = U64FromFullTransactionId(nextXid) -
|
diff = U64FromFullTransactionId(nextXid) -
|
||||||
U64FromFullTransactionId(latestRemovedFullXid);
|
U64FromFullTransactionId(latestRemovedFullXid);
|
||||||
if (diff < MaxTransactionId / 2)
|
if (diff < MaxTransactionId / 2)
|
||||||
|
@ -3436,7 +3436,7 @@ List *
|
|||||||
heap_truncate_find_FKs(List *relationIds)
|
heap_truncate_find_FKs(List *relationIds)
|
||||||
{
|
{
|
||||||
List *result = NIL;
|
List *result = NIL;
|
||||||
List *oids = list_copy(relationIds);
|
List *oids;
|
||||||
List *parent_cons;
|
List *parent_cons;
|
||||||
ListCell *cell;
|
ListCell *cell;
|
||||||
ScanKeyData key;
|
ScanKeyData key;
|
||||||
|
@ -734,9 +734,11 @@ mdwrite(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum,
|
|||||||
BlockNumber
|
BlockNumber
|
||||||
mdnblocks(SMgrRelation reln, ForkNumber forknum)
|
mdnblocks(SMgrRelation reln, ForkNumber forknum)
|
||||||
{
|
{
|
||||||
MdfdVec *v = mdopenfork(reln, forknum, EXTENSION_FAIL);
|
MdfdVec *v;
|
||||||
BlockNumber nblocks;
|
BlockNumber nblocks;
|
||||||
BlockNumber segno = 0;
|
BlockNumber segno;
|
||||||
|
|
||||||
|
mdopenfork(reln, forknum, EXTENSION_FAIL);
|
||||||
|
|
||||||
/* mdopen has opened the first segment */
|
/* mdopen has opened the first segment */
|
||||||
Assert(reln->md_num_open_segs[forknum] > 0);
|
Assert(reln->md_num_open_segs[forknum] > 0);
|
||||||
|
@ -990,7 +990,7 @@ catenate_stringinfo_string(StringInfo buffer, const char *addon)
|
|||||||
Datum
|
Datum
|
||||||
json_build_object(PG_FUNCTION_ARGS)
|
json_build_object(PG_FUNCTION_ARGS)
|
||||||
{
|
{
|
||||||
int nargs = PG_NARGS();
|
int nargs;
|
||||||
int i;
|
int i;
|
||||||
const char *sep = "";
|
const char *sep = "";
|
||||||
StringInfo result;
|
StringInfo result;
|
||||||
|
@ -476,7 +476,7 @@ MemoryContextMemAllocated(MemoryContext context, bool recurse)
|
|||||||
|
|
||||||
if (recurse)
|
if (recurse)
|
||||||
{
|
{
|
||||||
MemoryContext child = context->firstchild;
|
MemoryContext child;
|
||||||
|
|
||||||
for (child = context->firstchild;
|
for (child = context->firstchild;
|
||||||
child != NULL;
|
child != NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user