Re: Linux/PostgreSQL scalability issue - problem with 8 cores - Mailing list pgsql-performance

From Tom Lane
Subject Re: Linux/PostgreSQL scalability issue - problem with 8 cores
Date
Msg-id 23470.1200410459@sss.pgh.pa.us
Whole thread Raw
In response to Re: Linux/PostgreSQL scalability issue - problem with 8 cores  (Jakub Ouhrabka <kuba@comgate.cz>)
Responses Re: Linux/PostgreSQL scalability issue - problem with 8 cores  (Jakub Ouhrabka <kuba@comgate.cz>)
List pgsql-performance
Jakub Ouhrabka <kuba@comgate.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

pgsql-performance by date:

Previous
From: Adrian Moisey
Date:
Subject: Re: Linux/PostgreSQL scalability issue - problem with 8 cores
Next
From: Jakub Ouhrabka
Date:
Subject: Re: Linux/PostgreSQL scalability issue - problem with 8 cores