Re: [REVIEW] Re: Compression of full-page-writes

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [REVIEW] Re: Compression of full-page-writes
Дата
Msg-id 20141125134848.GD1639@alvin.alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: [REVIEW] Re: Compression of full-page-writes  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: [REVIEW] Re: Compression of full-page-writes  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
Michael Paquier wrote:

> Exposing compression and decompression APIs of pglz makes possible its
> use by extensions and contrib modules. pglz_decompress contained a call
> to elog to emit an error message in case of corrupted data. This function
> is changed to return a boolean status to let its callers return an error
> instead.

I think pglz_compress belongs into src/common instead.  It
seems way too high-level for src/port.

Isn't a simple boolean return value too simple-minded?  Maybe an enum
would be more future-proof, as later you might want to add more values,
say distinguish between different forms of corruption, or fail due to
out of memory, whatever.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Alex Shulgin
Дата:
Сообщение: Re: Missing OOM checks in libpq (was Re: Replication connection URI?)
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Add shutdown_at_recovery_target option to recovery.conf