Assertion failure with small block sizes - Mailing list pgsql-patches

From Gregory Stark
Subject Assertion failure with small block sizes
Date
Msg-id 877ilpu4zf.fsf@oxford.xeocode.com
Whole thread Raw
Responses Re: Assertion failure with small block sizes  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-patches by date:

Previous
From: "Brendan Jurd"
Date:
Subject: Re: [HACKERS] quote_literal with NULL
Next
From: Tom Lane
Date:
Subject: Re: Assertion failure with small block sizes