Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PG-1056 xmin and xmax correctness #292

Merged
merged 5 commits into from
Oct 8, 2024
Merged

PG-1056 xmin and xmax correctness #292

merged 5 commits into from
Oct 8, 2024

Commits on Sep 23, 2024

  1. PG-1056 Add failing test

    artemgavrilov committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    dc79a8c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9bf409a View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2024

  1. Fix UPDATE SET ... RETURNING processing for encrypted tuples

    If `get_heap_tuple` is NULL, the core uses `copy_heap_tuple` instead. The former returns a pointer to a tuple in the slot and the latter makes a copy of such a tuple. For UPDATE SET, the core uses the slot for INSERT and later for RETURNING processing. If we copy the tuple the next happens:
    1. The core creates a slot with the generic tuple.
    2. It passed to `pg_tdeam_tuple_update()` and it gets a copy of the tuple here [https://github.com/Percona-Lab/pg_tde/blob/6d4f7e5b7bd2507ce65deb315ea8d5647f474cf9/src17/access/pg_tdeam_handler.c#L336].
    3. This generic tuple is filled with the proper data and used for the update here [https://github.com/Percona-Lab/pg_tde/blob/6d4f7e5b7bd2507ce65deb315ea8d5647f474cf9/src17/access/pg_tdeam_handler.c#L343].
    4. Later on, RETURNING processing uses the slot's tuple but is still a  generic unmodified one because of the copy.
    5. That results in wrong RETURNING data.
    
    To avoid this, we should return a pointer to the slot's tuple instead of copying it.
    
    Fixes PG-1056
    dAdAbird committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    b451158 View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2024

  1. Configuration menu
    Copy the full SHA
    dc9624a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dd260d7 View commit details
    Browse the repository at this point in the history