From: Michael Fuhr <mike@fuhr.org>
To: Markus Schaber <schabi@logix-tt.com>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: PostgreSQL SQL List <pgsql-sql@postgresql.org>
Subject: Re: no notnull values, invalid stats?
Date: Mon, 6 Feb 2006 10:35:24 -0700
Message-ID: <20060206173523.GA16445@winnie.fuhr.org> (raw)
In-Reply-To: <43E75E00.8050105@logix-tt.com>
References: <43E739CF.6030908@logix-tt.com>
<20060206140227.GA5765@surnet.cl>
<43E75E00.8050105@logix-tt.com>
On Mon, Feb 06, 2006 at 03:32:32PM +0100, Markus Schaber wrote:
> Alvaro Herrera wrote:
> >>The following message occasionally appears in my postgresql log - from
> >>temporal corellation, it might be caused by autovacuum.
> >>
> >>NOTICE: no notnull values, invalid stats
> >
> > I see no such message in 8.1 sources. Is this verbatim or did you
> > translate it?
>
> It is verbatim from /var/log/postgresql/postgresql-8.1-main.log.
>
> But I have PostGIS installed in some of the databases, so it might be
> from there.
That is indeed a PostGIS message; it's in compute_geometry_stats()
in lwgeom/lwgeom_estimate.c. I think it means that during an
analyze, all of the sampled rows had NULL values in their geometry
columns (i.e., no not-NULL values were found); that would explain
the correlation with autovacuum. Here's an example that elicits
the notice:
postgis=> CREATE TABLE foo ();
CREATE TABLE
postgis=> SELECT AddGeometryColumn('foo', 'geom', -1, 'GEOMETRY', 2);
addgeometrycolumn
------------------------------------------------
public.foo.geom SRID:-1 TYPE:GEOMETRY DIMS:2
(1 row)
postgis=> INSERT INTO foo VALUES (NULL);
INSERT 0 1
postgis=> ANALYZE foo;
NOTICE: no notnull values, invalid stats
ANALYZE
postgis=> UPDATE foo SET geom = GeomFromText('POINT(0 0)');
UPDATE 1
postgis=> ANALYZE foo;
ANALYZE
--
Michael Fuhr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mike@fuhr.org, schabi@logix-tt.com, alvherre@commandprompt.com
Subject: Re: no notnull values, invalid stats?
In-Reply-To: <20060206173523.GA16445@winnie.fuhr.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox