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-1354: Update documentation with latest changes from percona/pg_tde #46

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 40 additions & 8 deletions contrib/pg_tde/documentation/_resource/overrides/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,46 @@
{% endif %}
<meta property="og:type" content="website" />
<meta property="og:title" content="{{ title }}" />
<meta property="og:image" content="https://percona-lab.github.io/pg_tde/main/documentation/_images/pg_tde.png">
<meta property="og:url" content="https://percona-lab.github.io/pg_tde/main/">
<script>
!function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.async=!0,p.src=s.api_host+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags getFeatureFlag getFeatureFlagPayload reloadFeatureFlags group updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures getActiveMatchingSurveys getSurveys onSessionId".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
posthog.init('phc_7unoI9J6Fm0SMrfDp35xNOpCRTkOAibbffQwdGWbHnL',{api_host:'https://eu.posthog.com'})
</script>
{% endblock %}

<meta property="og:image" content="https://percona.github.io/pg_tde/main/documentation/_images/pg_tde.png">
<meta property="og:url" content="https://percona.github.io/pg_tde/main/">
{% endblock %}

{% block site_nav %}
{% if nav %}
{% if page.meta and page.meta.hide %}
{% set hidden = "hidden" if "navigation" in page.meta.hide %}
{% endif %}
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" {{ hidden }}>
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
{% include "partials/nav.html" %}
<br>
<label class="md-nav__title" for="__drawer">
</label>
</div>
</div>
</div>
{% endif %}
{% if "toc.integrate" not in features %}
{% if page.meta and page.meta.hide %}
{% set hidden = "hidden" if "toc" in page.meta.hide %}
{% endif %}
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" {{ hidden }}>
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
{% include "partials/toc.html" %}
</div>
<div class="md-sidebar__inner">
{% include "partials/banner.html" %}
</div>
</div>
</div>
{% endif %}
<script>
!function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.async=!0,p.src=s.api_host+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags getFeatureFlag getFeatureFlagPayload reloadFeatureFlags group updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures getActiveMatchingSurveys getSurveys onSessionId".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
posthog.init('phc_7unoI9J6Fm0SMrfDp35xNOpCRTkOAibbffQwdGWbHnL',{api_host:'https://eu.posthog.com'})
</script>
{% endblock %}



Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div data-banner="data-banner">
<p><svg style="display:block;margin:-1em 0 0.75em" width="78" height="69" viewBox="0 0 78 69" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M56.7281 30.7666C62.6528 26.8938 64.5914 18.9942 61.0059 12.7854C59.2094 9.67113 56.3053 7.44082 52.8311 6.50951C49.6122 5.64535 46.2502 5.99872 43.2912 7.49366L39.251 0.5L30.8648 15.0245L11.4811 48.5937H67.021L56.7281 30.7666ZM51.881 10.0674C54.4064 10.7401 56.5079 12.3616 57.8168 14.6194C60.3895 19.0701 59.053 24.7153 54.8808 27.5665L45.1362 10.6905C47.2355 9.68104 49.6034 9.46087 51.881 10.0674ZM39.251 7.87125L60.6339 44.907H48.1228L32.9927 18.7102L39.2499 7.87235L39.251 7.87125ZM17.8682 44.907L30.8637 22.4035L43.8592 44.907H17.8682Z" fill="url(#paint0_linear_2899_1968)"></path><path style="fill:var(--md-typeset-color)" d="M4.981 64.943H3.157V68.207H.756V57.323H5.217C7.822 57.323 9.397 58.861 9.397 61.086V61.116C9.397 63.635 7.433 64.94 4.984 64.94L4.981 64.943V64.943ZM6.961 61.134C6.961 60.061 6.213 59.485 5.011 59.485H3.154V62.812H5.056C6.258 62.812 6.958 62.096 6.958 61.163V61.134H6.961ZM10.738 68.208V57.323H18.973V59.455H13.124V61.664H18.27V63.796H13.124V66.082H19.051V68.214H10.738V68.208 68.208ZM27.557 68.208 25.218 64.726H23.332V68.208H20.931V57.323H25.921C28.496 57.323 30.039 58.677 30.039 60.915V60.945C30.039 62.702 29.088 63.807 27.7 64.32L30.367 68.207H27.556L27.557 68.208ZM27.605 61.041C27.605 60.016 26.887 59.485 25.719 59.485H23.333V62.61H25.767C26.936 62.61 27.605 61.987 27.605 61.071V61.042 61.041ZM36.922 68.499C33.668 68.499 31.249 65.994 31.249 62.825V62.795C31.249 59.659 33.619 57.091 37.019 57.091 39.105 57.091 40.356 57.783 41.383 58.792L39.834 60.571C38.98 59.798 38.113 59.327 37.004 59.327 35.141 59.327 33.795 60.871 33.795 62.762V62.793C33.795 64.684 35.107 66.257 37.004 66.257 38.268 66.257 39.043 65.753 39.913 64.964L41.462 66.524C40.322 67.738 39.059 68.493 36.925 68.493L36.922 68.499ZM47.885 68.499C44.47 68.499 42.021 65.962 42.021 62.825V62.795C42.021 59.659 44.503 57.091 47.915 57.091 51.327 57.091 53.779 59.628 53.779 62.765V62.795C53.779 65.931 51.297 68.499 47.885 68.499ZM51.237 62.795C51.237 60.904 49.846 59.331 47.885 59.331 45.925 59.331 44.567 60.874 44.567 62.766V62.796C44.567 64.688 45.959 66.261 47.919 66.261 49.879 66.261 51.237 64.717 51.237 62.826V62.795 62.795ZM67.001 68.217 72.374 57.091 77.746 68.218H75.052L72.374 62.681 69.705 68.218H67.001V68.217ZM66.007 57.327V68.5L57.813 61.884V68.199H55.264V57.091L63.458 63.681V57.327H66.007Z"></path><defs><linearGradient id="paint0_linear_2899_1968" x1="18.1513" y1="44.7152" x2="61.4356" y2="20.9786" gradientUnits="userSpaceOnUse"><stop stop-color="#FC3519"></stop><stop offset="1" stop-color="#F0D136"></stop></linearGradient></defs></svg></p>
<p>For help, click the link below to get free database assistance or contact our experts for personalized support.</p>

<div class="actions">

<a href="https://docs.percona.com/pg-stat-monitor/get-help.html" style="color: var(--md-typeset-a-color);">Get help from Percona</a>
</div>
</div>
81 changes: 73 additions & 8 deletions contrib/pg_tde/documentation/docs/css/design.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
[data-md-color-scheme="percona-light"] {

/* Primitives */
--md-hue: 220;
--md-primary-fg-color: var(--sky700);

/* Type */
Expand All @@ -85,6 +86,7 @@

/* Defaults */
--md-default-bg-color: var(--white);
--md-default-fg-color: var(--stone900);
--md-default-fg-color--light: rgba(44,50,62,0.72);
--md-default-fg-color--lighter: rgba(44,50,62,0.40);
--md-default-fg-color--lightest: rgba(44,50,62,0.25);
Expand All @@ -102,11 +104,14 @@
/* Code */
--md-code-bg-color: var(--stone800);
--md-code-bg-color: var(--stone50);

/* Tables */
--md-typeset-table-color: hsla(var(--md-hue),17%,21%,0.25)
}
[data-md-color-scheme="percona-dark"] {

/* Primitives */
--md-hue: 230;
--md-hue: 0;
--md-primary-fg-color: var(--sky200);

/* Type */
Expand All @@ -115,6 +120,7 @@

/* Defaults */
--md-default-bg-color: var(--stone900);
--md-default-fg-color: var(--white);
--md-default-fg-color--light: rgba(251,251,251,0.72);
--md-default-fg-color--lighter: rgba(251,251,251,0.4);
--md-default-fg-color--lightest: rgba(209,213,222,0.25);
Expand All @@ -133,6 +139,9 @@
/* Code */
--md-code-bg-color: var(--stone50);
--md-code-bg-color: var(--stone800);

/* Tables */
--md-typeset-table-color: hsla(var(--md-hue),0%,100%,0.25)
}

/* Typography */
Expand All @@ -155,7 +164,7 @@
.md-typeset h1 {
margin: 0 0 0.75em;
}
.md-header {
.md-header :not(.md-search__suggest) {
font-family: var(--fHeading);
font-weight: bold;
}
Expand Down Expand Up @@ -208,12 +217,20 @@
.md-tabs__link {
margin-top: 0.55rem;
}
.md-header__topic {
transition: opacity .25s;
}
.md-header__topic:hover {
opacity: 0.7;
/* .md-header__topic .md-ellipsis {
position: relative;
}
.md-header__topic:hover .md-ellipsis::after {
content: "";
position: absolute;
display: block;
right: 0;
bottom: 11px;
left: 0;
width: 100%;
height: 2.5px;
background-color: currentColor;
} */

/* Footer */

Expand Down Expand Up @@ -254,6 +271,13 @@
vertical-align: baseline;
padding: 0 0.2em 0.1em;
border-radius: 0.15em;
white-space: pre-wrap; /* Ensure long lines wrap */
}
.md-typeset .highlight code span,
.md-typeset code,
.md-typeset kbd,
.md-typeset pre {
color: var(--md-typeset-color);
}
.md-button code,
[data-md-color-scheme="percona-dark"] .md-button:not(.md-button--primary) code {
Expand Down Expand Up @@ -636,6 +660,7 @@ i[warning] [class*="moji"] {
-moz-appearance: none;
appearance: none;
align-self: center;
font-family: var(--fHeading);
font-size: 0.9rem;
line-height: 1;
font-weight: 700;
Expand All @@ -650,6 +675,46 @@ i[warning] [class*="moji"] {
display: none;
}

/* Mike Version Select */

.md-version__current,
.md-version__link {
font-size: 0.9rem;
font-weight: 700;
line-height: 1;
padding: 0.5em;
}
.md-version__current {
top: unset;
margin-left: 0.25em !important;
margin-right: 0.25em !important;
border-radius: 0.1rem;
background-color: rgba(0,0,0,0.2);
}
.md-version__current::after {
width: 0.5em;
height: 0.75em;
}
.md-version__list {
top: 0.1em;
margin: 0.25em;
border-radius: 0.1rem;
}
[dir="ltr"] .md-version__current::after {
margin-left: 0.4em;
}
[dir="rtl"] .md-version__current::after {
margin-right: 0.4em;
}
[dir="ltr"] .md-version__link {
padding-left: 0.5em;
padding-right: 1.4375em;
}
[dir="rtl"] .md-version__link {
padding-left: 1.4375em;
padding-right: 0.5em;
}

/* Media queries */

@media screen and (max-width: 76.1875em) {
Expand All @@ -667,4 +732,4 @@ i[warning] [class*="moji"] {
padding: 1em;
}
}
/**/
/**/
16 changes: 11 additions & 5 deletions contrib/pg_tde/documentation/docs/css/extra.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
@media print {
/* Adjusts positioning of admonition icon */
.md-typeset :is(.admonition-title,summary):before {
top: 0.6rem;
left: 0.6rem;
}
}
.md-typeset :is(.admonition-title,summary):before {
top: 0.6rem;
left: 0.6rem;
}

}

.md-sidebar__inner {
font-size: 0.65rem; /* Font size */
line-height: 1.6;
}
15 changes: 14 additions & 1 deletion contrib/pg_tde/documentation/docs/decrypt.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ If you encrypted a table with the `tde_heap` or `tde_heap_basic` access method a
ALTER TABLE mytable SET access method heap;
```

Note that the `ALTER TABLE SET` command drops hint bits and this may affect the performance. Running a plain `SELECT, count(*)`, or `VACUUM` commands on the entire table will check every tuple for visibility and set its hint bits. Therefore, after executing the ALTER command, run a simple "count(*)" on your tables:

```
SELECT COUNT(*) FROM mytable;
```

Check that the table is not encrypted:

```
Expand All @@ -25,6 +31,13 @@ The output returns `f` meaning that the table is no longer encrypted.
```

Note that the indexes and WAL files will no longer be encrypted.

Run a simple "count(*)" on your table to check every tuple for visibility and set the hint bits:

```
SELECT COUNT(*) FROM mytable;
```


## Method 2. Create a new unencrypted table on the base of the encrypted one

Expand All @@ -41,4 +54,4 @@ The new table `Customers` inherits the structure and the data from `EncryptedCus

```
DROP TABLE EncryptedCustomers;
```
```
Loading