Re: Incremental sort for access method with ordered scan support (amcanorderbyop)
Miroslav Bendik <miroslav.bendik@gmail.com>
From: Miroslav Bendik <miroslav.bendik@gmail.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Richard Guo <guofenglinux@gmail.com>, pgsql-hackers@postgresql.org
Date: 2023-04-19T04:52:59Z
Lists: pgsql-hackers
Attachments
- am_orderbyop_incremental_sort_v3.1.patch (text/x-patch) patch v3
- am_orderbyop_incremental_sort_v3.2.patch (text/x-patch) patch v3
Thanks for feedback > 2. You can use list_copy_head(root->query_pathkeys, > list_length(orderbyclauses)); instead of: > > + useful_pathkeys = list_truncate(list_copy(root->query_pathkeys), > + list_length(orderbyclauses)); This code will crash if query_pathkeys is NIL. I need either modify list_copy_head (v3.1) or add checks before call (v3.2). I don't know if it's a good idea to modify list_copy_head. It will add additional overhead to every call. -- Best regards Miroslav
Commits
-
Allow Incremental Sorts on GiST and SP-GiST indexes
- 625d5b3ca096 17.0 landed
-
Fix list_copy_head() with empty Lists
- 63a03aea6bc8 15.3 landed
- e35ded29566f 16.0 landed