X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 3A4C59DC860 for ; Mon, 6 Feb 2006 13:35:50 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 06042-01 for ; Mon, 6 Feb 2006 13:35:49 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id ABF979DC862 for ; Mon, 6 Feb 2006 13:35:47 -0400 (AST) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id k16HZOLQ045776 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 6 Feb 2006 10:35:26 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.4/8.13.4) with ESMTP id k16HZOSg037793; Mon, 6 Feb 2006 10:35:24 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.4/8.13.4/Submit) id k16HZOJb037792; Mon, 6 Feb 2006 10:35:24 -0700 (MST) (envelope-from mfuhr) Date: Mon, 6 Feb 2006 10:35:24 -0700 From: Michael Fuhr To: Markus Schaber Cc: Alvaro Herrera , PostgreSQL SQL List Subject: Re: no notnull values, invalid stats? Message-ID: <20060206173523.GA16445@winnie.fuhr.org> References: <43E739CF.6030908@logix-tt.com> <20060206140227.GA5765@surnet.cl> <43E75E00.8050105@logix-tt.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43E75E00.8050105@logix-tt.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.121 required=5 tests=[AWL=0.121] X-Spam-Score: 0.121 X-Spam-Level: X-Archive-Number: 200602/53 X-Sequence-Number: 24063 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