Обсуждение: [COMMITTERS] pgsql: Rename "pg_clog" directory to "pg_xact".

Поиск
Список
Период
Сортировка

[COMMITTERS] pgsql: Rename "pg_clog" directory to "pg_xact".

От
Robert Haas
Дата:
Rename "pg_clog" directory to "pg_xact".

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

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/88e66d193fbaf756b3cc9bf94cad116aacbb355b

Modified Files
--------------
doc/src/sgml/backup.sgml               |  4 ++--
doc/src/sgml/catalogs.sgml             |  4 ++--
doc/src/sgml/config.sgml               |  2 +-
doc/src/sgml/func.sgml                 |  2 +-
doc/src/sgml/maintenance.sgml          |  8 ++++----
doc/src/sgml/ref/pg_resetwal.sgml      |  4 ++--
doc/src/sgml/ref/pg_rewind.sgml        |  2 +-
doc/src/sgml/storage.sgml              | 10 +++++-----
doc/src/sgml/wal.sgml                  |  2 +-
src/backend/access/heap/heapam.c       |  4 ++--
src/backend/access/transam/README      | 10 +++++-----
src/backend/access/transam/clog.c      |  2 +-
src/backend/access/transam/commit_ts.c |  2 +-
src/backend/access/transam/multixact.c |  2 +-
src/backend/access/transam/subtrans.c  |  5 ++---
src/backend/access/transam/transam.c   |  2 +-
src/backend/access/transam/twophase.c  |  4 ++--
src/backend/access/transam/xact.c      | 18 +++++++++---------
src/backend/access/transam/xlog.c      |  2 +-
src/backend/commands/vacuum.c          | 10 +++++-----
src/backend/postmaster/autovacuum.c    |  2 +-
src/backend/storage/buffer/README      |  2 +-
src/backend/storage/ipc/procarray.c    |  4 ++--
src/backend/utils/time/tqual.c         |  6 +++---
src/bin/initdb/initdb.c                |  2 +-
src/bin/pg_upgrade/exec.c              |  8 +++++++-
src/bin/pg_upgrade/pg_upgrade.c        | 30 ++++++++++++++++++------------
src/include/access/slru.h              |  4 ++--
28 files changed, 84 insertions(+), 73 deletions(-)


Re: [COMMITTERS] pgsql: Rename "pg_clog" directory to "pg_xact".

От
Tom Lane
Дата:
Robert Haas <rhaas@postgresql.org> writes:
> Rename "pg_clog" directory to "pg_xact".

There should probably have been a catversion bump in here.

            regards, tom lane


Re: [COMMITTERS] pgsql: Rename "pg_clog" directory to "pg_xact".

От
Robert Haas
Дата:
On Fri, Mar 17, 2017 at 10:04 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <rhaas@postgresql.org> writes:
>> Rename "pg_clog" directory to "pg_xact".
>
> There should probably have been a catversion bump in here.

I thought about it, but:

[rhaas pgsql]$ git show --stat
88e66d193fbaf756b3cc9bf94cad116aacbb355b src/include/catalog/
[rhaas pgsql]$

The comments in catversion.h say this:

 * The catalog version number is used to flag incompatible changes in
 * the PostgreSQL system catalogs.  Whenever anyone changes the format of
 * a system catalog relation, or adds, deletes, or modifies standard
 * catalog entries in such a way that an updated backend wouldn't work
 * with an old database (or vice versa), the catalog version number
 * should be changed.

This commit did none of those things.

I see your point, of course, I'm just explaining why I didn't do it.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [COMMITTERS] pgsql: Rename "pg_clog" directory to "pg_xact".

От
Tom Lane
Дата:
Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, Mar 17, 2017 at 10:04 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> There should probably have been a catversion bump in here.

> I thought about it, but:

>  * The catalog version number is used to flag incompatible changes in
>  * the PostgreSQL system catalogs.  Whenever anyone changes the format of
>  * a system catalog relation, or adds, deletes, or modifies standard
>  * catalog entries in such a way that an updated backend wouldn't work
>  * with an old database (or vice versa), the catalog version number
>  * should be changed.

I think the key part of that is "an updated backend wouldn't work
with an old database (or vice versa)", which is certainly true of
this commit.  In general, there ought to be a version bump somewhere
anytime that a developer would have to re-initdb or pg_upgrade.
In some cases you can bump the WAL page version or something else
that's more specific to the change, but catversion is the fallback
solution otherwise.

> I see your point, of course, I'm just explaining why I didn't do it.

Understood, but I think you're wrong.

            regards, tom lane