Re: Patch: incorrect array offset in backend replication tar header

Поиск
Список
Период
Сортировка
От Brian Weaver
Тема Re: Patch: incorrect array offset in backend replication tar header
Дата
Msg-id CAAhXZGvEWBT7eTGhYgqq-CD8LcBarL5YeHUXaJ4MHHeJkFikGg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Patch: incorrect array offset in backend replication tar header  (Brian Weaver <cmdrclueless@gmail.com>)
Ответы Re: Patch: incorrect array offset in backend replication tar header  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
OK, here is my attempt at patching and correcting the issue in this
thread. I have done my best to test to ensure that hot standby,
pg_basebackup, and pg_restore of older files work without issues. I
think this might be a larger patch that expected, I took some
liberties of trying to clean up a bit.

For example the block size '512' was scattered throughout the code
regarding the tar block size. I've replace instances of that with a
defined constant TAR_BLOCK_SIZE. I've likewise created other constants
and used them in place of raw numbers in what I hope makes the code a
bit more readable.

I've also used functions like strncpy(), strnlen(), and the like in
place of sprintf() where I could. Also instead of using sscanf() I
used a custom octal conversion routine which has a hard limit on how
many character it will process like strncpy() & strnlen().

I expect comments, hopefully they'll be positive.

-- Brian
--

/* insert witty comment here */

Вложения

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

Предыдущее
От: Brian Weaver
Дата:
Сообщение: Re: Patch: incorrect array offset in backend replication tar header
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Patch: incorrect array offset in backend replication tar header