Re: Use of rsync for data directory copying

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Use of rsync for data directory copying
Дата
Msg-id 20120710132045.GA31941@momjian.us
обсуждение исходный текст
Ответ на Re: Use of rsync for data directory copying  (David Kerr <dmk@mr-paradox.net>)
Ответы Re: Use of rsync for data directory copying  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
On Mon, Jul  9, 2012 at 08:00:48PM -0700, David Kerr wrote:
> 
> On Jul 9, 2012, at 7:48 PM, Bruce Momjian wrote:
> 
> > Rsync is popular with Postgres users, but I don't understand how they
> > are using the default check mode (file size, modification time) to
> > synchronize shut-down data directories?  It seems they would have to use
> > --checksum because it is too easy for files to change in the same
> > second, and for a backend to write into the middle of a file.
> > 
> > Is everyone who is using rsync with Postgres also using --checksum mode?
> 
> 
> I must be missing something, if they're shut down you can't write to them. =)
> 
> I do use rsync though for resyncing my mirror's, it's been working great so far. I assume
> that the WAL fixes anything that gets goofed up in the copy. (hopefully I've been assuming correctly.)

If two writes happens in the middle of a file in the same second, it
seems one might be missed.  Yes, I suppose the WAL does fix that during
replay, though if both servers were shut down cleanly, WAL would not be
replayed.

If you using it for a hot backup, and WAL would clean that up.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +


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

Предыдущее
От: Markus Wanner
Дата:
Сообщение: BlockNumber initialized to InvalidBuffer?
Следующее
От: Shaun Thomas
Дата:
Сообщение: Re: Synchronous Standalone Master Redoux