Re: [HACKERS] Aggressive freezing in lazy-vacuum

2007-03-06 Thread ITAGAKI Takahiro
Tom Lane [EMAIL PROTECTED] wrote: This is a stand-alone patch for aggressive freezing. I'll propose to use OldestXmin instead of FreezeLimit as the freeze threshold in the circumstances below: I think it's a really bad idea to freeze that aggressively under any circumstances except

Re: [HACKERS] Aggressive freezing in lazy-vacuum

2007-03-06 Thread Gregory Stark
ITAGAKI Takahiro [EMAIL PROTECTED] writes: I don't think we can supply such a historical database functionality here, because we can guarantee it just only for INSERTed tuples even if we pay attention. We've already enabled autovacuum as default, so that we cannot predict when the next

Re: [HACKERS] Aggressive freezing in lazy-vacuum

2007-03-06 Thread Tom Lane
ITAGAKI Takahiro [EMAIL PROTECTED] writes: Tom Lane [EMAIL PROTECTED] wrote: I think it's a really bad idea to freeze that aggressively under any circumstances except being told to (ie, VACUUM FREEZE). When you freeze, you lose history information that might be needed later --- for forensic

Re: [HACKERS] Aggressive freezing in lazy-vacuum

2007-03-06 Thread ITAGAKI Takahiro
Gregory Stark [EMAIL PROTECTED] wrote: The hoped for gain here is that vacuum finds fewer pages with tuples that exceed vacuum_freeze_min_age? That seems useful though vacuum is still going to have to read every page and I suspect most of the writes pertain to dead tuples, not freezing

Re: [HACKERS] Aggressive freezing in lazy-vacuum

2007-03-06 Thread ITAGAKI Takahiro
Tom Lane [EMAIL PROTECTED] wrote: I said nothing about expired tuples. The point of not freezing is to preserve information about the insertion time of live tuples. I don't know what good it will do -- for debugging? Why don't you use CURRENT_TIMESTAMP? And your test case is

Re: [HACKERS] Aggressive freezing in lazy-vacuum

2007-03-06 Thread Tom Lane
ITAGAKI Takahiro [EMAIL PROTECTED] writes: Tom Lane [EMAIL PROTECTED] wrote: I said nothing about expired tuples. The point of not freezing is to preserve information about the insertion time of live tuples. I don't know what good it will do -- for debugging? Exactly. As an example, I've

[HACKERS] Aggressive freezing in lazy-vacuum

2007-03-05 Thread ITAGAKI Takahiro
Jim C. Nasby [EMAIL PROTECTED] wrote: * Aggressive freezing we will use OldestXmin as the threshold to freeze tuples in dirty pages or pages that have some dead tuples. Or, many UNFROZEN pages still remain after vacuum and they will cost us in the next vacuum preventing XID wraparound.

Re: [HACKERS] Aggressive freezing in lazy-vacuum

2007-03-05 Thread Tom Lane
ITAGAKI Takahiro [EMAIL PROTECTED] writes: This is a stand-alone patch for aggressive freezing. I'll propose to use OldestXmin instead of FreezeLimit as the freeze threshold in the circumstances below: I think it's a really bad idea to freeze that aggressively under any circumstances except

Re: [HACKERS] Aggressive freezing in lazy-vacuum

2007-03-05 Thread Florian G. Pflug
Tom Lane wrote: ITAGAKI Takahiro [EMAIL PROTECTED] writes: This is a stand-alone patch for aggressive freezing. I'll propose to use OldestXmin instead of FreezeLimit as the freeze threshold in the circumstances below: I think it's a really bad idea to freeze that aggressively under any

Re: [PATCHES] [HACKERS] Aggressive freezing in lazy-vacuum

2007-03-05 Thread Heikki Linnakangas
Florian G. Pflug wrote: There could be a GUC vacuum_freeze_limit, and the actual FreezeLimit would be calculated as GetOldestXmin() - vacuum_freeze_limit We already have that. It's called vacuum_freeze_min_age, and the default is 100 million transactions. IIRC we added it late in the 8.2

Re: [PATCHES] [HACKERS] Aggressive freezing in lazy-vacuum

2007-03-05 Thread Florian G. Pflug
Heikki Linnakangas wrote: Florian G. Pflug wrote: There could be a GUC vacuum_freeze_limit, and the actual FreezeLimit would be calculated as GetOldestXmin() - vacuum_freeze_limit We already have that. It's called vacuum_freeze_min_age, and the default is 100 million transactions. IIRC we