Re: pgsql: Add support for MERGE SQL command - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Add support for MERGE SQL command
Date
Msg-id 537759.1663625579@sss.pgh.pa.us
Whole thread Raw
In response to pgsql: Add support for MERGE SQL command  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: pgsql: Add support for MERGE SQL command  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Add support for MERGE SQL command

komodoensis just failed in a way that demonstrates instability of
the MERGE tests [1].  It looks to me like a background autovacuum
came along and processed one or both of ex_msource and ex_mtarget,
causing their default join plan to change to something else.
Probably an explicit ANALYZE would serve to stabilize that,
but it might end up with a slightly different plan than what
we have now.  It's not clear if that matters?

I also wonder whether we'd need to re-analyze after each of the
explain_merge calls, because those are changing the tables
and hence potentially provoking background stats updates.

It might be better to change these to temp tables.  You'd then
have to filter the temp schema out of the results; but since you
have a filtering function anyway, that doesn't seem too hard.

            regards, tom lane

[1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=komodoensis&dt=2022-09-19%2011%3A32%3A56



pgsql-committers by date:

Previous
From: Peter Geoghegan
Date:
Subject: pgsql: Consistently use named parameters in regex code.
Next
From: Peter Geoghegan
Date:
Subject: pgsql: Consistently use named parameters in timezone code.