<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Operations on Mimus</title><link>https://mimus.pgsty.com/docs/tde/upstream/how-to/</link><description>Recent content in Operations on Mimus</description><generator>Hugo</generator><language>en-US</language><atom:link href="https://mimus.pgsty.com/docs/tde/upstream/how-to/index.xml" rel="self" type="application/rss+xml"/><item><title>Uninstall pg_tde</title><link>https://mimus.pgsty.com/docs/tde/upstream/how-to/uninstall/</link><guid>https://mimus.pgsty.com/docs/tde/upstream/how-to/uninstall/</guid><description>&lt;blockquote&gt;&#10;&lt;p&gt;Mimus records TDE in the data directory. Retain the matching preload, tools and historical keys for recovery, including after dropping the SQL extension. To retire the dependency, migrate into a fresh cluster. &lt;a href="https://mimus.pgsty.com/docs/tde/recovery/"&gt;Mimus procedure&lt;/a&gt;&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;If you no longer wish to use Transparent Data Encryption (TDE) in your deployment, you can remove the &lt;code&gt;pg_tde&lt;/code&gt; extension.&lt;/p&gt;&#10;&lt;p&gt;To proceed, you must have one of the following privileges:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Superuser privileges (to remove the extension globally), or&lt;/li&gt;&#10;&lt;li&gt;Database owner privileges (to remove it from a specific database only)&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;To uninstall &lt;code&gt;pg_tde&lt;/code&gt;, follow the steps below.&lt;/p&gt;</description></item><item><title>Remove encryption from an encrypted table</title><link>https://mimus.pgsty.com/docs/tde/upstream/how-to/decrypt/</link><guid>https://mimus.pgsty.com/docs/tde/upstream/how-to/decrypt/</guid><description>&lt;blockquote&gt;&#10;&lt;p&gt;This is the Percona pg_tde 2.3.0 manual. For the paired build, backup tools and major upgrades, see &lt;a href="https://mimus.pgsty.com/docs/tde/"&gt;PG TDE on Mimus&lt;/a&gt;.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;h2 id="method-1-change-the-access-method"&gt;Method 1. Change the access method&#10;&lt;/h2&gt;&#10;&lt;p&gt;If you encrypted a table with the &lt;code&gt;tde_heap&lt;/code&gt; access method and need to remove the encryption from it, run the following command against the desired table (&lt;code&gt;mytable&lt;/code&gt; in the example below):&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-6bfd5377-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="sql" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-6bfd5377-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;ALTER&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;TABLE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mytable&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;SET&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;ACCESS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;METHOD&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;heap&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;Note that the &lt;code&gt;SET ACCESS METHOD&lt;/code&gt; command drops hint bits and this may affect performance. Running a plain &lt;code&gt;SELECT count(*)&lt;/code&gt; or &lt;code&gt;VACUUM&lt;/code&gt; command on the entire table will check every tuple for visibility and set its hint bits. Therefore, after executing the &lt;code&gt;ALTER TABLE&lt;/code&gt; command, run a simple &lt;code&gt;count(*)&lt;/code&gt; on your tables:&lt;/p&gt;</description></item><item><title>Upgrade pg_tde</title><link>https://mimus.pgsty.com/docs/tde/upstream/how-to/upgrade/</link><guid>https://mimus.pgsty.com/docs/tde/upstream/how-to/upgrade/</guid><description>&lt;blockquote&gt;&#10;&lt;p&gt;Percona’s package upgrade steps apply to Percona PostgreSQL. For a major upgrade of a TDE-marked Mimus cluster use &lt;a href="https://mimus.pgsty.com/docs/tde/recovery/#upgrade"&gt;logical dump and restore&lt;/a&gt;.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;The version of &lt;code&gt;pg_tde&lt;/code&gt; available to you depends on your version of Percona Distribution for PostgreSQL.&lt;/p&gt;&#10;&lt;p&gt;To use a newer &lt;code&gt;pg_tde&lt;/code&gt; release, first ensure that your Percona Distribution for PostgreSQL version includes it.&lt;/p&gt;&#10;&lt;p&gt;This document describes upgrading the &lt;code&gt;pg_tde&lt;/code&gt; extension within the same PostgreSQL major version. For PostgreSQL major version upgrades on clusters that use &lt;code&gt;pg_tde&lt;/code&gt;, use &lt;a href="https://mimus.pgsty.com/docs/tde/upstream/command-line-tools/pg-tde-upgrade/"&gt;pg_tde_upgrade&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Restore encrypted backups</title><link>https://mimus.pgsty.com/docs/tde/upstream/how-to/restore-backups/</link><guid>https://mimus.pgsty.com/docs/tde/upstream/how-to/restore-backups/</guid><description>&lt;blockquote&gt;&#10;&lt;p&gt;For Mimus, restore the matching kernel, startup libraries, provider metadata and historical keys along with the backup. &lt;a href="https://mimus.pgsty.com/docs/tde/recovery/"&gt;Mimus procedure&lt;/a&gt;&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;To restore an encrypted backup created with an earlier key, ensure the key is still available in your Key Management System (KMS). The backup remains &lt;strong&gt;encrypted&lt;/strong&gt; on disk, &lt;code&gt;pg_tde&lt;/code&gt; uses the correct key to transparently access the data.&lt;/p&gt;&#10;&lt;h2 id="how-pgtde-uses-old-keys-to-load-backups"&gt;How pg_tde uses old keys to load backups&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;KMS&lt;/strong&gt;: stores the principal key(s) that were active when the backup was made.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Encrypted backup&lt;/strong&gt;: contains data encrypted with the key available at that time.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Current server&lt;/strong&gt;: &lt;code&gt;pg_tde&lt;/code&gt; automatically loads the backup if the key is accessible through the KMS.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;The table (internal) keys are stored within the backup. At runtime, &lt;code&gt;pg_tde&lt;/code&gt; retrieves the principal key(s) from the configured KMS and uses them to decrypt the internal keys, enabling access to the encrypted table data.&lt;/p&gt;</description></item><item><title>Backup with WAL encryption enabled</title><link>https://mimus.pgsty.com/docs/tde/upstream/how-to/backup-wal-enabled/</link><guid>https://mimus.pgsty.com/docs/tde/upstream/how-to/backup-wal-enabled/</guid><description>&lt;blockquote&gt;&#10;&lt;p&gt;For Mimus, choose the backup client by WAL key history and use the client paired with the kernel. See the tested physical backup and restore sequence. &lt;a href="https://mimus.pgsty.com/docs/tde/recovery/"&gt;Mimus procedure&lt;/a&gt;&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;div class="td-callout td-callout--danger" role="note"&gt;&#10; &lt;div class="td-callout__title"&gt;&lt;i class="td-callout__icon fa-solid fa-fire" aria-hidden="true"&gt;&lt;/i&gt;&lt;span class="td-callout__label"&gt;Danger&lt;/span&gt;&lt;/div&gt;&#10; &lt;div class="td-callout__body"&gt;&#10;&lt;p&gt;Do not rotate encryption keys while a backup is running. This may result in an inconsistent backup and restore failure. This applies to all backup tools.&lt;/p&gt;&#10;&lt;p&gt;For more details, see &lt;a href="https://mimus.pgsty.com/docs/tde/upstream/index/tde-limitations/#limitations-when-using-pgtde"&gt;Limitations of pg_tde&lt;/a&gt;.&lt;/p&gt;&#10; &lt;/div&gt;&#10;&lt;/div&gt;&lt;p&gt;To create a backup with WAL encryption enabled:&lt;/p&gt;</description></item><item><title>Configure multi-tenancy</title><link>https://mimus.pgsty.com/docs/tde/upstream/how-to/multi-tenant-setup/</link><guid>https://mimus.pgsty.com/docs/tde/upstream/how-to/multi-tenant-setup/</guid><description>&lt;blockquote&gt;&#10;&lt;p&gt;This is the Percona pg_tde 2.3.0 manual. For the paired build, backup tools and major upgrades, see &lt;a href="https://mimus.pgsty.com/docs/tde/"&gt;PG TDE on Mimus&lt;/a&gt;.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;The steps below describe how to set up multi-tenancy with &lt;code&gt;pg_tde&lt;/code&gt;. Multi-tenancy allows you to encrypt different databases with different keys. This provides granular control over data and enables you to introduce different security policies and access controls for each database so that only authorized users of specific databases have access to the data.&lt;/p&gt;</description></item><item><title>Encryption enforcement</title><link>https://mimus.pgsty.com/docs/tde/upstream/how-to/enforcement/</link><guid>https://mimus.pgsty.com/docs/tde/upstream/how-to/enforcement/</guid><description>&lt;blockquote&gt;&#10;&lt;p&gt;This is the Percona pg_tde 2.3.0 manual. For the paired build, backup tools and major upgrades, see &lt;a href="https://mimus.pgsty.com/docs/tde/"&gt;PG TDE on Mimus&lt;/a&gt;.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;For &lt;code&gt;pg_tde&lt;/code&gt;, encryption enforcement ensures that only encrypted storage is allowed for specific operations, tables, or the entire database. It prevents the accidental creation of unencrypted tables or indexes in environments where encryption is required for compliance, security, or policy enforcement.&lt;/p&gt;&#10;&lt;h2 id="what-does-enforcement-do"&gt;What does enforcement do?&#10;&lt;/h2&gt;&#10;&lt;p&gt;When enabled, encryption enforcement:&lt;/p&gt;</description></item></channel></rss>