Unix Technical Forum

docfix - DELETE doesn't affect auto-analyze

This is a discussion on docfix - DELETE doesn't affect auto-analyze within the Pgsql Patches forums, part of the PostgreSQL category; --> I reported an incorrect description for auto-analyze in our documentation. http://archives.postgresql.org/pgsql...6/msg00000.php Here is a documentation fix for it. There ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 11:23 AM
ITAGAKI Takahiro
 
Posts: n/a
Default docfix - DELETE doesn't affect auto-analyze

I reported an incorrect description for auto-analyze in our documentation.
http://archives.postgresql.org/pgsql...6/msg00000.php
Here is a documentation fix for it.

There are the same mistakes in 8.1 and 8.2, not only in HEAD.
It had been true in contrib/pg_autovacuum at 8.0, but we
changed the behavior at the integration of autovacuum.


Index: doc/src/sgml/maintenance.sgml
================================================== =================
--- doc/src/sgml/maintenance.sgml (HEAD)
+++ doc/src/sgml/maintenance.sgml (fixed)
@@ -533,7 +533,7 @@
<programlisting>
analyze threshold = analyze base threshold + analyze scale factor * number of tuples
</programlisting>
- is compared to the total number of tuples inserted, updated, or deleted
+ is compared to the total number of tuples inserted or updated
since the last <command>ANALYZE</command>.
</para>


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


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 11:24 AM
Bruce Momjian
 
Posts: n/a
Default Re: docfix - DELETE doesn't affect auto-analyze


Patch applied. Thanks. Your documentation changes can be viewed in
five minutes using links on the developer's page,
http://www.postgresql.org/developer/testing.


---------------------------------------------------------------------------


ITAGAKI Takahiro wrote:
> I reported an incorrect description for auto-analyze in our documentation.
> http://archives.postgresql.org/pgsql...6/msg00000.php
> Here is a documentation fix for it.
>
> There are the same mistakes in 8.1 and 8.2, not only in HEAD.
> It had been true in contrib/pg_autovacuum at 8.0, but we
> changed the behavior at the integration of autovacuum.
>
>
> Index: doc/src/sgml/maintenance.sgml
> ================================================== =================
> --- doc/src/sgml/maintenance.sgml (HEAD)
> +++ doc/src/sgml/maintenance.sgml (fixed)
> @@ -533,7 +533,7 @@
> <programlisting>
> analyze threshold = analyze base threshold + analyze scale factor * number of tuples
> </programlisting>
> - is compared to the total number of tuples inserted, updated, or deleted
> + is compared to the total number of tuples inserted or updated
> since the last <command>ANALYZE</command>.
> </para>
>
>
> Regards,
> ---
> ITAGAKI Takahiro
> NTT Open Source Software Center
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq


--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-18-2008, 11:24 AM
ITAGAKI Takahiro
 
Posts: n/a
Default Re: docfix - DELETE doesn't affect auto-analyze


Bruce Momjian <bruce@momjian.us> wrote:

> Patch applied. Thanks. Your documentation changes can be viewed in
> five minutes using links on the developer's page,
> http://www.postgresql.org/developer/testing.


Thanks. Don't we need to backport it to 8.1 and 8.2?
It was changed at the integration of autovacuum at 8.1.


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



---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-18-2008, 11:24 AM
Alvaro Herrera
 
Posts: n/a
Default Re: docfix - DELETE doesn't affect auto-analyze

Tom Lane 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.


I think the patch is correct for 8.1 and 8.2 but is wrong for HEAD
(disclaimer: I'm a bit sleepy ATM).

--
Alvaro Herrera http://www.advogato.org/person/alvherre
Management by consensus: I have decided; you concede.
(Leonard Liu)

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-18-2008, 11:24 AM
ITAGAKI Takahiro
 
Posts: n/a
Default Re: docfix - DELETE doesn't affect auto-analyze


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



---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-18-2008, 11:24 AM
Bruce Momjian
 
Posts: n/a
Default Re: docfix - DELETE doesn't affect auto-analyze

ITAGAKI Takahiro wrote:
>
> Bruce Momjian <bruce@momjian.us> wrote:
>
> > Patch applied. Thanks. Your documentation changes can be viewed in
> > five minutes using links on the developer's page,
> > http://www.postgresql.org/developer/testing.

>
> Thanks. Don't we need to backport it to 8.1 and 8.2?
> It was changed at the integration of autovacuum at 8.1.


I don't worry about documentation details at that level for non-HEAD
releases.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:27 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com