PostgreSQL10 :Incompatible Changes

PostgreSQL10 的 Incompatible changes 文档中有详细描述,以下列举主要 Incompatible changes,这些 Incompatible change 会影响到日常的数据库维护工作,需要注意:

  • 1、Change the default log directory from pg_log to log (Andreas Karlsson)
    log_directory (string) 参数默认值由 pg_log 调整成 log。

  • 2、Rename pg_xlog to pg_wal (Michael Paquier)
    This prevents the write-ahead log directory from being confused as containing server activity logs, and erroneously truncated.
    $PGDATA 目录下的 pg_xlog 目录调整成 pg_wal, pg_wal 目录用来存放 WAL 日志。

  • 3、Rename SQL functions, tools, and options that reference “xlog” to “wal” (Robert Haas)
    For example, pg_switch_xlog() becomes pg_switch_wal(), pg_receivexlog becomes pg_receivewal,and pg_basebackup –xlog-method becomes –wal-method
    xlog 相关函数调整成 WAL,上面举了几个例子,例如 pg_switch_xlog() 调整成 pg_switch_wal(), pg_switch_xlog() 调整成 pg_switch_wal(), pg_basebackup 的–xlog-method 选项调整成 –wal-method。

  • 4、Rename WAL-related functions and views to use lsn instead of location
    WAL 相关的函数或视图的 location 调整成了 LSN, 例如pg_current_xlog_location 调整成 pg_current_wal_lsn, pg_current_xlog_insert_location 调整成 pg_current_wal_insert_lsn,pg_xlog_location_diff 调整成了 pg_wal_lsn_diff。

  • 5、Rename transaction status directory pg_clog directory to pg_xact (Michael Paquier)
    transaction 状态目录 pg_clog 调整成 pg_xact。

  • 6、Add GUCs min_parallel_table_scan_size and min_parallel_index_scan_size to control parallel operation (Amit Kapila, Robert Haas)
    This replaces min_parallel_relation_size, which was too generic.
    min_parallel_relation_size 参数被 min_parallel_table_scan_size 和 min_parallel_index_scan_size 替换。

  • 7、Have pg_basebackup stream the WAL needed to restore the backup by default (Magnus Hagander)
    This changes the pg_basebackup -X/–xlog-method default to stream. An option value none has been added to recreate the old behavior. The pg_basebackup option -x has been removed (use -X fetch).
    a)pg_basebackup -X 选项默认值调整成 stream;b) -X 选项增加 none 参数;c) 不再支持 -x 参数。

  • 8、Make all pg_ctl actions wait by default for completion (Peter Eisentraut)
    Previously some pg_ctl actions didn not wait for completion, and required the use of -w to do so.
    pg_ctl 所有操作默认为 wait,pg_ctl 会等待命令执行完成后再退出。

  • 9、Remove the ability to store unencrypted passwords on the server (Heikki Linnakangas)
    The server-side variable password_encryption no longer supports off or plain. The UNENCRYPTED option is no longer supported for CREATE/ALTER USER … PASSSWORD. Similarly, the –unencrypted has been removed from createuser. The default for password_encryption is still md5, and users migrating passwords from older systems will have them stored encrypted by default in this release.
    CREATE/ALTER USER/createuser 不再支持非加密的密码。

  • 10、pg_upgrade-ed hash indexes from previous major Postgres versions must be rebuilt.
    Major hash storage improvements necessitated this requirement.
    使用 pg_upgrade 升级 PostgreSQL 大版本后 Hash Index 需重建。

  • 11、Remove pg_dump/pg_dumpall support for dumping from pre-8.0 servers (Tom Lane)
    Users needing dump support for pre-8.0 servers need to use dump binaries from Postgres 9.6.
    不支持 pg_dump/pg_dumpall 程序导出 8.0 版本之前的 PostgreSQL 库。

  • 12、Remove createlang and droplang command-line applications (Peter Eisentraut)
    不再支持 createlang、droplang 操作系统命令。

最后推荐和张文升共同编写的《PostgreSQL实战》,本书基于PostgreSQL 10 编写,共18章,重点介绍SQL高级特性、并行查询、分区表、物理复制、逻辑复制、备份恢复、高可用、性能优化、PostGIS等,涵盖大量实战用例!

购买链接:https://item.jd.com/12405774.html

PostgreSQL实战
感谢支持!
0%