relname.data

Started by SHIOZAKI Takehikoabout 27 years ago1 messages
#1SHIOZAKI Takehiko
takehi-s@ascii.co.jp

Hello!

I'm the original reporter of "vacuum crash" problem.
Thank you for your quick fix.

Now, I found another problem in nbtsearch.c.
This is my patch for it.
# But, what I want to know is why postgres reaches this FATAL status...

========================================================================
*** nbtsearch.c.orig	Tue Oct 20 16:42:59 1998
--- nbtsearch.c	Tue Oct 20 16:43:15 1998
***************
*** 217,223 ****
  										PageGetItemId(page, P_FIRSTKEY),
  										BTEqualStrategyNumber))
  							elog(FATAL, "btree: BTP_CHAIN flag was expected in %s (access = %s)",
! 								 rel->rd_rel->relname, access ? "bt_write" : "bt_read");
  						if (_bt_skeycmp(rel, keysz, scankey, page,
  										PageGetItemId(page, offmax),
  										BTEqualStrategyNumber))
--- 217,223 ----
  										PageGetItemId(page, P_FIRSTKEY),
  										BTEqualStrategyNumber))
  							elog(FATAL, "btree: BTP_CHAIN flag was expected in %s (access = %s)",
! 								 rel->rd_rel->relname.data, access ? "bt_write" : "bt_read");
  						if (_bt_skeycmp(rel, keysz, scankey, page,
  										PageGetItemId(page, offmax),
  										BTEqualStrategyNumber))
========================================================================

And with the following script, you can find suspicious lines which
have pointer type incompatibility but work *fortunately* on most
systems.

========================================================================
#/bin/sh

find PGSRC -type f -name '*.[ch]' -print |
xargs egrep -e 'rd_rel->relname' /dev/null |
egrep -v 'relname\)?\.data'
========================================================================

Regards

--
ASCII CORPORATION
Technical Center
SHIOZAKI Takehiko
<takehi-s@ascii.co.jp>