Re: Perceived weaknesses of postgres - Mailing list pgsql-general

From Csaba Nagy
Subject Re: Perceived weaknesses of postgres
Date
Msg-id 1202908316.5555.40.camel@PCD12478
Whole thread Raw
In response to Re: Perceived weaknesses of postgres  (Magnus Hagander <magnus@hagander.net>)
List pgsql-general
On Wed, 2008-02-13 at 13:56 +0100, Magnus Hagander wrote:
> I don't think these people are comparing to other opensource ones...
> They're comparing to the commercial ones (at least in this case)

Yes, that's definitely the case. And that can actually be taken as a
compliment to the already attained status of postgres...

> I would guess they're referring to the ability to "pin" a table into
> memory, so that it always stays in the cache regardless of what else the
> database is doing. There is a narrow use-case where this can be very
> useful, but it can also be a very dangerous tool (hint: if you pin a
> table that grows up to say 80-90% of your RAM size, your database will
> not be fast for anything else)

If you can not only pin the complete table, but just allocate a fixed
amount of memory for caching _only that table_, then you get a
compromise which would be better than the 2 extremes: the table is
cached in a mixed bag together with all the rest, resulting in
effectively being cached 0-100% depending on all the activities on the
DB, or it is always 100% cached independently of the any activities in
the DB. The intermediate solution is: the table is always cached using x
amount of memory independently of what happens on the DB. That makes
sure the table is completely cached if the allocated memory is enough,
and at least the most used records are always cached if the table grows
bigger than the allocated cache, while there's no risk of overrunning
the available memory. This could also be applied to groups of tables.

Cheers,
Csaba.


pgsql-general by date:

Previous
From: Tino Wildenhain
Date:
Subject: Re: dynamic crosstab
Next
From: Brad Nicholson
Date:
Subject: Re: Perceived weaknesses of postgres