pgsql: Make LockDatabaseObject() AcceptInvalidationMessages().

Started by Robert Haasalmost 16 years ago4 messagescomitters
Jump to latest
#1Robert Haas
robertmhaas@gmail.com

Log Message:
-----------
Make LockDatabaseObject() AcceptInvalidationMessages().

This is appropriate for the same reasons we already do it in
LockSharedObject(): things might have changed while we were waiting
for the lock. There doesn't seem to be a live bug here at the moment,
but that's mostly because it isn't currently used for very much.

Modified Files:
--------------
pgsql/src/backend/storage/lmgr:
lmgr.c (r1.100 -> r1.101)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/lmgr/lmgr.c?r1=1.100&r2=1.101)

#2Simon Riggs
simon@2ndQuadrant.com
In reply to: Robert Haas (#1)
Re: pgsql: Make LockDatabaseObject() AcceptInvalidationMessages().

On Mon, 2010-08-16 at 02:02 +0000, Robert Haas wrote:

Log Message:
-----------
Make LockDatabaseObject() AcceptInvalidationMessages().

This is appropriate for the same reasons we already do it in
LockSharedObject(): things might have changed while we were waiting
for the lock. There doesn't seem to be a live bug here at the moment,
but that's mostly because it isn't currently used for very much.

I have a horrible nagging feeling this breaks something. I remember
noticing that about a year ago and it seemed to make sense then. Sorry,
can't recall anything else at present.

--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Training and Services

#3Robert Haas
robertmhaas@gmail.com
In reply to: Simon Riggs (#2)
Re: pgsql: Make LockDatabaseObject() AcceptInvalidationMessages().

On Wed, Aug 25, 2010 at 11:46 AM, Simon Riggs <simon@2ndquadrant.com> wrote:

On Mon, 2010-08-16 at 02:02 +0000, Robert Haas wrote:

Log Message:
-----------
Make LockDatabaseObject() AcceptInvalidationMessages().

This is appropriate for the same reasons we already do it in
LockSharedObject(): things might have changed while we were waiting
for the lock.  There doesn't seem to be a live bug here at the moment,
but that's mostly because it isn't currently used for very much.

I have a horrible nagging feeling this breaks something. I remember
noticing that about a year ago and it seemed to make sense then. Sorry,
can't recall anything else at present.

Well, the only place it's used at the moment is in the drop-object
code. Not sure if that might be enough to jog your memory?

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

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Robert Haas (#3)
Re: pgsql: Make LockDatabaseObject() AcceptInvalidationMessages().

Robert Haas <robertmhaas@gmail.com> writes:

On Wed, Aug 25, 2010 at 11:46 AM, Simon Riggs <simon@2ndquadrant.com> wrote:

I have a horrible nagging feeling this breaks something.

Well, the only place it's used at the moment is in the drop-object
code. Not sure if that might be enough to jog your memory?

Also, it's pretty hard to see how this could break anything that isn't
already broken, because AcceptInvalidationMessages() already happens
in the other cases in that code path.

regards, tom lane