Assertion failure with small block sizes

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: PostgreSQL-development Hackers <pgsql-patches(at)postgresql(dot)org>
Subject: Assertion failure with small block sizes
Date: 2007-10-14 14:48:36
Message-ID: 877ilpu4zf.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


Testing Postgres with a small block size runs into an assertion failure when
it tries to toast a pg_proc tuple during initdb. I think the assertion is just
wrong and RELKIND_UNCATALOGUED is valid here. Other places in the code check
for both before, for example, creating toast tables.

creating template1 database in /home/stark/src/local-HEAD/pgsql/src/test/regress/./tmp_check/data/base/1 ... TRAP: FailedAssertion("!(rel->rd_rel->relkind == 'r')", File: "tuptoaster.c", Line: 440)

--- tuptoaster.c 13 Oct 2007 22:34:06 +0100 1.78
+++ tuptoaster.c 14 Oct 2007 15:37:17 +0100
@@ -437,7 +437,8 @@
* We should only ever be called for tuples of plain relations ---
* recursing on a toast rel is bad news.
*/
- Assert(rel->rd_rel->relkind == RELKIND_RELATION);
+ Assert(rel->rd_rel->relkind == RELKIND_RELATION ||
+ rel->rd_rel->relkind == RELKIND_UNCATALOGED);

/*
* Get the tuple descriptor and break down the tuple(s) into fields.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-10-14 14:55:54 Re: Assertion failure with small block sizes
Previous Message Trevor Talbot 2007-10-14 14:02:40 Re: Including Snapshot Info with Indexes