Re: [PATCHES] docfix - DELETE doesn't affect auto-analyze

2007-07-18 Thread Bruce Momjian
ITAGAKI Takahiro wrote:
 
 Bruce Momjian [EMAIL PROTECTED] 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  [EMAIL PROTECTED]  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


Re: [PATCHES] docfix - DELETE doesn't affect auto-analyze

2007-07-17 Thread Bruce Momjian

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-hackers/2007-06/msg0.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 commandANALYZE/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  [EMAIL PROTECTED]  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


Re: [PATCHES] docfix - DELETE doesn't affect auto-analyze

2007-07-17 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] 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.

regards, tom lane

---(end of broadcast)---
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate


Re: [PATCHES] docfix - DELETE doesn't affect auto-analyze

2007-07-17 Thread ITAGAKI Takahiro

Bruce Momjian [EMAIL PROTECTED] 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


Re: [PATCHES] docfix - DELETE doesn't affect auto-analyze

2007-07-17 Thread Alvaro Herrera
Tom Lane wrote:
 Bruce Momjian [EMAIL PROTECTED] 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 Herrerahttp://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


Re: [PATCHES] docfix - DELETE doesn't affect auto-analyze

2007-07-17 Thread ITAGAKI Takahiro

Tom Lane [EMAIL PROTECTED] wrote:

 Bruce Momjian [EMAIL PROTECTED] 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


[PATCHES] docfix - DELETE doesn't affect auto-analyze

2007-07-16 Thread ITAGAKI Takahiro
I reported an incorrect description for auto-analyze in our documentation.
http://archives.postgresql.org/pgsql-hackers/2007-06/msg0.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 commandANALYZE/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