git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: f217761) | patch
tableam: introduce table AM infrastructure.
Wed, 6 Mar 2019 17:54:38 +0000 (09:54 -0800)
Wed, 6 Mar 2019 17:54:38 +0000 (09:54 -0800)
commit 8586bf7ed8889f39a59dd99b292014b73be85342
tableam: introduce table AM infrastructure.

This introduces the concept of table access methods, i.e. CREATE
ACCESS METHOD ... TYPE TABLE and
CREATE TABLE ... USING (storage-engine).
No table access functionality is delegated to table AMs as of this
commit, that'll be done in following commits.

Subsequent commits will incrementally abstract table access
functionality to be routed through table access methods. That change
is too large to be reviewed & committed at once, so it'll be done
incrementally.

Docs will be updated at the end, as adding them incrementally would
likely make them less coherent, and definitely is a lot more work,
without a lot of benefit.

Table access methods are specified similar to index access methods,
i.e. pg_am.amhandler returns, as INTERNAL, a pointer to a struct with
callbacks. In contrast to index AMs that struct needs to live as long
as a backend, typically that's achieved by just returning a pointer to
a constant struct.

Psql's \d+ now displays a table's access method. That can be disabled
with HIDE_TABLEAM=true, which is mainly useful so regression tests can
be run against different AMs. It's quite possible that this behaviour
still needs to be fine tuned.

For now it's not allowed to set a table AM for a partitioned table, as
we've not resolved how partitions would inherit that. Disallowing
allows us to introduce, if we decide that's the way forward, such a
behaviour without a compatibility break.

Catversion bumped, to add the heap table AM and references to it.

Author: Haribabu Kommi, Andres Freund, Alvaro Herrera, Dimitri Golgov and others
Discussion:
https://postgr.es/m/20180703070645.wchpu5muyto5n647@alap3.anarazel.de
https://postgr.es/m/20160812231527.GA690404@alvherre.pgsql
https://postgr.es/m/20190107235616.6lur25ph22u5u5av@alap3.anarazel.de
https://postgr.es/m/20190304234700.w5tmhducs5wxgzls@alap3.anarazel.de
50 files changed:
doc/src/sgml/ref/psql-ref.sgml diff | blob | blame | history
src/backend/access/heap/Makefile diff | blob | blame | history
src/backend/access/heap/heapam_handler.c [new file with mode: 0644] blob
src/backend/access/table/Makefile diff | blob | blame | history
src/backend/access/table/tableam.c [new file with mode: 0644] blob
src/backend/access/table/tableamapi.c [new file with mode: 0644] blob
src/backend/bootstrap/bootparse.y diff | blob | blame | history
src/backend/catalog/genbki.pl diff | blob | blame | history
src/backend/catalog/heap.c diff | blob | blame | history
src/backend/catalog/index.c diff | blob | blame | history
src/backend/catalog/toasting.c diff | blob | blame | history
src/backend/commands/amcmds.c diff | blob | blame | history
src/backend/commands/cluster.c diff | blob | blame | history
src/backend/commands/createas.c diff | blob | blame | history
src/backend/commands/tablecmds.c diff | blob | blame | history
src/backend/nodes/copyfuncs.c diff | blob | blame | history
src/backend/parser/gram.y diff | blob | blame | history
src/backend/rewrite/rewriteDefine.c diff | blob | blame | history
src/backend/utils/adt/pseudotypes.c diff | blob | blame | history
src/backend/utils/cache/relcache.c diff | blob | blame | history
src/backend/utils/misc/guc.c diff | blob | blame | history
src/bin/psql/describe.c diff | blob | blame | history
src/bin/psql/help.c diff | blob | blame | history
src/bin/psql/settings.h diff | blob | blame | history
src/bin/psql/startup.c diff | blob | blame | history
src/include/access/tableam.h [new file with mode: 0644] blob
src/include/catalog/catversion.h diff | blob | blame | history
src/include/catalog/heap.h diff | blob | blame | history
src/include/catalog/pg_am.dat diff | blob | blame | history
src/include/catalog/pg_am.h diff | blob | blame | history
src/include/catalog/pg_class.dat diff | blob | blame | history
src/include/catalog/pg_class.h diff | blob | blame | history
src/include/catalog/pg_proc.dat diff | blob | blame | history
src/include/catalog/pg_type.dat diff | blob | blame | history
src/include/nodes/nodes.h diff | blob | blame | history
src/include/nodes/parsenodes.h diff | blob | blame | history
src/include/nodes/primnodes.h diff | blob | blame | history
src/include/utils/rel.h diff | blob | blame | history
src/include/utils/relcache.h diff | blob | blame | history
src/test/regress/expected/create_am.out diff | blob | blame | history
src/test/regress/expected/opr_sanity.out diff | blob | blame | history
src/test/regress/expected/psql.out diff | blob | blame | history
src/test/regress/expected/sanity_check.out diff | blob | blame | history
src/test/regress/expected/type_sanity.out diff | blob | blame | history
src/test/regress/pg_regress_main.c diff | blob | blame | history
src/test/regress/sql/create_am.sql diff | blob | blame | history
src/test/regress/sql/opr_sanity.sql diff | blob | blame | history
src/test/regress/sql/psql.sql diff | blob | blame | history
src/test/regress/sql/type_sanity.sql diff | blob | blame | history
src/tools/pgindent/typedefs.list diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /