From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Avoid looping through line pointers twice in PageRepairFragmenta |
Date: | 2017-11-03 21:22:05 |
Message-ID: | E1eAjPh-0007uA-Si@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Avoid looping through line pointers twice in PageRepairFragmentation().
There doesn't seem to be any good reason to do the filling of the
itemidbase[] array separately from the first traversal of the pointers.
It's certainly not a win if there are any line pointers with storage,
and even if there aren't, this change doesn't insert code into the part
of the first loop that will be traversed in that case. So let's just
merge the two loops.
Yura Sokolov, reviewed by Claudio Freire
Discussion: https://postgr.es/m/e49befcc6f1d7099834c6fdf5c675a60@postgrespro.ru
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/a9169f0200fc57e01cbd216bbd41c9ea3a79a7b0
Modified Files
--------------
src/backend/storage/page/bufpage.c | 46 +++++++++++++++++---------------------
1 file changed, 21 insertions(+), 25 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Noah Misch | 2017-11-04 07:49:46 | Re: [COMMITTERS] pgsql: Account for catalog snapshot in PGXACT->xmin updates. |
Previous Message | Andres Freund | 2017-11-03 20:33:45 | Re: [HACKERS] pgsql: Fix freezing of a dead HOT-updated tuple |