小编nwa*_*lke的帖子

向表中添加新的空列导致锁定

昨天我们在我们的生产数据库上运行了一个我们认为是安全的模式迁移,但遇到了一个问题。似乎添加新列会导致锁定,我们的应用程序无法再访问该表。以下是迁移前对表的说明:

                                                                    Table "public.facilities"
              Column               |            Type             |                        Modifiers                        | Storage  | Stats target | Description
-----------------------------------+-----------------------------+---------------------------------------------------------+----------+--------------+-------------
 id                                | integer                     | not null default nextval('facilities_id_seq'::regclass) | plain    |              |
 name                              | character varying(255)      |                                                         | extended |              |
 phone                             | character varying(255)      |                                                         | extended |              |
 time_zone                         | character varying(255)      |                                                         | extended |              |
 company_id                        | integer                     |                                                         | plain    |              |
 created_at                        | timestamp without time zone |                                                         | plain    |              |
 updated_at                        | timestamp without time zone …
Run Code Online (Sandbox Code Playgroud)

postgresql postgresql-9.3

7
推荐指数
1
解决办法
4504
查看次数

标签 统计

postgresql ×1

postgresql-9.3 ×1