diff options
author | John Naylor <john.naylor@postgresql.org> | 2023-11-30 15:25:57 +0700 |
---|---|---|
committer | John Naylor <john.naylor@postgresql.org> | 2023-11-30 15:25:57 +0700 |
commit | 095d109ccd76ca4c46c4ea2be30d63d70361c5f9 (patch) | |
tree | 70d43b54aec0ea4e0d3a2521ca7dfa58c9f1ff1b /src/backend/replication/logical/applyparallelworker.c | |
parent | 489ca33081c8f590a314d4a09d9bee56a81f1a85 (diff) | |
download | postgresql-095d109ccd76ca4c46c4ea2be30d63d70361c5f9.tar.gz postgresql-095d109ccd76ca4c46c4ea2be30d63d70361c5f9.zip |
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
Diffstat (limited to 'src/backend/replication/logical/applyparallelworker.c')
-rw-r--r-- | src/backend/replication/logical/applyparallelworker.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/backend/replication/logical/applyparallelworker.c b/src/backend/replication/logical/applyparallelworker.c index 9b37736f8e5..b84a8a6db25 100644 --- a/src/backend/replication/logical/applyparallelworker.c +++ b/src/backend/replication/logical/applyparallelworker.c @@ -509,7 +509,6 @@ pa_allocate_worker(TransactionId xid) winfo->in_use = true; winfo->serialize_changes = false; entry->winfo = winfo; - entry->xid = xid; } /* |