|From:||Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>|
|To:||Cédric Villemain <cedric(dot)villemain(dot)debian(at)gmail(dot)com>|
|Cc:||Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org|
|Subject:||Re: Re: patch review : Add ability to constrain backend temporary file space|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
On 22/06/11 11:13, Mark Kirkwood wrote:
> On 21/06/11 02:39, Cédric Villemain wrote:
>> 2011/6/20 Robert Haas<robertmhaas(at)gmail(dot)com>:
>>> On Mon, Jun 20, 2011 at 9:15 AM, Cédric Villemain
>>> <cedric(dot)villemain(dot)debian(at)gmail(dot)com> wrote:
>>>> The feature does not work exactly as expected because the write limit
>>>> is rounded per 8kB because we write before checking. I believe if one
>>>> write a file of 1GB in one pass (instead of repetitive 8kB increment),
>>>> and the temp_file_limit is 0, then the server will write the 1GB
>>>> before aborting.
>>> Can we rearrange thing so we check first, and then write?
>> probably but it needs more work to catch corner cases. We may be safe
>> to just document that (and also in the code). The only way I see so
>> far to have a larger value than 8kB here is to have a plugin doing the
>> sort instead of the postgresql core sort algo.
> Thanks guys - will look at moving the check, and adding some
> documentation about the possible impacts of plugins (or new executor
> methods) that might write in chunks bigger than blocksz.
> Maybe a few days - I'm home sick ATM, plus looking after these
This version moves the check *before* we write the new buffer, so
should take care of issues about really large write buffers, plugins
etc. Also I *think* that means there is no need to amend the documentation.
P.s: Hopefully I've got a context diff this time, just realized that git
diff -c does *not* produce a context diff (doh).
|Next Message||HuangQi||2011-06-24 06:35:08||debugging tools inside postgres|
|Previous Message||Jun Ishiduka||2011-06-24 04:41:42||Re: Online base backup from the hot-standby|