From: John Naylor <john.naylor@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove redundant setting of hashkey after insertion
Date: Thu, 30 Nov 2023 08:29:18 +0000
Message-ID: <E1r8cQ9-007vzN-LU@gemulon.postgresql.org> (raw)
Remove redundant setting of hashkey after insertion
It's not necessary to fill the key field in most cases, since
hash_search has already done that. Some existing call sites have an
assert or comment that this contract has been fulfilled, but those
are quite old and that practice seems unnecessary here.
While at it, remove a nearby redundant assignment that a smart compiler
will elide anyway.
Zhao Junwang, with some adjustments by me
Reviewed by Nathan Bossart, with additional feedback from Tom Lane
Discussion: http://postgr.es/m/CAEG8a3%2BUPF%3DR2QGPgJMF2mKh8xPd1H2TmfH77zPuVUFdBpiGUA%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/095d109ccd76ca4c46c4ea2be30d63d70361c5f9
Modified Files
--------------
contrib/dblink/dblink.c | 1 -
src/backend/commands/async.c | 20 ++++++++------------
src/backend/commands/tablecmds.c | 3 ---
.../replication/logical/applyparallelworker.c | 1 -
src/backend/replication/logical/relation.c | 1 -
5 files changed, 8 insertions(+), 18 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: john.naylor@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Remove redundant setting of hashkey after insertion
In-Reply-To: <E1r8cQ9-007vzN-LU@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox