pgsql: Rename SLRU structures and associated LWLocks.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Rename SLRU structures and associated LWLocks.
Дата
Msg-id E1jZf4p-0007y4-7o@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Rename SLRU structures and associated LWLocks.

Originally, the names assigned to SLRUs had no purpose other than
being shmem lookup keys, so not a lot of thought went into them.
As of v13, though, we're exposing them in the pg_stat_slru view and
the pg_stat_reset_slru function, so it seems advisable to take a bit
more care.  Rename them to names based on the associated on-disk
storage directories (which fortunately we *did* think about, to some
extent; since those are also visible to DBAs, consistency seems like
a good thing).  Also rename the associated LWLocks, since those names
are likewise user-exposed now as wait event names.

For the most part I only touched symbols used in the respective modules'
SimpleLruInit() calls, not the names of other related objects.  This
renaming could have been taken further, and maybe someday we will do so.
But for now it seems undesirable to change the names of any globally
visible functions or structs, so some inconsistency is unavoidable.

(But I *did* terminate "oldserxid" with prejudice, as I found that
name both unreadable and not descriptive of the SLRU's contents.)

Table 27.12 needs re-alphabetization now, but I'll leave that till
after the other LWLock renamings I have in mind.

Discussion: https://postgr.es/m/28683.1589405363@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5da14938f7bfb96b648ee3c47e7ea2afca5bcc4a

Modified Files
--------------
doc/src/sgml/monitoring.sgml             |  89 +++++++------
src/backend/access/transam/clog.c        | 116 ++++++++---------
src/backend/access/transam/commit_ts.c   |  34 ++---
src/backend/access/transam/multixact.c   |  76 +++++------
src/backend/access/transam/slru.c        |  11 ++
src/backend/access/transam/subtrans.c    |  24 ++--
src/backend/access/transam/varsup.c      |   8 +-
src/backend/commands/async.c             | 116 ++++++++---------
src/backend/postmaster/pgstat.c          |  14 +-
src/backend/replication/basebackup.c     |   2 +-
src/backend/storage/lmgr/lwlock.c        |  28 ++--
src/backend/storage/lmgr/lwlocknames.txt |  18 +--
src/backend/storage/lmgr/predicate.c     | 214 +++++++++++++++----------------
src/backend/utils/adt/xid8funcs.c        |  10 +-
src/bin/pg_rewind/filemap.c              |   2 +-
src/include/access/multixact.h           |   4 +-
src/include/access/transam.h             |   2 +-
src/include/commands/async.h             |   2 +-
src/include/storage/lwlock.h             |  14 +-
src/include/storage/predicate.h          |   4 +-
20 files changed, 406 insertions(+), 382 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Review of the glossary
Следующее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Avoid killing btree items that are already dead