dbTalk Databases Forums  

vacuum full question.

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss vacuum full question. in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Michael Guerin
 
Posts: n/a

Default vacuum full question. - 04-21-2004 , 12:23 PM






What happens when a vacuum full is canceled? Is any of the completed
work retained, or is everything lost?



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
  #2  
Old   
M. Bastin
 
Posts: n/a

Default Re: vacuum full question. - 04-21-2004 , 12:34 PM






The general principle is that any transaction that is being canceled
is fully lost and the database remains in the same state as before
the transaction was started.

I don't know the pgsql internals but I don't see why this shouldn't
be the case for a VACUUM too.

Marc

At 1:23 PM -0400 4/21/04, Michael Guerin wrote:
Quote:
What happens when a vacuum full is canceled? Is any of the
completed work retained, or is everything lost?



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)

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



Reply With Quote
  #3  
Old   
Michael Guerin
 
Posts: n/a

Default Re: vacuum full question. - 04-21-2004 , 12:50 PM



Sure, however this is not a data consistency issue, it's a maintenance
routine. If its shuffling around data to free up pages, it seems it
should be able to save some of this work. For instance, SQL server has
a command to defrag an index: dbcc indexdefrag which I believe is
similar to vacuum, in that it reorganizes the data check out:.
http://msdn.microsoft.com/library/de..._dbcc_30o9.asp


M. Bastin wrote:

Quote:
The general principle is that any transaction that is being canceled
is fully lost and the database remains in the same state as before the
transaction was started.

I don't know the pgsql internals but I don't see why this shouldn't be
the case for a VACUUM too.

Marc

At 1:23 PM -0400 4/21/04, Michael Guerin wrote:

What happens when a vacuum full is canceled? Is any of the completed
work retained, or is everything lost?



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)



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



Reply With Quote
  #4  
Old   
Tom Lane
 
Posts: n/a

Default Re: vacuum full question. - 04-21-2004 , 02:14 PM



Michael Guerin <guerin (AT) rentec (DOT) com> writes:
Quote:
What happens when a vacuum full is canceled? Is any of the completed
work retained, or is everything lost?
You lose it all; in fact you are worse off than when you started,
because there is now *more* work for the next vacuum to do --- it
has to clean up the dead tuples that the canceled vacuum created
(in the process of moving data around) and never got to commit.

However, this is on a per-table basis --- if you are running a
database-wide vacuum full, it commits after each table, so the
already-processed tables are done.

regards, tom lane

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

http://archives.postgresql.org



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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.