Re: docfix - DELETE doesn't affect auto-analyze - Mailing list pgsql-patches

From ITAGAKI Takahiro
Subject Re: docfix - DELETE doesn't affect auto-analyze
Date
Msg-id 20070718130849.61B2.ITAGAKI.TAKAHIRO@oss.ntt.co.jp
Whole thread Raw
In response to Re: docfix - DELETE doesn't affect auto-analyze  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Bruce Momjian <bruce@momjian.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



pgsql-patches by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: docfix - DELETE doesn't affect auto-analyze
Next
From: Peter Eisentraut
Date:
Subject: Re: execl() sentinel