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

From: Benjamin Arai <me(at)benjaminarai(dot)com>
To: pgsql-general(at)postgresql(dot)org, "craig(at)tabbec(dot)com" <craig(at)tabbec(dot)com>
Subject: Continual uptime while loading data ... COPY vs INSERTS within a transaction.
Date: 2008-02-09 23:30:01
Message-ID: 47AE3779.6010101@benjaminarai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

We are running a system which requires continual uptime while loading
data. Currently one particular table receives a large number of inserts
per commit (about 10000 inserts). This process works well allowing both
end users to access the data as well as loading reasonably quickly.

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?

Benjamin

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-02-09 23:48:33 Re: Set server behaviors on a per-session basis?
Previous Message Tom Lane 2008-02-09 23:03:27 Re: fsync=off & shutdown => crash?