Re: ON CONFLICT DO NOTHING ignored on bulk insert

Michael Lewis <mlewis@entrata.com>

From: Michael Lewis <mlewis@entrata.com>
To: Hellmuth Vargas <hivs77@gmail.com>
Cc: Geoff Winkless <pgsqladmin@geoff.dj>, Andrus <kobruleht2@hot.ee>, pgsql-general <pgsql-general@postgresql.org>
Date: 2021-05-25T15:41:42Z
Lists: pgsql-general
Are you wanting to minimize the locking time, or ensure the whole process
completes as soon as possible? If the prior, you can insert into a temp
table like the real one (which is maybe what pricelistnew is already),
delete the rows where they don't have a valid reference, and then insert
all remaining rows.