Re: cataloguing NOT NULL constraints

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: cataloguing NOT NULL constraints
Дата
Msg-id 202404151320.uqfxlcnl4zrp@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: cataloguing NOT NULL constraints  (jian he <jian.universality@gmail.com>)
Список pgsql-hackers
(I think I had already argued this point, but I don't see it in the
archives, so here it is again).

On 2024-Feb-07, jian he wrote:

> if you place CommandCounterIncrement inside the `if (recurse)` branch,
> then the regression test will be ok.

Yeah, but don't you think this is too magical?  I mean, randomly added
CCIs in the execution path for other reasons would break this.  Worse --
how can we _ensure_ that no CCIs occur at all?  I mean, it's possible
that an especially crafted multi-subcommand ALTER TABLE could contain
just the right CCI to break things in the opposite way.  The difference
in behavior would be difficult to justify.  (For good or ill, ALTER
TABLE ATTACH PARTITION cannot run in a multi-subcommand ALTER TABLE, so
this concern might be misplaced.  Still, more certainty seems better
than less.)

I've pushed both these patches now, adding what seemed a reasonable set
of test cases.  If there still are cases behaving in unexpected ways,
please let me know.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"La espina, desde que nace, ya pincha" (Proverbio africano)



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: promotion related handling in pg_sync_replication_slots()
Следующее
От: Justin Pryzby
Дата:
Сообщение: Re: allow changing autovacuum_max_workers without restarting