Skip site navigation (1) Skip section navigation (2)

Re: cannot read pg_class without having selected a database / is this a bug?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tomas Vondra <tv(at)fuzzy(dot)cz>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: cannot read pg_class without having selected a database / is this a bug?
Date: 2011-12-05 15:35:37
Message-ID: CA+Tgmoa4j02GGgdFA+xkmyHuKvribyBq4Je7V6y8V+vuPCv12A@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Sun, Dec 4, 2011 at 4:26 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Tomas Vondra <tv(at)fuzzy(dot)cz> writes:
>> What about the pg_stat_activity - is it safe to access that from auth
>> hook or is that just a coincidence that it works (and might stop working
>> in the future)?
>
> It doesn't seem like a good thing to rely on.  There's certainly no
> testing being done that would cause us to notice if it stopped working
> so early in backend startup.

I'm still puzzled that Tomas got it working at all.  If MyDatabaseId
hasn't been set yet, the how did we manage to build a relcache entry
for anything - let alone an unshared catalog?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2011-12-05 15:44:39
Subject: Re: missing rename support
Previous:From: Kevin GrittnerDate: 2011-12-05 15:34:58
Subject: Re: [REVIEW] Patch for cursor calling with named parameters

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group