Re: How to reindex when unable to open relation?

From: Darren Reed <darrenr+postgres(at)fastmail(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Shoaib Mir <shoaibmir(at)gmail(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: How to reindex when unable to open relation?
Date: 2008-02-27 06:39:12
Message-ID: 47C50590.2000104@fastmail.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Tom Lane wrote:
> Darren Reed <darrenr+postgres(at)fastmail(dot)net> writes:
> >>> How do I know which files those are?
> >>
> >> find $PGDATA -name pg_internal.init
>
> > Doesn't exist.
>
> Sucks to be you, then :-(
>
> I'm curious though exactly where the failure is, because there's not
> much in RelationCacheInitializePhase2 that looks like it could crash,
> other than the init-file reading (I assume load_relcache_init_file
> got inlined into RelationCacheInitializePhase2). Do you want to try
> rebuilding the backend with --enable-debug so we can get a better
> traceback?
>

#0 0x08298378 in RelationCacheInitializePhase2 () at relcache.c:2394
2394 LOAD_CRIT_INDEX(AttributeRelidNumIndexId);
(gdb) where
#0 0x08298378 in RelationCacheInitializePhase2 () at relcache.c:2394
#1 0x082ac19c in InitPostgres (dbname=0x83ba450 "postgres",
username=0x83c1428 "postgres") at postinit.c:459
#2 0x0820b533 in PostgresMain (argc=4, argv=0x83c1458,
username=0x83c1428 "postgres") at postgres.c:3143
#3 0x081dc572 in BackendRun (port=0x83bc800) at postmaster.c:2934
#4 0x081dbb7e in BackendStartup (port=0x83bc800) at postmaster.c:2561
#5 0x081d985c in ServerLoop () at postmaster.c:1214
#6 0x081d9292 in PostmasterMain (argc=3, argv=0xbfbfeb14) at
postmaster.c:966
#7 0x08187989 in main (argc=3, argv=0xbfbfeb14) at main.c:188
(gdb) p ird
$1 = (Relation) 0x0
(gdb) p oldcxt
$2 = (MemoryContext) 0x83de258
(gdb) p needNewCacheFile
$3 = 1 '\001'
(gdb) p status
$4 = {hashp = 0x8, curBucket = 2, curEntry = 0x8360777}
(gdb) p idhentry
$5 = (RelIdCacheEnt *) 0x836b168

Darren

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Suresh Gupta VG 2008-02-27 08:10:10 Pgsql 8.2.5 Installation
Previous Message Tom Lane 2008-02-27 06:08:38 Re: Backup to Tape Incomplete