ignore_killed_tuples is always true

Lists: pgsql-patches
From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp>
To: pgsql-patches(at)postgresql(dot)org
Subject: ignore_killed_tuples is always true
Date: 2006-02-10 09:50:15
Message-ID: 20060210182109.48E6.ITAGAKI.TAKAHIRO@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

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

Attachment Content-Type Size
remove-ignore_killed_tuples.patch application/octet-stream 6.2 KB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: ignore_killed_tuples is always true
Date: 2006-02-10 15:01:36
Message-ID: 12784.1139583696@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)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


From: Jaime Casanova <systemguards(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp>, pgsql-patches(at)postgresql(dot)org
Subject: Re: ignore_killed_tuples is always true
Date: 2006-02-11 05:31:11
Message-ID: c2d9e70e0602102131y5566939cwfaf8e954aba9457a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

On 2/10/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)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 ;)


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jaime Casanova <systemguards(at)gmail(dot)com>
Cc: ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp>, pgsql-patches(at)postgresql(dot)org
Subject: Re: ignore_killed_tuples is always true
Date: 2006-02-11 15:52:50
Message-ID: 8012.1139673170@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Jaime Casanova <systemguards(at)gmail(dot)com> writes:
> On 2/10/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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


From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jaime Casanova <systemguards(at)gmail(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: ignore_killed_tuples is always true
Date: 2006-02-13 02:30:19
Message-ID: 20060213111511.49B5.ITAGAKI.TAKAHIRO@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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