Nikhil Sontakke <nikkh...@gmail.com> writes: > PFA, a patch against git head. We take the AccessShareLock lock on the > schema in DefineRelation now.
Um ... why would we do this only for tables, and not for creations of other sorts of objects that belong to schemas? Also, if we are going to believe that this is a serious problem, what of ALTER ... SET SCHEMA? Also, the proposed solution is pretty silly on its face, because it has not removed the race condition only made the window somewhat narrower. You would have to acquire the lock as part of the initial schema lookup, not lock the OID after the fact. And could we please not do something as silly as translate the OID back to a string and then look up that string a second time? (To be clear, I don't particularly believe that this is a problem worthy of spending code space and cycles on. But if it's deemed to be a problem, I want to see a solution that's actually watertight.) regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers