Re: Continual uptime while loading data ... COPY vs INSERTS within a transaction. - Mailing list pgsql-general

From Tom Lane
Subject Re: Continual uptime while loading data ... COPY vs INSERTS within a transaction.
Date
Msg-id 4253.1202603234@sss.pgh.pa.us
Whole thread Raw
In response to Continual uptime while loading data ... COPY vs INSERTS within a transaction.  (Benjamin Arai <me@benjaminarai.com>)
Responses Re: Continual uptime while loading data ... COPY vs INSERTS within a transaction.
List pgsql-general
Benjamin Arai <me@benjaminarai.com> writes:
> We are thinking of modifying our system to use COPY to replace these
> large INSERT transactions but we are concerned that it will greatly
> impact the user experience (i.e., exclusively lock the table during the
> copy process).  First, does COPY grab an exclusive lock? Second, is
> there a better way to load data?

No, and no.  Use COPY.

            regards, tom lane

pgsql-general by date:

Previous
From: "Christopher Browne"
Date:
Subject: Re: Continual uptime while loading data ... COPY vs INSERTS within a transaction.
Next
From: "Dean Gibson (DB Administrator)"
Date:
Subject: Where is the system-wide psqlrc on RHEL4?