Re: Deleting bytea, autovacuum, and 8.2/8.4 differences

Поиск
Список
Период
Сортировка
От Greg Smith
Тема Re: Deleting bytea, autovacuum, and 8.2/8.4 differences
Дата
Msg-id 4B9E4762.7060703@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Deleting bytea, autovacuum, and 8.2/8.4 differences  (VJK <vjkmail@gmail.com>)
Ответы Re: Deleting bytea, autovacuum, and 8.2/8.4 differences  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Deleting bytea, autovacuum, and 8.2/8.4 differences  (VJK <vjkmail@gmail.com>)
Список pgsql-performance
VJK wrote:
> Since Pg does not use the concept of rollback segments,  it is unclear
> why deletion produces so much disk IO (4GB).

With PostgreSQL's write-ahead log, MVCC and related commit log, and
transactional DDL features, there's actually even more overhead that can
be involved than a simple rollback segment design when you delete things:

http://www.postgresql.org/docs/current/static/wal.html
http://www.postgresql.org/docs/current/static/mvcc-intro.html
http://wiki.postgresql.org/wiki/Hint_Bits
http://wiki.postgresql.org/wiki/Transactional_DDL_in_PostgreSQL:_A_Competitive_Analysis

One fun thing to try here is to increase shared_buffers and
checkpoint_segments, then see if the total number of writes go down.
The defaults for both are really low, which makes buffer page writes
that might otherwise get combined as local memory changes instead get
pushed constantly to disk.

--
Greg Smith  2ndQuadrant US  Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com   www.2ndQuadrant.us


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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Deleting bytea, autovacuum, and 8.2/8.4 differences
Следующее
От: VJK
Дата:
Сообщение: Re: Deleting bytea, autovacuum, and 8.2/8.4 differences