开发者社区> 问答> 正文

pg有没有alter session set ddl_lock_timeout=xxx这种操作?

就是能否online ddl,另外大表加字段效率如何?

(整理来自PostgreSQL技术进阶群)

展开
收起
ImSoo 2018-10-31 09:13:46 2756 0
2 条回答
写回答
取消 提交回答
  • 前一个帐号wangccsy@126.com不知道怎么的就成了企业帐号,改不成个人。所以重新注册了一个个人帐号。老程序员。精通JAVA,C#,数据库,对软件开发过程和流程熟悉。考取系统分析师,项目管理师和系统架构设计师等软件资格考试认证。愿意和大家一起前进。

    name | setting | unit | category | short_desc | extra_desc | context | vartype | source | min_val | max_val | enumvals | boot_val | reset_val | sourcefile | sourceline | pending_restart -------------------------------------+---------+------+--------------------------------------------------------------+-------------------------------------------------------------------------------------------+-------------------------------------+-----------+---------+---------+---------+------------+----------+----------+-----------+------------+------------+----------------- archive_timeout | 0 | s | Write-Ahead Log / Archiving | Forces a switch to the next WAL file if a new file has not been started within N seconds. | | sighup | integer | default | 0 | 1073741823 | | 0 | 0 | | | f authentication_timeout | 60 | s | Connections and Authentication / Security and Authentication | Sets the maximum allowed time to complete client authentication. | | sighup | integer | default | 1 | 600 | | 60 | 60 | | | f checkpoint_timeout | 300 | s | Write-Ahead Log / Checkpoints | Sets the maximum time between automatic WAL checkpoints. | | sighup | integer | default | 30 | 86400 | | 300 | 300 | | | f deadlock_timeout | 1000 | ms | Lock Management | Sets the time to wait on a lock before checking for deadlock. | | superuser | integer | default | 1 | 2147483647 | | 1000 | 1000 | | | f idle_in_transaction_session_timeout | 0 | ms | Client Connection Defaults / Statement Behavior | Sets the maximum allowed duration of any idling transaction. | A value of 0 turns off the timeout. | user | integer | default | 0 | 2147483647 | | 0 | 0 | | | f lock_timeout | 0 | ms | Client Connection Defaults / Statement Behavior | Sets the maximum allowed duration of any wait for a lock. | A value of 0 turns off the timeout. | user | integer | default | 0 | 2147483647 | | 0 | 0 | | | f statement_timeout | 0 | ms | Client Connection Defaults / Statement Behavior | Sets the maximum allowed duration of any statement. | A value of 0 turns off the timeout. | user | integer | default | 0 | 2147483647 | | 0 | 0 | | | f wal_receiver_timeout | 60000 | ms | Replication / Standby Servers | Sets the maximum wait time to receive data from the primary. | | sighup | integer | default | 0 | 2147483647 | | 60000 | 60000 | | | f wal_sender_timeout | 60000 | ms | Replication / Sending Servers

    2019-07-17 23:11:30
    赞同 1 展开评论 打赏
  • 使用alter system set 或者 set xxx=xxx;
    保证排他锁不冲突,大表加字段是很快的

    2019-07-17 23:11:30
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Spark SQL: Past, Present and Future 立即下载
Spark SQL:Past Present &Future 立即下载
低代码开发师(初级)实战教程 立即下载