Re: ON CONFLICT DO NOTHING ignored on bulk insert

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Hellmuth Vargas <hivs77(at)gmail(dot)com>
Cc: Geoff Winkless <pgsqladmin(at)geoff(dot)dj>, Andrus <kobruleht2(at)hot(dot)ee>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: ON CONFLICT DO NOTHING ignored on bulk insert
Date: 2021-05-25 15:41:42
Message-ID: CAHOFxGryjbEkS6pT+1WW1Z0j5GWF=zO5LHRNyon54a63XMKo4g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message RAJAMOHAN 2021-05-26 07:19:31 Null database entry in pg_stat_database on pg-12 version
Previous Message Hellmuth Vargas 2021-05-25 13:47:29 Re: ON CONFLICT DO NOTHING ignored on bulk insert