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-1038 Tablespaces problem #288

Merged
merged 3 commits into from
Nov 1, 2024
Merged

PG-1038 Tablespaces problem #288

merged 3 commits into from
Nov 1, 2024

Commits on Oct 31, 2024

  1. Configuration menu
    Copy the full SHA
    20861e4 View commit details
    Browse the repository at this point in the history
  2. Move tde keys and keyring when chaging tablespace

    When a relation moved to a new location it causes the change of relfilenode id
    for it. Hence we must re-encrypt and store its internal key with the new id.
    Also, we have to store the changed internal key in the new physical location,
    and copy there principal key info and keyring data.
    
    Fixes https://perconadev.atlassian.net/browse/PG-1038
    dAdAbird committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    05f2e22 View commit details
    Browse the repository at this point in the history
  3. Store rel key type along with internal key

    This is needed for ALTER  TABLESPACE as pg_tdeam_relation_copy_data
    gets only the old rlocator and needs to know how to properly save the
    key in the new rlocator.
    
    Also during ALTER ... TABLESPACE, tde_mdcreate gets called and
    tde_smgr_get_key is trying to get the internal key. But there is no key
    moved to the new table space since it is called during
    RelationCreateStorage() and pg_tde.map file might not exist. And it's ok in
    this case but it results in an error. This commit introduces an option not
    to have a pg_tde.map (treated as no key).
    dAdAbird committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    5d8436a View commit details
    Browse the repository at this point in the history