pgsql: Add infrastructure for mapping relfilenodes to relation OIDs.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема pgsql: Add infrastructure for mapping relfilenodes to relation OIDs.
Дата
Msg-id E1V1HmS-0005M3-41@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Add infrastructure for mapping relfilenodes to relation OIDs.

Future patches are expected to introduce logical replication that
works by decoding WAL.  WAL contains relfilenodes rather than relation
OIDs, so this infrastructure will be needed to find the relation OID
based on WAL contents.

If logical replication does not make it into this release, we probably
should consider reverting this, since it will add some overhead to DDL
operations that create new relations.  One additional index insert per
pg_class row is not a large overhead, but it's more than zero.
Another way of meeting the needs of logical replication would be to
the relation OID to WAL, but that would burden DML operations, not
only DDL.

Andres Freund, with some changes by me.  Design review, in earlier
versions, by Álvaro Herrera.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/f01d1ae3a104019d6d68aeff85c4816a275130b3

Modified Files
--------------
doc/src/sgml/func.sgml                    |   19 +++
src/backend/utils/adt/dbsize.c            |   28 ++++
src/backend/utils/cache/Makefile          |    3 +-
src/backend/utils/cache/inval.c           |    2 +-
src/backend/utils/cache/relfilenodemap.c  |  247 +++++++++++++++++++++++++++++
src/backend/utils/cache/relmapper.c       |   53 +++++++
src/include/catalog/catversion.h          |    2 +-
src/include/catalog/indexing.h            |    2 +
src/include/catalog/pg_proc.h             |    2 +
src/include/utils/builtins.h              |    1 +
src/include/utils/relfilenodemap.h        |   18 +++
src/include/utils/relmapper.h             |    2 +
src/test/regress/expected/alter_table.out |   18 +++
src/test/regress/sql/alter_table.sql      |   14 ++
14 files changed, 408 insertions(+), 3 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix error handling in PLy_spi_execute_fetch_result().
Следующее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Silence compiler warning on an unused variable