Re: [HACKERS] [BUGS] fillfactor hides autovacuum parameters in 8.4.0

2009-08-27 Thread Itagaki Takahiro
Alvaro Herrera wrote: > So I'm going to apply your patch to both 8.4 and HEAD; we can always > improve it later, I guess. Thank you for your applying. I think the fix is ugly, too. We need to introduce cleaner solution for 8.5. Regards, --- ITAGAKI Takahiro NTT Open Source Software Center -

Re: [BUGS] fillfactor hides autovacuum parameters in 8.4.0

2009-08-27 Thread Alvaro Herrera
Itagaki Takahiro wrote: > > Here is a patch to fix a bug in handling default values in reloptions. > This fix should be applied to HEAD and 8.4.0. > > I used 'magic number -1' to propagate "not-specified" information to > autovacuum process. It might look strange because the default value is > ou

Re: [BUGS] fillfactor hides autovacuum parameters in 8.4.0

2009-08-19 Thread Alvaro Herrera
Itagaki Takahiro wrote: > > Alvaro Herrera wrote: > > > > We should remember whether a field was specified or not independntly. > > I'm not sure what you are suggesting ...? > > Please imagine that: > > =# SET autovacuum_vacuum_scale_factor = 0.05; > =# ALTER TABLE tbl SET (autovacuum_vacuum_t

Re: [BUGS] fillfactor hides autovacuum parameters in 8.4.0

2009-08-19 Thread Itagaki Takahiro
Alvaro Herrera wrote: > > We should remember whether a field was specified or not independntly. > I'm not sure what you are suggesting ...? Please imagine that: =# SET autovacuum_vacuum_scale_factor = 0.05; =# ALTER TABLE tbl SET (autovacuum_vacuum_threshold = 10); AutoVacOpts.vacuum_threshol

Re: [BUGS] fillfactor hides autovacuum parameters in 8.4.0

2009-08-19 Thread Alvaro Herrera
Itagaki Takahiro wrote: > > Alvaro Herrera wrote: > > > we could use that to set a boolean > > in StdRdOptions that indicated whether they are set in reloptions or are > > default values. > > Do you mean we will have a boolean field *for each* field in StdRdOptions? No, I was thinking in a sin

Re: [BUGS] fillfactor hides autovacuum parameters in 8.4.0

2009-08-19 Thread Itagaki Takahiro
Here is a patch to fix a bug in handling default values in reloptions. This fix should be applied to HEAD and 8.4.0. I used 'magic number -1' to propagate "not-specified" information to autovacuum process. It might look strange because the default value is out of range of the reloption, but I thi

Re: [BUGS] fillfactor hides autovacuum parameters in 8.4.0

2009-08-19 Thread Itagaki Takahiro
Alvaro Herrera wrote: > we could use that to set a boolean > in StdRdOptions that indicated whether they are set in reloptions or are > default values. Do you mean we will have a boolean field *for each* field in StdRdOptions? We should remember whether a field was specified or not independntly

Re: [BUGS] fillfactor hides autovacuum parameters in 8.4.0

2009-08-19 Thread Alvaro Herrera
Itagaki Takahiro wrote: > To fix the bug, each field in StdRdOptions should have "not-specified" flag. > If not specified, autovacuum should use current GUC settings instead of > reloptions. Is it possible to change the default values of reloptions > to some magic number (-1 or so) ? Ah. After c

Re: [BUGS] fillfactor hides autovacuum parameters in 8.4.0

2009-08-18 Thread Alvaro Herrera
Itagaki Takahiro wrote: > PostgreSQL version: 8.4.0 > Operating system: all versions > > If we set FILLFACTOR to a table, autovacuum parameters in postgresql.conf > will not affect to the table; default values are always used. > > In 8.4.0, we create StdRdOptions if a relation has some fields i

Re: [BUGS] fillfactor hides autovacuum parameters in 8.4.0

2009-08-18 Thread Euler Taveira de Oliveira
Itagaki Takahiro escreveu: > In 8.4.0, we create StdRdOptions if a relation has some fields in > pg_class.reloption. Then, unspecified fields are filled with the > default values. The values are always hard-coded default values and > don't reflect current GUC settings. > Hey, how I couldn't notice

[BUGS] fillfactor hides autovacuum parameters in 8.4.0

2009-08-18 Thread Itagaki Takahiro
PostgreSQL version: 8.4.0 Operating system: all versions If we set FILLFACTOR to a table, autovacuum parameters in postgresql.conf will not affect to the table; default values are always used. In 8.4.0, we create StdRdOptions if a relation has some fields in pg_class.reloption. Then, unspecifie