Vacuum Cost Documentation?

Started by Matthew T. O'Connorover 21 years ago12 messageshackers
Jump to latest
#1Matthew T. O'Connor
matthew@zeut.net

Related to autovacuum work, I was looking into the new vacuum delay
functionality. I might be missing something, but I can't find anything
on it in the developer docs. Is that right?

Also, in the default postgresql.conf there is:

#vacuum_cost_naptime = 50 # 0-1000 milliseconds

however psql reports this value as 0. I assume this is just
postgresql.conf is just wrong. Can we fix this so it's consistent?

Thanks,

Matthew O'Connor

#2Bruce Momjian
bruce@momjian.us
In reply to: Matthew T. O'Connor (#1)
Re: Vacuum Cost Documentation?

Matthew T. O'Connor wrote:

Related to autovacuum work, I was looking into the new vacuum delay
functionality. I might be missing something, but I can't find anything
on it in the developer docs. Is that right?

Also, in the default postgresql.conf there is:

#vacuum_cost_naptime = 50 # 0-1000 milliseconds

however psql reports this value as 0. I assume this is just
postgresql.conf is just wrong. Can we fix this so it's consistent?

I am not really fond of the term 'naptime'. Delay? Sleep?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Matthew T. O'Connor (#1)
Re: Vacuum Cost Documentation?

"Matthew T. O'Connor" <matthew@zeut.net> writes:

Related to autovacuum work, I was looking into the new vacuum delay
functionality. I might be missing something, but I can't find anything
on it in the developer docs. Is that right?

You are not missing anything. I already nagged Jan about this once...

Of course, this is hardly the only seriously-underdocumented thing in
CVS tip ;-). We'll need to make a major push on docs soon.

regards, tom lane

#4David Fetter
david@fetter.org
In reply to: Tom Lane (#3)
Re: Vacuum Cost Documentation?

On Sun, Jul 18, 2004 at 02:32:10AM -0400, Tom Lane wrote:

"Matthew T. O'Connor" <matthew@zeut.net> writes:

Related to autovacuum work, I was looking into the new vacuum
delay functionality. I might be missing something, but I can't
find anything on it in the developer docs. Is that right?

You are not missing anything. I already nagged Jan about this
once...

Of course, this is hardly the only seriously-underdocumented thing
in CVS tip ;-). We'll need to make a major push on docs soon.

Do tell. :)

Cheers,
D(oc writer ordinaire)
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 510 893 6100 mobile: +1 415 235 3778

Remember to vote!

#5Bruce Momjian
bruce@momjian.us
In reply to: Matthew T. O'Connor (#1)
Re: Vacuum Cost Documentation?

Updated. Thanks.

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

Matthew T. O'Connor wrote:

Related to autovacuum work, I was looking into the new vacuum delay
functionality. I might be missing something, but I can't find anything
on it in the developer docs. Is that right?

Also, in the default postgresql.conf there is:

#vacuum_cost_naptime = 50 # 0-1000 milliseconds

however psql reports this value as 0. I assume this is just
postgresql.conf is just wrong. Can we fix this so it's consistent?

Thanks,

Matthew O'Connor

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

http://archives.postgresql.org

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#6Jan Wieck
JanWieck@Yahoo.com
In reply to: Bruce Momjian (#5)
Re: Vacuum Cost Documentation?

On 8/6/2004 9:04 PM, Bruce Momjian wrote:

Updated. Thanks.

I thought we want to have the feature activated ... I reversed your
change and brought guc.c in sync instead.

Jan

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

Matthew T. O'Connor wrote:

Related to autovacuum work, I was looking into the new vacuum delay
functionality. I might be missing something, but I can't find anything
on it in the developer docs. Is that right?

Also, in the default postgresql.conf there is:

#vacuum_cost_naptime = 50 # 0-1000 milliseconds

however psql reports this value as 0. I assume this is just
postgresql.conf is just wrong. Can we fix this so it's consistent?

Thanks,

Matthew O'Connor

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

http://archives.postgresql.org

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #

#7Bruce Momjian
bruce@momjian.us
In reply to: Jan Wieck (#6)
Re: Vacuum Cost Documentation?

Jan Wieck wrote:

On 8/6/2004 9:04 PM, Bruce Momjian wrote:

Updated. Thanks.

I thought we want to have the feature activated ... I reversed your
change and brought guc.c in sync instead.

OK.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#8Bruce Momjian
bruce@momjian.us
In reply to: Jan Wieck (#6)
Re: Vacuum Cost Documentation?

Jan Wieck wrote:

On 8/6/2004 9:04 PM, Bruce Momjian wrote:

Updated. Thanks.

I thought we want to have the feature activated ... I reversed your
change and brought guc.c in sync instead.

Uh, if the guy is doing a vacuum at night, does he want the delay?
Seems someone should have to enable the delay by default, or does your
setup recoginize when it is being run on a lightly loaded system?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#9Gaetano Mendola
mendola@bigfoot.com
In reply to: Bruce Momjian (#8)
Re: Vacuum Cost Documentation?

Bruce Momjian wrote:

Jan Wieck wrote:

On 8/6/2004 9:04 PM, Bruce Momjian wrote:

Updated. Thanks.

I thought we want to have the feature activated ... I reversed your
change and brought guc.c in sync instead.

Uh, if the guy is doing a vacuum at night, does he want the delay?
Seems someone should have to enable the delay by default, or does your
setup recoginize when it is being run on a lightly loaded system?

TODO: make vacuum_cost_naptime aware of system load

:-)

Regards
Gaetano Mendola

#10Jan Wieck
JanWieck@Yahoo.com
In reply to: Bruce Momjian (#8)
Re: Vacuum Cost Documentation?

On 8/6/2004 11:34 PM, Bruce Momjian wrote:

Jan Wieck wrote:

On 8/6/2004 9:04 PM, Bruce Momjian wrote:

Updated. Thanks.

I thought we want to have the feature activated ... I reversed your
change and brought guc.c in sync instead.

Uh, if the guy is doing a vacuum at night, does he want the delay?
Seems someone should have to enable the delay by default, or does your
setup recoginize when it is being run on a lightly loaded system?

Good that autovacuum didn't make it then, those people would have had a
big surprise :-)

Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #

#11Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jan Wieck (#10)
Re: Vacuum Cost Documentation?

Jan Wieck <JanWieck@Yahoo.com> writes:

Good that autovacuum didn't make it then, those people would have had a
big surprise :-)

If autovacuum had made it, would you expect someone to have enabled it
by default? Without advance discussion?

regards, tom lane

#12Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#11)
Re: Vacuum Cost Documentation?

Jan Wieck wrote:

On 8/6/2004 11:34 PM, Bruce Momjian wrote:

Jan Wieck wrote:

On 8/6/2004 9:04 PM, Bruce Momjian wrote:

Updated. Thanks.

I thought we want to have the feature activated ... I reversed your
change and brought guc.c in sync instead.

Uh, if the guy is doing a vacuum at night, does he want the delay?
Seems someone should have to enable the delay by default, or does your
setup recoginize when it is being run on a lightly loaded system?

Those people will instantly realize what is going on and either change
the delay setting or start running vacuum at daytime too.

What this buys us is that over time we will see less researches and
articles telling people that you have to bring down a PostgreSQL DB
frequently for vacuum maintenance because those "testers" run their fair
comparisions with out of the box configuration settings.

I am not in favor of adding a delay in VACUUM unless people ask for it.
Imagine either night vacuum or a vacuum you run in your application
after you delete and just before you load a table. Neither want a
vacuum. I think people who want a delay will think to ask for it while
people who want a quick vacuum will just think that vacuum is slow.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073