Commit e5adf3b
Nikita Malakhov
Pluggable TOAST API interface along with reference TOAST mechanics
Reference TOAST mechanics is very limited in terms of using internal
knowledge on TOASTed data structure or workload. It is not extensible
and is a part of Heap AM. Pluggable TOAST suggests extensible TOAST
API which allows to develop and plug in different TOAST mechanics
for disting table columns and even data types.
Pluggable TOAST API is introduced along with the default (reference)
TOAST mechanics which is left untouched in this patch.
Pluggable TOAST API consists of 3 parts:
1) SQL syntax supports manipulations with toasters - CREATE TABLE ...
(column type STORAGE storage_type TOASTER toaster), ALTER TABLE ALTER
COLUMN column SET TOASTER toaster and Toaster definition.
TOAST API requires earlier patch with CREATE TABLE SET STORAGE clause;
New column atttoaster is added to pg_attribute.
Toaster drop is not allowed for not to lose already toasted data;
2) New VARATT_CUSTOM data structure with fixed header and variable
tail to store custom toasted data, with according macros set;
3) Toaster handler routine structure contains custom toaster functions.
Along with necessary functions custom toasters could implement other
functions which are stored into vtable;
In this patch regular (default) TOAST function is left as-is and not
yet implemented via new API.
More detailed documentation is provided in
/src/backend/access/README.toastapi
TOAST API syntax and code explanation provided in additional docs patch.
Author: Teodor Sigaev <teodor@sigaev.ru>
Author: Oleg Bartunov <obartunov@postgrespro.ru>
Author: Nikita Glukhov <n.gluhov@postgrespro.ru>
Author: Nikita Malakhov <n.malakhov@postgrespro.ru>
Discussion: https://www.postgresql.org/message-id/flat/224711f9-83b7-a307-b17f-4457ab73aa0a@sigaev.ru1 parent 3161ae8 commit e5adf3b
File tree
86 files changed
+2911
-773
lines changed- contrib/test_decoding/expected
- src
- backend
- access
- common
- index
- bootstrap
- catalog
- commands
- nodes
- parser
- tcop
- utils
- adt
- cache
- bin
- pg_dump
- psql
- include
- access
- catalog
- commands
- nodes
- parser
- tcop
- utils
- test
- modules/test_ddl_deparse
- regress
- expected
- sql
- tools/pgindent
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
86 files changed
+2911
-773
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
| |||
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
| |||
529 | 529 | | |
530 | 530 | | |
531 | 531 | | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
539 | 539 | | |
540 | 540 | | |
541 | 541 | | |
| |||
0 commit comments