Re: Why to index a "Recently DEAD" tuple when creating index

2019-06-10 Thread Kuntal Ghosh
On Mon, Jun 10, 2019 at 5:26 PM Tom Lane wrote: > > Kuntal Ghosh writes: > >> 2. If we only support "Read Committed" isolation level, is there a safe > >> way to not index such data? > > > I can't think of a case where the RECENTLY_DELETED tuple needs to be > > indexed in "Read Committed" cas

Re: Why to index a "Recently DEAD" tuple when creating index

2019-06-10 Thread Tom Lane
Kuntal Ghosh writes: >> 2. If we only support "Read Committed" isolation level, is there a safe >> way to not index such data? > I can't think of a case where the RECENTLY_DELETED tuple needs to be > indexed in "Read Committed" case. I think you're making dangerously optimistic assumptions a

Re: Why to index a "Recently DEAD" tuple when creating index

2019-06-10 Thread Alex
Thanks! Appreciate it for your time! On Mon, Jun 10, 2019 at 5:34 PM Kuntal Ghosh wrote: > On Mon, Jun 10, 2019 at 2:12 PM Alex wrote: > > On Mon, Jun 10, 2019 at 4:10 PM Kuntal Ghosh > wrote: > >> I think what I'm trying to say is different. > >> > >> For my case, the sequence is as following

Re: Why to index a "Recently DEAD" tuple when creating index

2019-06-10 Thread Kuntal Ghosh
On Mon, Jun 10, 2019 at 2:12 PM Alex wrote: > On Mon, Jun 10, 2019 at 4:10 PM Kuntal Ghosh > wrote: >> I think what I'm trying to say is different. >> >> For my case, the sequence is as following: >> 1. Transaction A has deleted a tuple, say t1 and got committed. >> 2. Index A has been created s

Re: Why to index a "Recently DEAD" tuple when creating index

2019-06-10 Thread Alex
On Mon, Jun 10, 2019 at 4:10 PM Kuntal Ghosh wrote: > On Mon, Jun 10, 2019 at 1:30 PM Alex wrote: > > > > > > > > On Mon, Jun 10, 2019 at 3:28 PM Kuntal Ghosh > wrote: > >> > >> On Mon, Jun 10, 2019 at 12:15 PM Alex wrote: > >>> > >>> HEAPTUPLE_RECENTLY_DEAD, /* tuple is dead, but not deletab

Re: Why to index a "Recently DEAD" tuple when creating index

2019-06-10 Thread Kuntal Ghosh
On Mon, Jun 10, 2019 at 1:30 PM Alex wrote: > > > > On Mon, Jun 10, 2019 at 3:28 PM Kuntal Ghosh > wrote: >> >> On Mon, Jun 10, 2019 at 12:15 PM Alex wrote: >>> >>> HEAPTUPLE_RECENTLY_DEAD, /* tuple is dead, but not deletable yet */ >>> >>> It is a tuple which has been deleted AND committed b

Re: Why to index a "Recently DEAD" tuple when creating index

2019-06-10 Thread Alex
On Mon, Jun 10, 2019 at 3:28 PM Kuntal Ghosh wrote: > On Mon, Jun 10, 2019 at 12:15 PM Alex wrote: > >> HEAPTUPLE_RECENTLY_DEAD, /* tuple is dead, but not deletable yet */ >> >> It is a tuple which has been deleted AND committed but before the delete >> there is a transaction started but not c

Re: Why to index a "Recently DEAD" tuple when creating index

2019-06-10 Thread Kuntal Ghosh
On Mon, Jun 10, 2019 at 12:15 PM Alex wrote: > HEAPTUPLE_RECENTLY_DEAD, /* tuple is dead, but not deletable yet */ > > It is a tuple which has been deleted AND committed but before the delete > there is a transaction started but not committed. Let call this transaction > as Transaction A. > > i

Why to index a "Recently DEAD" tuple when creating index

2019-06-09 Thread Alex
HEAPTUPLE_RECENTLY_DEAD, /* tuple is dead, but not deletable yet */ It is a tuple which has been deleted AND committed but before the delete there is a transaction started but not committed. Let call this transaction as Transaction A. if we create index on this time, Let's call this index as In