Skip to content

From PostgreSQL 18 onwards - TupleDesc struct uses compat_attribute. TupleDescAttr() is the recommended way to access attr now, which is available on postgresql 16 #2164

Closed

Description

@sanchayanghosh

Starting from PostgreSQL 18 onwards TupleDesc no longer contains attr. it now uses CompactAttr compact_attr.

In PostgreSQL 16, we still support both attr and compact_attrs.

We need to define a macro that can resolve to both tts_tupleDescriptor->attr[i] and to TupleDescAttr(tts_tupleDescriptor, i)

Activity

  1. sanchayanghosh commented on Apr 20, 2025

    @sanchayanghosh
    Author

    This would also work with releases built for PG17 in #2111

  2. added a commit that references this issue on Apr 20, 2025
    c96fa43
  3. added 2 commits that reference this issue on Apr 27, 2025
    ace7bf7
    7e3a642
  4. harudini commented on Oct 2, 2025

    @harudini

    Hi,

    I applied your patch but encountered a segmentation fault during the cypher_match regression test.
    The backtrace indicates the fault occurs in the function process_update_list, specifically around the call to ExecCloseIndices.

    It appears that PostgreSQL 18 no longer tolerates ExecCloseIndices being called twice on the same ResultRelInfo. While in here, ExecCloseIndices is called both inside process_update_list and again within update_entity_tuple, causing a double close that leads to the assertion failure and subsequent segfault.

  5. added 3 commits that reference this issue on Oct 9, 2025
    a66436a
    13fa2b4
    02c372a
  6. sanchayanghosh commented on Oct 12, 2025

    @sanchayanghosh
    Author

    Oh! My bad! Thanks so much for pointing out. Will take a look and fix.

    I will run the regression tests again. The last time I ran regression test against master branch and did not see this issue. Will re-run

  7. jrgemignani commented on Oct 15, 2025

    @jrgemignani
    Contributor

    Oh! My bad! Thanks so much for pointing out. Will take a look and fix.

    I will run the regression tests again. The last time I ran regression test against master branch and did not see this issue. Will re-run

    Make sure to do a make clean first? Sometimes make gets confused, so I always include clean, just in case.

  8. sanchayanghosh commented on Nov 30, 2025

    @sanchayanghosh
    Author

    Closing this issue, PGSQL 18 support added in a different PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions