Re: [HACKERS] [GENERAL] Buglist

2003-09-04 Thread Bruce Momjian
Jan Wieck wrote: Tom Lane wrote: Jan Wieck [EMAIL PROTECTED] writes: Okay, my proposal would be to have a VACUUM mode where it tells the buffer manager to only return a page if it is already in memory, and some not cached if it would have to read it from disk, and simply skip the

Re: [HACKERS] [GENERAL] Buglist

2003-08-22 Thread Shridhar Daithankar
On Friday 22 August 2003 16:23, Manfred Koizar wrote: On Fri, 22 Aug 2003 12:15:33 +0530, Shridhar Daithankar [EMAIL PROTECTED] wrote: Which leads us to a zero gravity vacuum, that does the lazy vacuum for pages currently available in the buffer cache only. [...] Since autovacuum issues

Re: [HACKERS] [GENERAL] Buglist

2003-08-22 Thread Manfred Koizar
On Fri, 22 Aug 2003 16:27:53 +0530, Shridhar Daithankar [EMAIL PROTECTED] wrote: What does FSM does then? FSM = Free Space Map. VACUUM writes information into the FSM, INSERTs consult the FSM to find pages with free space for new tuples. I was under impression that FSM stores page pointers

Re: [HACKERS] [GENERAL] Buglist

2003-08-22 Thread Jan Wieck
Shridhar Daithankar wrote: On Friday 22 August 2003 16:23, Manfred Koizar wrote: On Fri, 22 Aug 2003 12:15:33 +0530, Shridhar Daithankar [EMAIL PROTECTED] wrote: Which leads us to a zero gravity vacuum, that does the lazy vacuum for pages currently available in the buffer cache only. [...]

Re: [HACKERS] [GENERAL] Buglist

2003-08-22 Thread Tom Lane
Jan Wieck [EMAIL PROTECTED] writes: Shridhar Daithankar wrote: Umm.. What does FSM does then? I was under impression that FSM stores page pointers and vacuum work on FSM information only. In that case, it wouldn't have to waste time to find out which pages to clean. It's the other way

Re: [HACKERS] [GENERAL] Buglist

2003-08-22 Thread Shridhar Daithankar
On 22 Aug 2003 at 10:45, Tom Lane wrote: Jan Wieck [EMAIL PROTECTED] writes: Shridhar Daithankar wrote: Umm.. What does FSM does then? I was under impression that FSM stores page pointers and vacuum work on FSM information only. In that case, it wouldn't have to waste time to find out

Re: [HACKERS] [GENERAL] Buglist

2003-08-22 Thread Jan Wieck
Tom Lane wrote: Jan Wieck [EMAIL PROTECTED] writes: Shridhar Daithankar wrote: Umm.. What does FSM does then? I was under impression that FSM stores page pointers and vacuum work on FSM information only. In that case, it wouldn't have to waste time to find out which pages to clean. It's the

Re: [HACKERS] [GENERAL] Buglist

2003-08-22 Thread Jan Wieck
Jan Wieck wrote: Another way to give autovacuum some hints would be to return some number as commandtuples from vacuum. like the number of tuples actually vacuumed. That together with the new number of reltuples in pg_class will tell autovacuum how frequent a relation really needs scanning.

Re: [HACKERS] [GENERAL] Buglist

2003-08-22 Thread Shridhar Daithankar
On 22 Aug 2003 at 11:03, Jan Wieck wrote: Tom Lane wrote: Jan Wieck [EMAIL PROTECTED] writes: Shridhar Daithankar wrote: Umm.. What does FSM does then? I was under impression that FSM stores page pointers and vacuum work on FSM information only. In that case, it wouldn't have to

Re: [HACKERS] [GENERAL] Buglist

2003-08-22 Thread Matthew T. O'Connor
On Fri, 2003-08-22 at 11:08, Jan Wieck wrote: Another way to give autovacuum some hints would be to return some number as commandtuples from vacuum. like the number of tuples actually vacuumed. That together with the new number of reltuples in pg_class will tell autovacuum how frequent

Re: [HACKERS] [GENERAL] Buglist

2003-08-22 Thread Matthew T. O'Connor
On Fri, 2003-08-22 at 11:17, Shridhar Daithankar wrote: On 22 Aug 2003 at 11:03, Jan Wieck wrote: That's why I think it needs one more pg_stat column to count the number of vacuumed tuples. If one does tuples_updated + tuples_deleted - tuples_vacuumed he'll get approximately

Re: [HACKERS] [GENERAL] Buglist

2003-08-22 Thread Matthew T. O'Connor
On Fri, 2003-08-22 at 10:45, Tom Lane wrote: Jan Wieck [EMAIL PROTECTED] writes: Right. One big question mark in my mind about these partial vacuum proposals is whether they'd still allow adequate FSM information to be maintained. If VACUUM isn't looking at most of the pages, there's no

Re: [HACKERS] [GENERAL] Buglist

2003-08-22 Thread Jan Wieck
Okay, my proposal would be to have a VACUUM mode where it tells the buffer manager to only return a page if it is already in memory, and some not cached if it would have to read it from disk, and simply skip the page in that case. Probably needs some modifications in vacuums FSM handling, but

Re: [HACKERS] [GENERAL] Buglist

2003-08-22 Thread Manfred Koizar
On Fri, 22 Aug 2003 10:45:50 -0400, Tom Lane [EMAIL PROTECTED] wrote: One big question mark in my mind about these partial vacuum proposals is whether they'd still allow adequate FSM information to be maintained. If VACUUM isn't looking at most of the pages, there's no very good way to acquire

Re: [HACKERS] [GENERAL] Buglist

2003-08-22 Thread Manfred Koizar
On Fri, 22 Aug 2003 12:18:02 -0400, Jan Wieck [EMAIL PROTECTED] wrote: Okay, my proposal would be to have a VACUUM mode where it tells the buffer manager to only return a page if it is already in memory But how can it know? Yes, we know exactly what we have in PG shared buffers. OTOH we keep

Re: [HACKERS] [GENERAL] Buglist

2003-08-22 Thread Tom Lane
Jan Wieck [EMAIL PROTECTED] writes: Okay, my proposal would be to have a VACUUM mode where it tells the buffer manager to only return a page if it is already in memory, and some not cached if it would have to read it from disk, and simply skip the page in that case. Since no such call is

Re: [HACKERS] [GENERAL] Buglist

2003-08-22 Thread Jan Wieck
Tom Lane wrote: Jan Wieck [EMAIL PROTECTED] writes: Okay, my proposal would be to have a VACUUM mode where it tells the buffer manager to only return a page if it is already in memory, and some not cached if it would have to read it from disk, and simply skip the page in that case. Since no