Re: pg_dump: sortDumpableObjectsByTypeName() doesn't always do that

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_dump: sortDumpableObjectsByTypeName() doesn't always do that
Дата
Msg-id 1998.1533584749@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_dump: sortDumpableObjectsByTypeName() doesn't always do that  (Jacob Champion <pchampion@pivotal.io>)
Ответы Re: pg_dump: sortDumpableObjectsByTypeName() doesn't always do that
Список pgsql-hackers
Jacob Champion <pchampion@pivotal.io> writes:
> ... since the
> root cause is that we're not defining a valid ordering, quicksort may
> or may not behave consistently for test purposes.

Ah, gotcha.  But whether the behavior is sane or not, it'd be reproducible
for any specific input dataset on any specific platform (unless you've got
a quicksort that actually uses randomized pivots; but ours doesn't, and
I think that pg_dump does use src/port/qsort.c).  So that partially
answers Andrew's question as to why we've not seen instability in the
buildfarm's results.

It also seems entirely possible that we simply don't have any cases in the
existing test data that provoke the indeterminate behavior --- to judge by
your concrete example, it might take specifically-chosen object names to
get into a situation where the comparator delivers inconsistent results.

            regards, tom lane


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

Предыдущее
От: Jacob Champion
Дата:
Сообщение: Re: pg_dump: sortDumpableObjectsByTypeName() doesn't always do that
Следующее
От: Jacob Champion
Дата:
Сообщение: Re: pg_dump: sortDumpableObjectsByTypeName() doesn't always do that