Re: directory archive format for pg_dump

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: directory archive format for pg_dump
Дата
Msg-id 4CEA9F29.5060106@enterprisedb.com
обсуждение исходный текст
Ответ на Re: directory archive format for pg_dump  (Joachim Wieland <joe@mcknight.de>)
Ответы Re: directory archive format for pg_dump  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 20.11.2010 06:10, Joachim Wieland wrote:
> 2010/11/19 José Arthur Benetasso Villanova<jose.arthur@gmail.com>:
>> The md5.c and kwlookup.c reuse using a link doesn't look nice either.
>> This way you need to compile twice, among others things, but I think
>> that its temporary, right?
>
> No, it isn't. md5.c is used in the same way by e.g. libpq and there
> are other examples for links in core, check out src/bin/psql for
> example.

It seems like overkill to include md5 just for hashing the random bytes 
that getRandomData() generates. And if random() doesn't produce unique 
values, it's not going to get better by hashing it. How about using a 
timestamp instead of the hash?

If you don't initialize random() with srandom(), BTW, it will always 
return the same value.

But I'm not actually sure we should be preventing mix & match of files 
from different dumps. It might be very useful to do just that sometimes, 
like restoring a recent backup, with the contents of one table replaced 
with older data. A warning would be ok, though.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Itagaki Takahiro
Дата:
Сообщение: Re: dblink versus long connection strings
Следующее
От: Tom Lane
Дата:
Сообщение: Re: dblink versus long connection strings