On Thu, Dec 6, 2018 at 12:03 PM Tom Lane <t...@sss.pgh.pa.us> wrote: > In my testing, that still hits AIM() during parserOpenTable().
Oh, I see. relation_openrv_extended() calls it. > [ further experimentation... ] It looks like if you prepare > a query and then just execute it repeatedly in one transaction, > you'd not reach AIM (as long as you were getting generic plans). > Possibly that's a gap worth closing. If we called it at the start of every query, couldn't we dispense with the call in relation_openrv_extended()? On net, that would actually mean fewer calls to AcceptInvalidationMessages(), assuming you sometimes run queries that touch multiple relations. And the behavior would be more predictable, too, because you'd (hopefully) have no cases where a command failed to see the results of DDL that committed before the command was issued. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company