Thread

  1. BUG #5734: autovacuum_enabled input should be validated, standardized.

    Mark Stosberg <mark@summersault.com> — 2010-10-30T14:04:11Z

    The following bug has been logged online:
    
    Bug reference:      5734
    Logged by:          Mark Stosberg
    Email address:      mark@summersault.com
    PostgreSQL version: 9.0.1
    Operating system:   FreeBSD
    Description:        autovacuum_enabled input should be validated,
    standardized.
    Details: 
    
    The "autovacuum_enabled" storage parameter claims to be a boolean type:
    http://www.postgresql.org/docs/9.0/static/sql-createtable.html#SQL-CREATETAB
    LE-STORAGE-PARAMETERS
    ... but it fails to behave a normal boolean.
    
    Normally, you could set a boolean with a value of false, 'off' or 'f',
    but you would always get back a value of 'f'  With this value, there is
    no translation.
    
    I think this kind of boolean should be handled like a standard
    PostgreSQL boolean.
    
    I noticed because the Slony code base has a hardcoded check for
    "autovacuum_enabled=off", when a false value could also be stored as
    autovacuum_enabled=f
    
    We should be able to rely on this value being always returned as
    "autovacuum_enabled='f'" just a normal boolean would.
    
        Mark
    
    
  2. Re: BUG #5734: autovacuum_enabled input should be validated, standardized.

    Tom Lane <tgl@sss.pgh.pa.us> — 2010-10-30T16:07:43Z

    "Mark Stosberg" <mark@summersault.com> writes:
    > The "autovacuum_enabled" storage parameter claims to be a boolean type:
    > http://www.postgresql.org/docs/9.0/static/sql-createtable.html#SQL-CREATETAB
    > LE-STORAGE-PARAMETERS
    > ... but it fails to behave a normal boolean.
    
    The parsing is the same as every other boolean parameter.  What I think
    you are complaining about is not that, but that we don't rewrite the
    source string into some standard format.  That seems rather impractical
    though.
    
    			regards, tom lane