Re: Linux/PostgreSQL scalability issue - problem with 8 cores

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jakub Ouhrabka <kuba(at)comgate(dot)cz>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Linux/PostgreSQL scalability issue - problem with 8 cores
Date: 2008-01-15 15:20:59
Message-ID: 23470.1200410459@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Jakub Ouhrabka <kuba(at)comgate(dot)cz> writes:
> we've found it: TRUNCATE

Huh. One transaction truncating a dozen tables? That would match the
sinval trace all right ...

> One more question: is it ok to do mass regexp update of pg_proc.prosrc
> changing TRUNCATEs to DELETEs?

You might be throwing the baby out with the bathwater, performance-wise.
Mass DELETEs will require cleanup by VACUUM, and that'll likely eat more
cycles and I/O than you save. I'd think in terms of trying to spread
out the TRUNCATEs or check to see if you really need one (maybe the
table's already empty), rather than this.

I do plan to look at the sinval code once 8.3 is out the door, so
another possibility if you can wait a few weeks/months is to leave your
app alone and see if the eventual patch looks sane to back-patch.
(I don't think the community would consider doing so, but you could
run a locally modified Postgres with it.)

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jakub Ouhrabka 2008-01-15 15:45:57 Re: Linux/PostgreSQL scalability issue - problem with 8 cores
Previous Message Adrian Moisey 2008-01-15 12:26:10 Re: Linux/PostgreSQL scalability issue - problem with 8 cores