Re: pg_buffercache causes assertion failure - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_buffercache causes assertion failure
Date
Msg-id 8759.1117387164@sss.pgh.pa.us
Whole thread Raw
In response to pg_buffercache causes assertion failure  (Michael Fuhr <mike@fuhr.org>)
Responses Re: pg_buffercache causes assertion failure  (Mark Kirkwood <markir@paradise.net.nz>)
List pgsql-hackers
Michael Fuhr <mike@fuhr.org> writes:
> I'm not sure when this broke, but using contrib/pg_buffercache with
> the latest HEAD causes an assertion failure:

> test=# SELECT * FROM pg_buffercache;
> server closed the connection unexpectedly

Fixed; turns out to be an ancient parse-analysis bug that was causing
the view definition to not agree with the function definition if the
function definition included a nondefault typmod.

I wonder though why this contrib module is defining its output as
numeric(10) --- seems like a pretty inefficient choice compared to,
say, int8; or even int4 which is what the pg_locks view is using.

And it's arguably a wrong specification anyway, since the code is doing
nothing to enforce that precision.

Should tupledesc_match() in nodeFunctionscan.c be enforcing equality
of typmods?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Simplifying unknown-literal handling
Next
From: Tom Lane
Date:
Subject: Re: Simplifying unknown-literal handling