Re: High load on commit after important schema changes - Mailing list pgsql-general

From Tom Lane
Subject Re: High load on commit after important schema changes
Date
Msg-id 10229.1251476886@sss.pgh.pa.us
Whole thread Raw
In response to High load on commit after important schema changes  (hubert depesz lubaczewski <depesz@depesz.com>)
Responses Re: High load on commit after important schema changes  (hubert depesz lubaczewski <depesz@depesz.com>)
List pgsql-general
hubert depesz lubaczewski <depesz@depesz.com> writes:
> One of operations that happens on the database is:
> begin;
> call function();
> commit;
> where  function is plpgsql function which does:
> - drop several (n) views/tables
> - rename ~2n views and tables (and related objects like indexes and
>   constraints) - including ones that are very often used

> eveyrting is fine up until commit;

> when commit is called load jumps from ~2 to ~40, despite the fact that
> there are not much activity on the system (it happens in the morning).

Hm, do you have forty or so idle backends hanging around while this
happens?  The only thing I can think of that might be causing this is
shared cache invalidation messages being broadcast to all the other
sessions.

8.4 has some improvements in SI messaging that might or might not
solve it for you.  In 8.2 I think the only thing you could do is
not have so many open sessions while you change the schema.

            regards, tom lane

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Update /src/tools/msvc to VC++ 2008
Next
From: Magnus Hagander
Date:
Subject: Re: Update /src/tools/msvc to VC++ 2008