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.
- ON CONFLICT DO NOTHING ignored on bulk insert Andrus
- Re: ON CONFLICT DO NOTHING ignored on bulk insert Geoff Winkless
- Re: ON CONFLICT DO NOTHING ignored on bulk insert Hellmuth Vargas
- Re: ON CONFLICT DO NOTHING ignored on bulk in... Michael Lewis