Re: pg_restore dependencies

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_restore dependencies
Дата
Msg-id 3796.1239407418@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_restore dependencies  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Tom Lane wrote:
>> ...  Seems like it's nearly a one-liner fix, too.

> Well, what I have in mind is a bit bigger, but not large. See attached 
> patch.

Hmm, you do need two instances of the loop, don't you?  Might be
better to refactor along the lines of
if (has_lock_conflicts(te, running_te) ||    has_lock_conflicts(running_te, te))    // has a conflict

...

// true if te1 requires exclusive lock on any dependency of te2
static bool
has_lock_conflicts(te1, te2)
{for (j = 0; j < te1->nLockDeps; j++){    for (k = 0; k < te2->nDeps; k++)    {        if (te1->lockDeps[j] ==
te2->dependencies[k])           return true;    }}return false;
 
}
        regards, tom lane


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

Предыдущее
От: "Dann Corbit"
Дата:
Сообщение: Re: Windows installation service
Следующее
От: Abhijit Menon-Sen
Дата:
Сообщение: Allow COMMENT ON to accept an expression rather than just a string