Re: pg_filedump 9.3: checksums (and a few other fixes)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_filedump 9.3: checksums (and a few other fixes)
Дата
Msg-id 21587.1371168578@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pg_filedump 9.3: checksums (and a few other fixes)  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: pg_filedump 9.3: checksums (and a few other fixes)
Re: pg_filedump 9.3: checksums (and a few other fixes)
Список pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> The patch is a bit ugly: I had to copy some code, and copy the entire
> checksum.c file (minus some Asserts, which don't work in an external
> program). Suggestions welcome.

What I propose we do about this is reduce backend/storage/page/checksum.c
to something like

#include "postgres.h"
#include "storage/checksum.h"
#include "storage/checksum_impl.h"

moving all the code currently in the file into a new .h file.  Then,
any external programs such as pg_filedump can use the checksum code
by including checksum_impl.h.  This is essentially the same thing we
did with the CRC support functionality some time ago.

Also, we have the cut-point between checksum.c and bufpage.c at the
wrong place.  IMO we should move PageCalcChecksum16 in toto into
checksum.c (or really now into checksum_impl.h), because that and not
just checksum_block() is the functionality that is wanted.
        regards, tom lane



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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: postgres user with automate rsync and private/public key pairs
Следующее
От: Tom Lane
Дата:
Сообщение: Branching for 9.4