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

Documentation updates for variables/tools and a few other things #108

Open
wants to merge 5 commits into
base: release-17.4
Choose a base branch
from

Conversation

dutow
Copy link
Collaborator

@dutow dutow commented Mar 5, 2025

No description provided.

### Usage

```
pg_tde_change_key_provider [-D <datadir>] <dbOid> <provider_name> <new_provider_type> <provider_parameters...>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we also need to explain dbOid

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, I also thought the same thing while reading through it.


A `boolean` variable controlling if creation of new not encrypted tables is enabled or not.

This can be set at global, database, user or session level, but changing the value requires superuser permissions.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the user level mean?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Postgres allow GUC variables on multiple levels:

  • Global
  • Per database (set for specific databases)
  • Per user (set for specific users)
  • Per session (set for the current session)


The default value is false.
* global - for the entire PostgreSQL cluster
* database - for the current database
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for specific databases

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to know what databases is it set for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have to know, it's managed by postgres: https://www.postgresql.org/docs/current/sql-alterdatabase.html

It's the ALTER DATABASE ... SET variable = value; syntax.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also why I didn't write a too detailed description about it. This is a common postgresql concept for most GUC variables, we shouldn't have to explain it to anybody familiar with postgres.


Once `pg_tde` is removed from the `shared_preload_libraries`, reading any leftover encrypted files will fail. Removing the extension from the `shared_preload_libraries` is also possible if the extension is still installed in some databases.

Make sure to only do this if the server has no encrypted files in its data directory.

4. Start or restart the `postgresql` cluster to apply the changes.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this now be item 5. instead of 4. twice?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


### Usage

To modify the key provider configuration, specify all parameters depending on the provider type, in the same way as you do when using the [`pg_tde_change_key_provider_<type>`](fucntions.md#change-an-existing-provider) SQL functions.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To modify the key provider configuration, specify all parameters depending on the provider type, in the same way as you do when using the [`pg_tde_change_key_provider_<type>`](fucntions.md#change-an-existing-provider) SQL functions.
To modify the key provider configuration, specify all parameters depending on the provider type in the same way as you do when using the [`pg_tde_change_key_provider_<type>`](fucntions.md#change-an-existing-provider) SQL functions.

I think no need for a comma here

## pg_checksums

`pg_checksums` is not able to calculate checksums for encrypted files.
It skips encrypted files, and reports this in the output.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It skips encrypted files, and reports this in the output.
It skips encrypted files and reports this in the output.

No need for a comma here


Once `pg_tde` is removed from the `shared_preload_libraries`, reading any leftover encrypted files will fail. Removing the extension from the `shared_preload_libraries` is also possible if the extension is still installed in some databases.

Make sure to only do this if the server has no encrypted files in its data directory.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Make sure to only do this if the server has no encrypted files in its data directory.
Make sure to do this only if the server has no encrypted files in its data directory.

@nastena1606 nastena1606 added the documentation Improvements or additions to documentation label Mar 10, 2025
@nastena1606 nastena1606 self-requested a review March 24, 2025 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants