Re: lock_timeout GUC patch

From: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>, pgsql-hackers(at)postgresql(dot)org, Robert Haas <robertmhaas(at)gmail(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Hans-Juergen Schoenig <postgres(at)cybertec(dot)at>, Josh Berkus <josh(at)agliodbs(dot)com>, Sándor Miglécz <sandor(at)cybertec(dot)at>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: lock_timeout GUC patch
Date: 2010-01-13 06:07:52
Message-ID: 4B4D6338.9010902@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane írta:
> Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec> writes:
>
>> it has a hunk failed when trying to apply i guess it's because of
>> Tom's refactor of relcache.c
>>
>
> If this patch is touching those parts of relcache.c, it probably needs
> rethinking.
>
> regards, tom lane
>
>

The reject in my patch is because of this chunk in your change:

*************** load_critical_index(Oid indexoid)
*** 2836,2842 ****
Relation ird;

LockRelationOid(indexoid, AccessShareLock);
! ird = RelationBuildDesc(indexoid, NULL);
if (ird == NULL)
elog(PANIC, "could not open critical system index %u", indexoid);
ird->rd_isnailed = true;
--- 2893,2899 ----
Relation ird;

LockRelationOid(indexoid, AccessShareLock);
! ird = RelationBuildDesc(indexoid, true);
if (ird == NULL)
elog(PANIC, "could not open critical system index %u", indexoid);
ird->rd_isnailed = true;

What I did there is to check the return value of LockRelationOid()
and also elog(PANIC) if the lock wasn't available.
Does it need rethinking?

--
Bible has answers for everything. Proof:
"But let your communication be, Yea, yea; Nay, nay: for whatsoever is more
than these cometh of evil." (Matthew 5:37) - basics of digital technology.
"May your kingdom come" - superficial description of plate tectonics

----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
http://www.postgresql.at/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jaime Casanova 2010-01-13 06:14:05 Re: lock_timeout GUC patch
Previous Message Tom Lane 2010-01-13 05:34:40 Re: xml2 still essential for us