You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have already had a locked memory for internal keys. But we read and
created keys into usually palloced memory before copying them to the
locked memory.
This commit changes the approach. Now, the user must allocate (acquire)
a locked memory first and use it as a buffer for decryption/creating
the key. This locked memory is kinda generic, so the user requests an
amount of bytes (rather than objects). Although currently, during the
key search, we assume that everything the memory contains only
`RelKeyCacheRec` objects. With two exceptions: 1) server creates its
own locked page to store the WAL write key;
2) `pg_tde_perform_rotate_key` cheekily allocates a space there for
the keys re-encryption but releases this memory when it's done.
In future, if we switch to the full _map files encryption, we can gulp
(mmap) the whole file into that memory.
Fixes PG-1445
0 commit comments