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-961] automated bash script for replication, expected files and up… #71

Open
wants to merge 4 commits into
base: TDE_REL_17_STABLE
Choose a base branch
from

Conversation

shahidullah79
Copy link
Collaborator

…dated sql

PG-961

Description

A bash script that verify streaming replication. This script following tasks

  • Create a primary server
  • Enable pg_tde with global keys.
  • Update the primary configuration files.
  • Insert some data using sample_data.sql file
  • create two replica server using pg_basebackup
  • Verify sample_data using verify_sample_data.sql on both slave nodes.
  • Insert some more data on primary node (using incremental_data.sql file)
  • Verify the newly inserted data on both slave nodes.
  • Data should be same on expected and actual files.

Links

@shahidullah79 shahidullah79 requested review from jeltz and removed request for dAdAbird February 18, 2025 22:40
Copy link
Collaborator

@dutow dutow left a comment

Choose a reason for hiding this comment

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

This is a good base script, but I see three issues here:

  • No verification that data on disk is actually encrypted - not for the primary, not for the replica.
  • The data load is very minimal: we create a basic dataset with minimal tables, and then add a few extra SQL commands while the server is running. (1) The dataset should be bigger, currently everything fits into a few kilobytes, that's not realistic. (2) the replication process should run longer, with more changes, maybe even adding pgbench/sysbench there for a dynamic load. (3) The dataset should use more features. We have no indexes, toast tables, views/materalized views and so on.
  • The incremental/data load part doesn't change encryption parameters: rotating keys, changing the key provider, moving from default provider to database local, anything really.

Most of these comments are also true for the backup test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants