Using all sort pathkeys with append node for partially compressed chunks ends up creating invalid plans when using joined columns in ORDER BY clause. Using the pathkey prefix that belongs to the underlying relation fixes the issue and sets us up for possible incremental sort optimization.
(cherry picked from commit eb548b60d1cc9bc5874cafdf2508a00694d6a44c)
Using all sort pathkeys with append node for partially compressed chunks ends up creating invalid plans when using joined columns in ORDER BY clause. Using the pathkey prefix that belongs to the underlying relation fixes the issue and sets us up for possible incremental sort optimization.
(cherry picked from commit eb548b60d1cc9bc5874cafdf2508a00694d6a44c)