ignore_killed_tuples is always true

Started by ITAGAKI Takahiroover 20 years ago5 messagespatches
Jump to latest
#1ITAGAKI Takahiro
itagaki.takahiro@oss.ntt.co.jp

I found IndexScanDesc->ignore_killed_tuples is always true.
Is this still needed?

Also, I cannot understand why gistgetmulti calls gistnext with
ignore_killed_tuples = false. We can always ignore LP_DELETEed tuples, right?

---
ITAGAKI Takahiro
NTT Cyber Space Laboratories

Attachments:

remove-ignore_killed_tuples.patchapplication/octet-stream; name=remove-ignore_killed_tuples.patchDownload+46-48
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: ITAGAKI Takahiro (#1)
Re: ignore_killed_tuples is always true

ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp> writes:

I found IndexScanDesc->ignore_killed_tuples is always true.
Is this still needed?

What is the point of removing it? You cannot argue that saving
one if-test per tuple is a worthwhile speedup.

regards, tom lane

#3Jaime Casanova
jcasanov@systemguards.com.ec
In reply to: Tom Lane (#2)
Re: ignore_killed_tuples is always true

On 2/10/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:

ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp> writes:

I found IndexScanDesc->ignore_killed_tuples is always true.
Is this still needed?

What is the point of removing it? You cannot argue that saving
one if-test per tuple is a worthwhile speedup.

regards, tom lane

to clean code?

--
regards,
Jaime Casanova
(DBA: DataBase Aniquilator ;)

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jaime Casanova (#3)
Re: ignore_killed_tuples is always true

Jaime Casanova <systemguards@gmail.com> writes:

On 2/10/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:

What is the point of removing it? You cannot argue that saving
one if-test per tuple is a worthwhile speedup.

to clean code?

It's not saving any noticeable amount of code, and what it is doing
is removing functionality we might want someday. It's not hard to
imagine pgstattuple or VACUUM or other maintenance operations wanting
to look at killed index entries.

regards, tom lane

#5ITAGAKI Takahiro
itagaki.takahiro@oss.ntt.co.jp
In reply to: Tom Lane (#4)
Re: ignore_killed_tuples is always true

Tom Lane <tgl@sss.pgh.pa.us> wrote:

It's not saving any noticeable amount of code, and what it is doing
is removing functionality we might want someday. It's not hard to
imagine pgstattuple or VACUUM or other maintenance operations wanting
to look at killed index entries.

I suggested it not for performance, but for simplicity of code. So if we
still need it, I agree to leave it.

Moreover, LP_DELETEed tuples might be useful for Bitmap NOT And/Or join,
not only maintenance operations. Union-side of bitmap should not contain
LP_DELETEed tuples, and Except-side should do.

---
ITAGAKI Takahiro
NTT Cyber Space Laboratories