Re: docfix - DELETE doesn't affect auto-analyze

From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: docfix - DELETE doesn't affect auto-analyze
Date: 2007-07-18 04:18:50
Message-ID: 20070718130849.61B2.ITAGAKI.TAKAHIRO@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> >> - is compared to the total number of tuples inserted, updated, or deleted
> >> + is compared to the total number of tuples inserted or updated
>
> As best I can tell, this description is even further away from the
> actual CVS HEAD behavior than the previous one. The code is comparing
> against
>
> anltuples = tabentry->n_live_tuples + tabentry->n_dead_tuples -
> tabentry->last_anl_tuples;
>
> and deletions surely increase n_dead_tuples.

Yes, but they also decrease n_live_tuples;
anltuples is not affected by deletions.

if (isCommit)
{
tabstat->t_counts.t_new_live_tuples +=
trans->tuples_inserted - trans->tuples_deleted;
tabstat->t_counts.t_new_dead_tuples += trans->tuples_deleted;
}

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2007-07-18 06:27:16 Re: execl() sentinel
Previous Message Alvaro Herrera 2007-07-18 04:17:52 Re: docfix - DELETE doesn't affect auto-analyze