Re: Foreign keys and partitioned tables

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Foreign keys and partitioned tables
Дата
Msg-id 20180330031953.5j4sspyl6s4rdb62@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Foreign keys and partitioned tables  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: Foreign keys and partitioned tables  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Re: Foreign keys and partitioned tables  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Re: Foreign keys and partitioned tables  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
Here's an updated version.  After wasting some time trying to resolve
"minor last minute issues", I decided to reduce the scope for now: in
the current patch, it's allowed to have foreign keys in partitioned
tables, but it is not possible to have foreign keys that point to
partitioned tables.  I have split out some preliminary changes that
intended to support FKs referencing partitioned tables; I intend to
propose that for early v12, to avoid spending any more time this
commitfest on that.  Yes, I'm pretty disappointed about that.

0001 prohibits having foreign keys pointing to partitioned tables, as
discussed above.

0002 is a fixup for a bug in the row triggers patch: I had a restriction
earlier that triggers declared internal were not cloned, and I seem to
have lost it in rebase.  Reinstate it.

0003 is the matter of interest.  This is essentially the same code I
posted earlier, rebased to the committed row triggers patch, with a few
minor bug fixes and some changes in the regression tests to try and make
them more comprehensive, including leaving a partitioned table with an
FK to test that the whole pg_dump thing works via the pg_upgrade test.
An important change is that when a table containing data is attached as
a partition, the data is verified to satisfy the constraint via the
regular alter table phase 3 code.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

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

Предыдущее
От: "Tsunakawa, Takayuki"
Дата:
Сообщение: RE: Speedup of relation deletes during recovery
Следующее
От: David Steele
Дата:
Сообщение: Re: [PATCH] Verify Checksums during Basebackups