Re: The plan for FDW-based sharding

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: The plan for FDW-based sharding
Дата
Msg-id CA+TgmoZAteL4noLvSMmSZpnd9BPWM1SRM6=gPSKZ9xpcbqMYJw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: The plan for FDW-based sharding  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Список pgsql-hackers
On Tue, Mar 1, 2016 at 12:07 PM, Konstantin Knizhnik
<k.knizhnik@postgrespro.ru> wrote:
> In the article them used anotion "wait":
>
> if T.SnapshotTime>GetClockTime()
> then wait until T.SnapshotTime<GetClockTime()
>
> Originally we really do sleep here, but then we think that instead of
> sleeping we can just adjust local time.
> Sorry, I do not have format prove it is equivalent but... at least we have
> not encountered any inconsistencies after this fix and performance is
> improved.

I think that those things are probably not equivalent.  They would be
if you could cause the adjustment to advance in lock-step on every
node at the same time, but you probably can't.  And I think it is
extremely unwise to assume that the fact that nothing obviously broke
means that you got it right.  This is the sort of work where formal
proofs of correctness are, IMHO, extremely wise.

> I fear that building a DTM that is fully reliable and also
> well-performing is going to be really hard, and I think it would be
> far better to have one such DTM that is 100% reliable than two or more
> implementations each of which are 99% reliable.
>
> The question is not about it's reliability, but mostly about its
> functionality and flexibility.

Well, *my* concern is about reliability.  A lot of code can be made
faster at the price of less reliability, but that usually doesn't work
out well in the end.  Performance matters too, of course, but the way
to get there is to start with a good algorithm, write reliable code to
implement it, and then optimize.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: The plan for FDW-based sharding
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: The plan for FDW-based sharding