Re: BDR - DDL Locking

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: BDR - DDL Locking
Дата
Msg-id CAMsr+YHkNXwTrC-fe-t7Z2cM1mp1Zvpz23TUDMYQx84w8=eMdg@mail.gmail.com
обсуждение исходный текст
Ответ на BDR - DDL Locking  (Will McCormick <wmccormick@gmail.com>)
Список pgsql-general
Will,

I saw after replying that there's more detail I missed in your mail,
so please see the more detailed reply inline below.

On 20 October 2015 at 23:31, Will McCormick <wmccormick@gmail.com> wrote:
> First time user here and new to PostgreSQL and BDR so I hope I have the
> right place.

You do.

> I attempted to issues a TRUNCATE TABLE without the cascade option on a
> Parent table that had a child FK constraint.

I've looked at your logs, and it looks like the TRUNCATE suceeded on
the node that was doing the DDL and it was queued for replication.
Then, when applying to another node, it failed because there was a
foreign key relationship referencing the target table.

This is odd, because the way BDR captures TRUNCATEs should prevent
that from happening. It uses triggers to capture TRUNCATES and
enqueues them for execution. However, I can see upon inspection that
the approach used just isn't sufficient to handle FK relationships,
and that the current test suite doesn't cover this.

I'm going to write a test to confirm what I think is going on, then follow up.


--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


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

Предыдущее
От: Will McCormick
Дата:
Сообщение: Re: BDR - DDL Locking
Следующее
От: Kevin Grittner
Дата:
Сообщение: Re: Multiple word synonyms (maybe?)