Skip site navigation (1) Skip section navigation (2)

Re: Is stats update during COPY IN really a good idea?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Is stats update during COPY IN really a good idea?
Date: 2001-05-21 17:56:37
Message-ID: 200105211756.f4LHub004283@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > People are using COPY into the same table at the same time? 
> 
> Yes --- we had a message from someone who was doing that (and running
> into unrelated performance issues) just last week.

OK.

> > My vote is to update pg_class.  The VACUUM takes much more time than the
> > update, and we are only updating the pg_class row, right?
> 
> What?  What does VACUUM have to do with this?

You have to VACUUM to get pg_class updated after COPY, right?

> The reason this is a significant issue is that the first COPY could be
> inside a transaction, in which case the lock will persist until that
> transaction commits, which could be awhile.

Oh, I see.  Can we disable the pg_class update if we are in a
multi-statement transaction?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

Responses

pgsql-hackers by date

Next:From: Mikheev, VadimDate: 2001-05-21 18:01:45
Subject: RE: Plans for solving the VACUUM problem
Previous:From: Tom LaneDate: 2001-05-21 17:56:35
Subject: Re: Detecting readline in configure

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group