On 2015-10-12 06:42:52 -0700, Adrian Klaver wrote: > >My guess is that the problem here is that table level locking prevents > >modification of the "users" type when the table is used, but there's no > >locking preventing the columns to be dropped while the function is > >used. So what happens is that 1) the function is parsed & planned 2) > >DROP COLUMN is executed 3) the contained statement is executed 4) a > >mismatch between the contained statement and the function definition is > >detected. > > Except per Albe's[1] example, the above sequence of events does not fail. It > fails in Victors's case when the server is under load, so it seems there is > another factor in play. The above sequence is only problematic if 2) happens exactly between 1) and 3), which is not particularly likely given that 1) is a very quick operation. Greetings, Andres Freund -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general