Re: Should new partitions inherit their tablespace from their parent?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Should new partitions inherit their tablespace from their parent?
Дата
Msg-id 20181217192118.yjhitort6eqebskb@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Should new partitions inherit their tablespace from their parent?  (David Rowley <david.rowley@2ndquadrant.com>)
Ответы Re: Should new partitions inherit their tablespace from their parent?  (David Rowley <david.rowley@2ndquadrant.com>)
Список pgsql-hackers
On 2018-Dec-18, David Rowley wrote:

> 1. Shouldn't you be using the RangeVarGetRelid() macro instead of
> calling RangeVarGetRelidExtended()?

This should have been obvious but I didn't notice.

> 2. In MergeAttributes(), the parentOids list still exists and is
> populated.  This is now only used to determine if the "supers" list
> contains any duplicate Oids. Maybe it's better to rename that list to
> something like "seenOids" to avoid any confusion with the "supers"
> list. Or maybe it's worth thinking of a better way to detect duplicate
> items in the "supers" list.

Good catch.

What I did was move the duplicate detection to the loop doing
RangeVarGetRelid, and remove parentOids from MergeAttributes.

Pushed with those changes.  Thanks for the patch!

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


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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Referential Integrity Checks with Statement-level Triggers
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ALTER INDEX ... ALTER COLUMN not present in dump