| From: | Fabian Lindfors <fabian(at)flapplabs(dot)se> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Custom index access method for primary keys |
| Date: | 2025-04-05 10:34:24 |
| Message-ID: | 872B0CA7-4483-4FC2-8CD8-0A5C08FC0942@flapplabs.se |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hi! I’m working on an index access method that I intend to be generic and to replace btree for my specific use case. I noticed though that it doesn’t seem to be possible to specify an access method when creating a new table and using PRIMARY KEY.
Same applies to altering a table to add a primary key using an existing index with a non-btree access method. That hits this check and errors: https://github.com/postgres/postgres/blob/4be6a74cfb1ef4c50740e4c2f97a3b478c16de73/src/backend/parser/parse_utilcmd.c#L2480
Wanted to ask if this an intentional limitation and if there is a reason why an index access method (if it supports uniqueness) would not be usable for a primary key?
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ancoron Luciferis | 2025-04-05 11:53:00 | Kubernetes, cgroups v2 and OOM killer - how to avoid? |
| Previous Message | Adrian Klaver | 2025-04-04 17:09:56 | Re: Performance issues during pg_restore -j with big partitioned table |