/
PostgreSQL Source Management

PostgreSQL Source Management

General

A source host is a server that hosts the source databases. A test data environment(TDE) includes definition of Golden Image (GI) to one source database. This section describes how to create and manage a Test Data Environment.

A Golden Image (GI) refers to a pre-configured dataset of a database environment. This dataset encapsulates a snapshot of the database including its schema and data. It serves as a master copy from which multiple instances of the database (VDB) can be rapidly deployed, ensuring consistency, reliability, and quick scalability across different environments.

Supported types of Golden Images for Postgres database

Each type of Golden Image for Postgres databases serves a specific set of needs, from real-time replication to disaster recovery and cloud-based management. The choice of GI should align with the operational objectives and the specific environment.

Live Golden Image (Live GI)

A Live GI is a real-time replica of a database, mirroring its current state including data and configurations. It requires that the live database is running on a virtual volume provided by Accelario Virtualization.

Pay attention that the updates/refresh of this replica should be done by the user. Accelario Virtualization is not responsible for that. There are some external solutions, though.

Sources(TDE) management

  1. On the navigation bar, click Sources.

The Source Hosts view is displayed, listing all source hosts that have been added to the system

image-20250510-112049.png

You can quickly locate a source host by typing its letters on the Search bar. The list updates promptly.

Add a source host

To add a source host, see Install source agent

The source host maybe Linux only.

Modify, see details or delete a source host

To modify, see details or delete a source host, see Manage source agent

Create a test data environment(TDE)

  1. On the navigation bar, click Sources.

The Source Management window appears.

image-20250510-112138.png
  1. Select the required agent

  2. Click the (+) sign in the right panel

  3. Select DB type.

    image-20250510-112203.png

     

  4. Enter a Name and an optional description.

    image-20250510-112227.png

     

  5. Only 1 GI type is available - Live GI

    image-20250510-112306.png

     

     

Live GI

Create a Live GI

  1. Enter the TDE details

    image-20250510-112426.png

     

     

    • Golden Image Type - always Live GI

    • Source Host - choose the source host that was installed earlier

    • Snapshot policy

      • Activate snapshots - select if you want automatic snapshots of the GI to be created

      • Repeat every - choose snapshot frequency

      • Start from - when to start creating snapshots

      • Snapshot retention period - how many days to keep the snapshots, they will be deleted automatically afterwards (if no dependent objects exist)

  2. Enter the details of the source database:

    image-20250510-112548.png

     

    User - a Postgres user
    Password - password for the above user
    VDB password - a new password that will be applied to the above user on each VDB
    Port - port of the Postgres database
    Cluster Name - name of the postgres cluster that will be created on the source
    OS user - OS user that runs the database instance
    PostgreSQL Home Dir - location of Postgres installation on the source server. Specify the Postgres base directory, not the bin directory
    Pay attention: For this type (Live GI) the Postgres cluster does not exist yet, so you need to enter details of a cluster that you will create later

  3. Open the VDB Management window.

    image-20250421-143955.png
  4. Select the TDE. Click Create GI.

    image-20250510-113117.png
  5. Enter a Description.

    image-20250510-113216.png
  6. Click Create.
    The creation process is very fast, since only empty Postgres cluster with an empty database are created.

  7. The VDB Management window displays the Live GI that was created.

    image-20250510-113309.png
  8. Check the directory that was created on the source server. Click Info on the GI

    image-20250510-115025.png

Write down the Storage Path value - this is the “GI base directory”

  1. Under this location:

    1. create the following structure folders: PG_MAIN_VERSION/CLUSTER_NAME

    2. apply permission 750

    3. change ownership to the OS user that is used to run Postgres, usually postgres

    4. Example - given the GI base directory /main_pool/00000010, postgres version 13 and cluster name mycluster:
      mkdir -p /main_pool/00000010/13/mycluster
      chown -R postgres:postgres /main_pool/00000010/13/mycluster
      chmod -R 750 main_pool/00000010/13/mycluster

  2. Create an empty Postgres cluster
    /usr/lib/postgresql/13/bin/pg_ctl -D /main_pool/00000031/13/mycluster initdb

  3. After initializing of the Postgres cluster set following parameters in postgresql.conf under the cluster directory:

    cluster_name = 'mycluster'

    listen_addresses = 'IP or HOSTNAME'

    port = 5432

    wal_keep_size='300' – This is for deletion WALs automatically and keeping maximum 300MB of WAL files.

  4. Configure archiving of thee Postgres cluster.

    1. Create a dedicated directory under the cluster directory
      mkdir /main_pool/00000010/13/mycluster/archives

    2. Set following parameters in postgresql.conf under the cluster directory
      archive_mode = on
      archive_command = 'test ! -f /main_pool/00000010/13/mycluster/archives/%f && cp %p /main_pool/00000010/13/archives/archives/%f'

  5. Once the cluster is up and running , proceed to activate the GI. Click the Activate icon next to the GI. The Activation verifies that the new database is located fully in the required directory.

    image-20250331-085757.png
  6. Once the activation is completed, a first snapshot is created and you can proceed with VDB creation.

    image-20250510-122819.png

Modify a Live GI

  1. From the Sources screen, click the change (pencil) icon of TDE

    image-20250510-113552.png
  2. If needed - update Snapshot Policy

    image-20250510-113620.png
  3. If needed - update source database parameters

    image-20250510-113642.png
  4. To save your changes, click Modify.

Test Data Environment (TDE)

See information about a test data environment

  1. Select the test data environment.

  2. Click Test Data Environment Info.

    image-20250510-122959.png

    The Info window appears:

    image-20250510-123016.png

The info window shows the next details:

  • IP-address - IP address of the source host

  • Name - name of the TDE

  • Description - description of the TDE

  • Port - port of the source database

  • User - user in the source Postgres database

  • Version - version of the source Postgres database

  • Type - type of the GI (as explained earlier)

  • GI Name - name of the GI (may be different from the TDE name)

  • OS User - OS user that runs the source database

  • DbSID - Postgres cluster name on the source server

  • DbHomeDir - location of Postgres installation on the source server

  • DB size - size of the source database

3. To return to the main Source Management work area, click Close.

Remove a test data environment

  1. Select the test data environment.

  2. Click Remove Test Data Environment.

    image-20250510-123507.png
  3. Click Remove to confirm the deletion or Cancel to exit with deleting the test data environment.

After the database is removed, the following message appears: Test Data Environment database has been removed.

 

Related content