Re: Replication/cloning: rsync vs modification dates?

Поиск
Список
Период
Сортировка
От Steven Schlansker
Тема Re: Replication/cloning: rsync vs modification dates?
Дата
Msg-id F10F54D2-AEA3-4C80-B86C-3A7CFE49B356@likeness.com
обсуждение исходный текст
Ответ на Re: Replication/cloning: rsync vs modification dates?  (Chris Angelico <rosuav@gmail.com>)
Ответы Re: Replication/cloning: rsync vs modification dates?  (Michael Nolan <htfoot@gmail.com>)
Список pgsql-general
I think it's pretty easy to show that timestamp+size isn't good enough to do this 100% reliably.

Imagine that your timestamps have a millisecond resolution.  I assume this will vary based on OS / filesystem, but the
pointremains the same no matter what size it is. 

You can have multiple writes occur in the same quantized "instant".

If the prior rsync just happened to catch the first write (at T+0.1ms) in that instant but not the second (which
happenedat T+0.4ms), the second may not be transferred.  But the modification time is the same for the two writes. 

All that said, I think the chances of this actually happening is vanishingly small.  I personally use rsync without
checksumsand have had no problems. 

On Jul 16, 2012, at 2:42 PM, Chris Angelico wrote:

> On Tue, Jul 17, 2012 at 4:35 AM, Sergey Konoplev
> <sergey.konoplev@postgresql-consulting.com> wrote:
>> On Mon, Jul 16, 2012 at 8:01 PM, Chris Angelico <rosuav@gmail.com> wrote:
>>> On Tue, Jul 17, 2012 at 1:58 AM, Michael Nolan <htfoot@gmail.com> wrote:
>>>> As I understand the docs for rsync, it will use both mod time and file size
>>>> if told not to do checksums.
>>
>> I wonder if it is correct in general to use mtime and size to perform
>> these checks from the point of view of PostgreSQL.
>>
>> If it works with the current version then is there a guaranty that it
>> will work with the future versions?
>
> That was my exact question. Ideally, I'd like to hear from someone who
> works with the Postgres internals, but the question may not even be
> possible to answer.
>
> ChrisA
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general


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

Предыдущее
От: Chris Angelico
Дата:
Сообщение: Re: Replication/cloning: rsync vs modification dates?
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Replication/cloning: rsync vs modification dates?