From: | Noah Misch <noah(at)leadboat(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: Removal of AcceptInvalidationMessages broke things |
Date: | 2012-09-19 18:17:42 |
Message-ID: | 20120919181742.GA9714@tornado.leadboat.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Sep 19, 2012 at 01:17:17PM -0400, Tom Lane wrote:
> I looked into bug #7557, which demonstrates a case where a session fails
> to notice a just-committed change in table permissions.
> - /*
> - * Check for shared-cache-inval messages before trying to open the
> - * relation. This is needed to cover the case where the name identifies a
> - * rel that has been dropped and recreated since the start of our
> - * transaction: if we don't flush the old syscache entry then we'll latch
> - * onto that entry and suffer an error when we do RelationIdGetRelation.
> - * Note that relation_open does not need to do this, since a relation's
> - * OID never changes.
> - *
> - * We skip this if asked for NoLock, on the assumption that the caller has
> - * already ensured some appropriate lock is held.
> - */
> - if (lockmode != NoLock)
> - AcceptInvalidationMessages();
>
> and there are no other places where a transaction will do
> AcceptInvalidationMessages if it thinks it already holds lock on the
> tables it's working with.
>
> Since we have only a few hours before 9.2.1 is due to wrap, my
> inclination for a band-aid fix is to put back that code. There might be
> some more elegant answer, but we haven't got time to find it now.
Sounds fine for now. I suspect the better change would be to make
AcceptInvalidationMessages() unconditional in LockRelationOid() and friends.
There's no reason to desire recent ACLs only when opening by name.
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2012-09-19 18:21:29 | Re: Re: [COMMITTERS] pgsql: Properly set relpersistence for fake relcache entries. |
Previous Message | Tom Lane | 2012-09-19 17:47:31 | Re: Re: [COMMITTERS] pgsql: Properly set relpersistence for fake relcache entries. |