Re: [PATCH] Don't bail with legitimate -N/-B options

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Andreas Kling <andreas(dot)kling(at)acgnystrom(dot)se>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: [PATCH] Don't bail with legitimate -N/-B options
Date: 2008-02-16 22:23:44
Message-ID: 10846.1203200624@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Magnus Hagander <magnus(at)hagander(dot)net> writes:
> Those are not comments on the actual patch, of course. For that one, it
> looks to me like it's the wrong fix. I don't think we should be adding
> to shared buffers like that - if somebody asked for a specific value
> they should get that.

Agreed, this is really inappropriate.

The whole test probably needs to be rethought. I think the idea
was to ensure that you couldn't run out of pinnable buffers if all
backends were concurrently doing UPDATEs that touched two pages. But
it's an underestimate --- for instance, if the UPDATE is doing an
indexscan then there's likely an index page pinned somewhere as well.
Worse, if you're joining N tables then there's likely N or N*2 pages
pinned at any instant.

Personally what I think we should do is intentionally break the current
Gentoo packaging --- we already unintentionally broke it, but changing
the code that those ridiculous parameter values are accepted again is
NOT the appropriate next step. I'd be for raising the minimum -B to a
couple hundred. I'm not sure if we should continue to enforce any
minimum -B-to-N ratio, but if we do, let's make sure that it's measured
without counting the autovac processes, so as to keep the error message
simple.

I think at the time we set the current minimum -B we were still
intending that you could run in a half meg or so SHMMAX allocation.
That's certainly history. Maybe we should target 2 meg as the rock
bottom minimum?

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2008-02-17 17:53:50 Re: [PATCH] Don't bail with legitimate -N/-B options
Previous Message Magnus Hagander 2008-02-16 21:33:32 Re: [PATCH] Don't bail with legitimate -N/-B options