Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHwfQ-0000od-Eb for pgsql-bugs@arkaria.postgresql.org; Mon, 05 Jun 2017 18:23:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dHwfQ-00068N-16 for pgsql-bugs@arkaria.postgresql.org; Mon, 05 Jun 2017 18:23:52 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dHwfP-00068E-Hc for pgsql-bugs@postgresql.org; Mon, 05 Jun 2017 18:23:51 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dHwfM-0001dU-EZ for pgsql-bugs@postgresql.org; Mon, 05 Jun 2017 18:23:50 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id A526720A9A; Mon, 5 Jun 2017 14:23:47 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Mon, 05 Jun 2017 14:23:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=ERPsNTvbVAgWcE3GiRy3h36iLB9o0TGZ0LSRCTRNtYQ=; b=YlyyvEcl Q+/mlJPlo7c6FmB+zs5bsXp1O9uNaK3yFT4/mFPrtZthXGR0p0ankvjO5QQjXqAX 52IrpUW+slKcAibMPdJCbMKMYny8C3LV6xSEeNoIArtzjPZ3Xny0+a/y3ZxdZuFr 2CAP40NzO6s5nVrWJsltYXJu8bwLn0yKSaQZMbwGTcRFeKuosB/aqOjrQT6TcS8M n3KyLbkzmO7Hw5e5QD4rrCsuE+fm3C1QUVAsAS37Ejhw2BGlchuAdGQhgQdPx0I2 QYJlif5OAST0k8dkJ7G6Z//DA9DAb3rFLuziVH0U9VMnYUcBA7/T1uJ5Y5NFtuvV IxDUjTKWxLmieg== X-ME-Sender: X-Sasl-enc: NWuvZdIPCNfXq/KJUA2rr6+K/WGstzYpa+ozHXgDsRmE 1496687027 Received: from intern.anarazel.de (unknown [136.24.76.72]) by mail.messagingengine.com (Postfix) with ESMTPA id 54E442475C; Mon, 5 Jun 2017 14:23:47 -0400 (EDT) Date: Mon, 5 Jun 2017 11:23:45 -0700 From: Andres Freund To: =?utf-8?B?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?= Cc: PostgreSQL mailing lists Subject: Re: Useless assignments Message-ID: <20170605182345.j6p2sa2vthjgelof@alap3.anarazel.de> References: <4f65a18e-b5bc-8a38-7a9a-d3ab6946da98@aegee.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4f65a18e-b5bc-8a38-7a9a-d3ab6946da98@aegee.org> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Hi, What's the gain of these changes? Afaics they're largely minor future proofing and similar. - Andres On 2017-06-05 20:21:39 +0200, Дилян Палаузов wrote: > diff --git a/src/backend/catalog/partition.c > b/src/backend/catalog/partition.c > --- a/src/backend/catalog/partition.c > +++ b/src/backend/catalog/partition.c > @@ -189,7 +189,6 @@ RelationBuildPartitionDesc(Relation rel) > inhoids = find_inheritance_children(RelationGetRelid(rel), NoLock); > > /* Collect bound spec nodes in a list */ > - i = 0; > partoids = NIL; > foreach(cell, inhoids) > { > @@ -1508,7 +1508,6 @@ get_qual_for_range(PartitionKey key, > PartitionBoundSpec *spec) > > lower_or_start_datum = list_head(spec->lowerdatums); > upper_or_start_datum = list_head(spec->upperdatums); > - num_or_arms = key->partnatts; > > /* > * A range-partitioned table does not currently allow partition keys > to be > diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c > --- a/src/backend/storage/smgr/md.c > +++ b/src/backend/storage/smgr/md.c > @@ -872,7 +872,7 @@ mdwrite(SMgrRelation reln, ForkNumber forknum, > BlockNumber blocknum, > BlockNumber > mdnblocks(SMgrRelation reln, ForkNumber forknum) > { > - MdfdVec *v = mdopen(reln, forknum, EXTENSION_FAIL); > + MdfdVec *v; mdopen(reln, forknum, EXTENSION_FAIL); > BlockNumber nblocks; > BlockNumber segno = 0; > > diff --git a/src/backend/utils/adt/jsonfuncs.c > b/src/backend/utils/adt/jsonfuncs.c > --- a/src/backend/utils/adt/jsonfuncs.c > +++ b/src/backend/utils/adt/jsonfuncs.c > @@ -4423,7 +4423,7 @@ IteratorConcat(JsonbIterator **it1, JsonbIterator > **it2, > rk2; > > r1 = rk1 = JsonbIteratorNext(it1, &v1, false); > - r2 = rk2 = JsonbIteratorNext(it2, &v2, false); > + rk2 = JsonbIteratorNext(it2, &v2, false); > > /* > * Both elements are objects. > diff --git a/src/fe_utils/print.c b/src/fe_utils/print.c > --- a/src/fe_utils/print.c > +++ b/src/fe_utils/print.c > @@ -433,7 +433,6 @@ print_unaligned_text(const printTableContent *cont, FILE > *fout) > if (need_recordsep) > { > > print_separator(cont->opt->recordSep, fout); > - need_recordsep = false; > } > fputs(f->data, fout); > need_recordsep = true; > diff --git a/src/backend/replication/logical/worker.c > b/src/backend/replication/logical/worker.c > --- a/src/backend/replication/logical/worker.c > +++ b/src/backend/replication/logical/worker.c > @@ -1202,7 +1202,6 @@ LogicalRepApplyLoop(XLogRecPtr last_received) > if (now >= timeout) > { > requestReply = true; > - ping_sent = true; > } > } > } > > > -- > Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-bugs -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs