Re: Continual uptime while loading data ... COPY vs INSERTS within a transaction.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Benjamin Arai <me(at)benjaminarai(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, "craig(at)tabbec(dot)com" <craig(at)tabbec(dot)com>
Subject: Re: Continual uptime while loading data ... COPY vs INSERTS within a transaction.
Date: 2008-02-10 00:27:14
Message-ID: 4253.1202603234@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Benjamin Arai <me(at)benjaminarai(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dean Gibson (DB Administrator) 2008-02-10 02:01:19 Where is the system-wide psqlrc on RHEL4?
Previous Message Christopher Browne 2008-02-10 00:16:30 Re: Continual uptime while loading data ... COPY vs INSERTS within a transaction.