Currently find_inheritance_children() is smart enough to skip a child table that it finds has been dropped concurrently after it gets a lock on the same. It does so by looking up the child relid in syscache. It seems it should also check if the table is still in the list of children of the parent. Doing so by scanning the pg_inherits(inhparent) index may likely be inefficient. So, how about adding that syscache on pg_inherits(inherelid, inhparent) ?
I was prompted by a report sometime ago on -general  about the "could not find inherited attribute..." error. Also, it was reported as a bug few years ago where locking parent exclusively in ALTER TABLE NO INHERIT as a solution was dismissed for being prone to deadlock issues . Would it be worth the trouble? Thanks, Amit  http://www.postgresql.org/message-id/25515.1149652...@sss.pgh.pa.us  http://www.postgresql.org/message-id/55ba1a06.1000...@gmail.com  http://www.postgresql.org/message-id/19666.1213709...@sss.pgh.pa.us -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers