Re: two memory-consuming postgres processes

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: Alexy Khrabrov <deliverable(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: two memory-consuming postgres processes
Date: 2008-05-02 21:23:45
Message-ID: Pine.GSO.4.64.0805021714580.2455@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, 2 May 2008, Alexy Khrabrov wrote:

> I created several indices for the primary table, yes.

That may be part of your problem. All of the indexes all are being
updated along with the main data in the row each time you touch a record.
There's some optimization there in 8.3 but it doesn't make index overhead
go away completely. As mentioned already, the optimal solution to
problems in this area is to adjust table normalization as much as feasible
to limit what you're updating.

> Basically, the derived data is not critical at all, -- can I turn (1)
> off transactional behavior for an UPDATE,

What you can do is defer transaction commits to only happen periodically
rather than all the time by turning off syncronous_commit and increasing
wal_writer_delay; see
http://www.postgresql.com.cn/docs/8.3/static/wal-async-commit.html

> (2) should I care about vacuuming being done on the fly when saving RAM,
> or need I defer it/manage it manually?

It's hard to speculate from here about what optimal vacuum behavior will
be. You might find it more efficient to turn autovacuum off when doing
these large updates. The flip side is that you'll be guaranteed to end up
with more dead rows in the table and that has its own impact later.

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Alexy Khrabrov 2008-05-02 21:30:17 Re: two memory-consuming postgres processes
Previous Message Alexy Khrabrov 2008-05-02 21:09:52 Re: two memory-consuming postgres processes