[HACKERS] SET NOT NULL [NOT VALID / CONCURRENTLY]?

Поиск
Список
Период
Сортировка
От Joel Jacobson
Тема [HACKERS] SET NOT NULL [NOT VALID / CONCURRENTLY]?
Дата
Msg-id CAASwCXcOokBqHf8BXECbDgOLkXxJyL_Q_twhg2dGWSvgMzz=xA@mail.gmail.com
обсуждение исходный текст
Ответы Re: [HACKERS] SET NOT NULL [NOT VALID / CONCURRENTLY]?  (Craig Ringer <craig@2ndquadrant.com>)
Список pgsql-hackers
Hi hackers,

I would be good if it would be possible to quickly set NOT NULL for an
existing column in a table
that have no rows where the column IS NULL and where there is a full
index on the column
allowing the logics to quickly understand there are no NULL values,
and just have to take a quick
lock on the table to prevent any modifications during the short time
when the NOT NULL
is set for the column.

Currently if you want to set NOT NULL for a column in a huge table
that's not doable without blocking all writes to the table for quite
some time.
Setting NOT NULL for a 100 million row table took 28 seconds locally
on my machine.

Is anyone working on fixing this for PostgreSQL 10?

Joel Jacobson
Trustly



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

Предыдущее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: [HACKERS] Creating a DSA area to provide work space forparallel execution
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: [HACKERS] SET NOT NULL [NOT VALID / CONCURRENTLY]?