PostgreSQL 10.0 preview 变化 - pg_xlog,pg_clog,pg_log目录更名为pg_wal,pg_xact,log

PostgreSQL 10.0 对部分目录进行了更名,包括将 pg_xlog 更名为 pg_wal,以避免用户误解这些目录内容的重要性。此外,还更改了默认的日志目录。

标签

PostgreSQL , 10.0 , pg_xact , pg_wal , log , pg_clog , pg_xlog , pg_log


背景

10.0 把几个有一定“歧义”的目录更名了。它们分别为

pg_xlog, pg_clog, pg_log

更名为

pg_wal, pg_xact, log

分别对应WAL(write ahead log)日志,事务状态日志,日志。

省得有人误删其中的LOG目录中的文件。(还真有发生过)。

坏处是,如果有对应的程序用到了这几个目录名的,需要修改一下。

对应patch

Rename "pg_xlog" directory to "pg_wal".  
  
author	Robert Haas <rhaas@postgresql.org>	  
Thu, 20 Oct 2016 23:24:37 +0800 (11:24 -0400)  
committer	Robert Haas <rhaas@postgresql.org>	  
Thu, 20 Oct 2016 23:32:18 +0800 (11:32 -0400)  
"xlog" is not a particularly clear abbreviation for "write-ahead log",  
and it sometimes confuses users into believe that the contents of the  
"pg_xlog" directory are not critical data, leading to unpleasant  
consequences.  So, rename the directory to "pg_wal".  
  
This patch modifies pg_upgrade and pg_basebackup to understand both  
the old and new directory layouts; the former is necessary given the  
purpose of the tool, while the latter merely avoids an unnecessary  
backward-compatibility break.  
  
We may wish to consider renaming other programs, switches, and  
functions which still use the old "xlog" naming to also refer to  
"wal".  However, that's still under discussion, so let's do just this  
much for now.  
  
Discussion: CAB7nPqTeC-8+zux8_-4ZD46V7YPwooeFxgndfsq5Rg8ibLVm1A@mail.gmail.com  
  
Michael Paquier  
Rename "pg_clog" directory to "pg_xact".  
  
author	Robert Haas <rhaas@postgresql.org>	  
Fri, 17 Mar 2017 21:46:58 +0800 (09:46 -0400)  
committer	Robert Haas <rhaas@postgresql.org>	  
Fri, 17 Mar 2017 21:48:38 +0800 (09:48 -0400)  
Names containing the letters "log" sometimes confuse users into  
believing that only non-critical data is present.  It is hoped  
this renaming will discourage ill-considered removals of transaction  
status data.  
  
Michael Paquier  
  
Discussion: http://postgr.es/m/CA+Tgmoa9xFQyjRZupbdEFuwUerFTvC6HjZq1ud6GYragGDFFgA@mail.gmail.com  
Change default of log_directory to 'log'  
  
author	Peter Eisentraut <peter_e@gmx.net>	  
Mon, 27 Mar 2017 22:34:33 +0800 (10:34 -0400)  
committer	Peter Eisentraut <peter_e@gmx.net>	  
Mon, 27 Mar 2017 22:34:33 +0800 (10:34 -0400)  
The previous default 'pg_log' might have indicated by its "pg_" prefix  
that it is an internal system directory.  The new default is more in  
line with the typical naming of directories with user-facing log files.  
Together with the renaming of pg_clog and pg_xlog, this should clear up  
that difference.  
  
Author: Andreas Karlsson <andreas@proxel.se>  

这个patch的讨论,详见邮件组,本文末尾URL。

PostgreSQL社区的作风非常严谨,一个patch可能在邮件组中讨论几个月甚至几年,根据大家的意见反复的修正,patch合并到master已经非常成熟,所以PostgreSQL的稳定性也是远近闻名的。

参考

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=f82ec32ac30ae7e3ec7c84067192535b2ff8ec0e

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=88e66d193fbaf756b3cc9bf94cad116aacbb355b

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=3371e4d9b12455fe1f8d1516d0bd915aab86be17

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值