Skip site navigation (1) Skip section navigation (2)

Re: pg_autovacuum should allow NULL values

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Mark Stosberg <mark(at)summersault(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: pg_autovacuum should allow NULL values
Date: 2007-02-23 23:26:46
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-generalpgsql-hackers
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Mark Stosberg wrote:
>> Adding a default of -1 seems like a more cumbersome way to express the
>> same thing to me.

> To be frank, I don't remember what the rationale was for not using
> NULLs.  Simplicity of code, I guess.

We tend to avoid allowing fixed-size fields to be NULL in the system
catalogs, because it prevents using the technique of overlaying C
structs onto the catalog tuples.  In fact, if you wanted to have any
null fields in pg_autovacuum, you would need to find a way to prevent
initdb from enforcing that policy:

regression=# \d pg_autovacuum
    Table "pg_catalog.pg_autovacuum"
      Column      |  Type   | Modifiers
 vacrelid         | oid     | not null
 enabled          | boolean | not null
 vac_base_thresh  | integer | not null
 vac_scale_factor | real    | not null
 anl_base_thresh  | integer | not null
 anl_scale_factor | real    | not null
 vac_cost_delay   | integer | not null
 vac_cost_limit   | integer | not null
 freeze_min_age   | integer | not null
 freeze_max_age   | integer | not null
    "pg_autovacuum_vacrelid_index" UNIQUE, btree (vacrelid)

I don't find this particularly important, because we have never intended
direct update of catalog entries to be a primary way of interacting with
the system.  The current pg_autovacuum setup is a stopgap until the dust
has settled enough that we know what sort of long-term API we want for

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Jim C. NasbyDate: 2007-02-23 23:27:49
Subject: Re: Proposal for Implenting read-only queries during wal replay (SoC 2007)
Previous:From: Warren TurkalDate: 2007-02-23 23:24:29
Subject: Re: SCMS question

pgsql-general by date

Next:From: Bruce MomjianDate: 2007-02-23 23:32:07
Subject: Re: 5 Weeks till feature freeze or (do you know where your patch is?)
Previous:From: Martijn van OosterhoutDate: 2007-02-23 23:24:18
Subject: Re: postgresql vs mysql

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group