Re: [BUGS] BUG #14691: Isolation failure in deferrable transactionconcurrent with schema change

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: [BUGS] BUG #14691: Isolation failure in deferrable transactionconcurrent with schema change
Дата
Msg-id CAKFQuwZayi_XSjgR+xoB+Sogv51fYrV5vghgwxVTkbY15nS_Tg@mail.gmail.com
обсуждение исходный текст
Ответ на [BUGS] BUG #14691: Isolation failure in deferrable transaction concurrentwith schema change  (cpacejo@clearskydata.com)
Ответы Re: [BUGS] BUG #14691: Isolation failure in deferrable transactionconcurrent with schema change  (Thomas Munro <thomas.munro@enterprisedb.com>)
Re: [BUGS] BUG #14691: Isolation failure in deferrable transactionconcurrent with schema change  (Chris Pacejo <cpacejo@clearskydata.com>)
Список pgsql-bugs
On Mon, Jun 5, 2017 at 12:11 PM, <cpacejo@clearskydata.com> wrote:
The following bug has been logged on the website:

Bug reference:      14691
Logged by:          Chris Pacejo
Email address:      cpacejo@clearskydata.com
PostgreSQL version: 9.5.7
Operating system:   CentOS 7
Description:

Hi, issuing a SERIALIZABLE DEFERRABLE READ ONLY read from a table to which a
column is being added results in an isolation failure.
 
me=> BEGIN; ALTER TABLE foo ADD COLUMN y integer DEFAULT 0;
 
me=> BEGIN; ALTER TABLE foo ADD COLUMN y integer; UPDATE foo SET y = 0;
 
 x | y
---+---
 1 |
 2 |
 3 |
(3 rows)

​This is a documented limitation.


"Some DDL commands, currently only TRUNCATE and the table-rewriting forms of ALTER TABLE, are not MVCC-safe."

The first command is "table-rewriting".

The second ALTER TABLE doesn't rewrite the table but does change its structure - so you get rows but the newly added column is null.  This would seem to be a reasonable behavior.

David J.

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

Предыдущее
От: Chris Pacejo
Дата:
Сообщение: [BUGS] Re: BUG #14691: Isolation failure in deferrable transactionconcurrent with schema change
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: [BUGS] BUG #14691: Isolation failure in deferrable transactionconcurrent with schema change