Re: BufFileWrite across MAX_PHYSICAL_FILESIZE boundary

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: BufFileWrite across MAX_PHYSICAL_FILESIZE boundary
Дата
Msg-id 200705171324.l4HDO7412086@momjian.us
обсуждение исходный текст
Ответ на Re: BufFileWrite across MAX_PHYSICAL_FILESIZE boundary  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Alvaro Herrera wrote:
> Bruce Momjian wrote:
> > 
> > This has been saved for the 8.4 release:
> > 
> >     http://momjian.postgresql.org/cgi-bin/pgpatches_hold
> 
> Huh, no, this is a bug and should be fixed right away.

OK, moved to the 8.3 patch queue.

---------------------------------------------------------------------------


> 
> > ---------------------------------------------------------------------------
> > 
> > Tom Lane wrote:
> > > "Kurt Harriman" <kharriman@greenplum.com> writes:
> > > > Just noticed buffile.c:292 doesn't look quite right where
> > > > BufFileDumpBuffer calls FileWrite:
> > > >      bytestowrite = FileWrite(thisfile, file->buffer, bytestowrite);
> > > > It looks as though it would write the same data each time the
> > > > loop is iterated.  Would this be better?
> > > >      bytestowrite = FileWrite(thisfile, file->buffer + wpos, bytestowrite);
> > > 
> > > Yeah, I think you're right.  We've probably not seen this because in
> > > most usages the buffer is always block-aligned, but it looks possible
> > > for tuplestore.c to get out of alignment if its concurrent write/read
> > > feature is exercised just so.  Do you want to try demonstrating the bug
> > > with a smaller-than-normal setting of MAX_PHYSICAL_FILESIZE?
> 
> 
> -- 
> Alvaro Herrera                                http://www.CommandPrompt.com/
> The PostgreSQL Company - Command Prompt, Inc.

--  Bruce Momjian  <bruce@momjian.us>          http://momjian.us EnterpriseDB
http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Lack of urgency in 8.3 reviewing
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Planning large IN lists