Re: [PATCHES] COPY with no WAL, in certain circumstances

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: [PATCHES] COPY with no WAL, in certain circumstances
Дата
Msg-id 1168158497.3951.28.camel@silverbirch.site
обсуждение исходный текст
Ответ на Re: [PATCHES] COPY with no WAL, in certain circumstances  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sat, 2007-01-06 at 21:32 -0500, Tom Lane wrote:
> Robert Treat <xzilla@users.sourceforge.net> writes:
> > On Saturday 06 January 2007 16:36, Simon Riggs wrote:
> > <snip>
> >> BEGIN;
> >> CREATE TABLE foo...
> >> INSERT INTO foo    --uses WAL
> >> COPY foo..    --no WAL
> >> INSERT INTO foo    --uses WAL
> >> COPY foo..    --no WAL
> >> INSERT INTO foo    --uses WAL
> >> COPY foo...    --no WAL
> >> COMMIT;
>
> > Is there some technical reason that the INSERT statements need to use WAL in
> > these scenarios?
>
> First, there's enough other overhead to an INSERT that you'd not save
> much percentagewise.  Second, not using WAL doesn't come for free: the
> cost is having to fsync the whole table afterwards.  So it really only
> makes sense for commands that one can expect are writing pretty much
> all of the table.  I could easily see it being a net loss for individual
> INSERTs.

Agreed. We agreed that before, on the original design thread.

--
  Simon Riggs
  EnterpriseDB   http://www.enterprisedb.com



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

Предыдущее
От: "Simon Riggs"
Дата:
Сообщение: Re: Mark/Restore and avoiding RandomAccess sorts
Следующее
От: "Simon Riggs"
Дата:
Сообщение: Re: [PATCHES] COPY with no WAL, in certain circumstances