From: | Francisco Reyes <lists(at)natserv(dot)com> |
---|---|
To: | Andrew Sullivan <andrew(at)libertyrms(dot)info> |
Cc: | pgsql General List <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Shortening time of vacuum analyze |
Date: | 2002-01-30 17:23:50 |
Message-ID: | 20020130122242.K40489-100000@zoraida.natserv.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, 30 Jan 2002, Andrew Sullivan wrote:
> On Wed, Jan 30, 2002 at 11:07:43AM -0500, Francisco Reyes wrote:
>
> > Nightly doing delete of about 6 million records and then re-merging.
> > Previously I was doing truncate, but this was an issue if a user tried to
> > use the system while we were loading. Now we are having a problem while
> > the server is running vacuum analyzes.
>
> I'm not sure I understand the problem of "issue if a user tried to
> use the system while we were loading". I understand that, of course,
> the data is gone when you truncate; but won't it be anyway, if you
> delete?
You can put the delete/load inside a transaction so the users will never
see an empty table. Truncate can not be placed inside a transaction.
We basically do
begin transaction
delete
copy
commit transaction
From | Date | Subject | |
---|---|---|---|
Next Message | Fernando Lozano | 2002-01-30 19:31:10 | pgsql, java and accents |
Previous Message | Stephan Szabo | 2002-01-30 17:06:58 | Re: unique & update |