Skip to content

Commit

Permalink
Merge pull request #5663 from EnterpriseDB/release/2024-05-21a
Browse files Browse the repository at this point in the history
Release/2024-05-21a
  • Loading branch information
gvasquezvargas authored May 21, 2024
2 parents f181e28 + 442293b commit 3ab29f2
Show file tree
Hide file tree
Showing 58 changed files with 586 additions and 150 deletions.
14 changes: 7 additions & 7 deletions advocacy_docs/pg_extensions/advanced_storage_pack/using.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ This example is for an IoT thermostat that reports house temperatures and temper
```sql
CREATE TABLE iot (
thermostat_id BIGINT NOT NULL,
recordtime TIMESTAMPTZ NOT NULL,
recordtime TIME NOT NULL,
measured_temperature FLOAT4,
temperature_setting FLOAT4
) USING autocluster;
Expand All @@ -180,12 +180,12 @@ The `cols` parameter specifies the table that's clustered. In this case, `{1}` c
Populate the table with the `thermostat_id` and `recordtime` data:

```sql
INSERT INTO iot (thermostat_id, recordtime) VALUES (456, 12:01);
INSERT INTO iot (thermostat_id, recordtime) VALUES (8945, 04:55);
INSERT INTO iot (thermostat_id, recordtime) VALUES (456, 15:32);
INSERT INTO iot (thermostat_id, recordtime) VALUES (6785, 01:36);
INSERT INTO iot (thermostat_id, recordtime) VALUES (456, 19:25);
INSERT INTO iot (thermostat_id, recordtime) VALUES (5678, 03:44);
INSERT INTO iot (thermostat_id, recordtime) VALUES (456, '12:01');
INSERT INTO iot (thermostat_id, recordtime) VALUES (8945, '04:55');
INSERT INTO iot (thermostat_id, recordtime) VALUES (456, '15:32');
INSERT INTO iot (thermostat_id, recordtime) VALUES (6785, '01:36');
INSERT INTO iot (thermostat_id, recordtime) VALUES (456, '19:25');
INSERT INTO iot (thermostat_id, recordtime) VALUES (5678, '03:44');
```

When you select the data from the IoT table, you can see from the ctid location that the data with the same `thermostat_id` was clustered together:
Expand Down
4 changes: 2 additions & 2 deletions icons-pkg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"require": "./dist/flags.cjs"
},
"./edb_logos": {
"import": "./edb_logos.mjs",
"require": "./edb_logos.cjs"
"import": "./dist/edb_logos.mjs",
"require": "./dist/edb_logos.cjs"
}
},
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The following roles grant privileges within an organization.
- View and download a usage report for the whole organization and each project
- View the identity provider details

!!!noteNotes
!!! notes
- The first user in a BigAnimal organization is an organization owner and project owner of the initial project, by default.
- At least one user must be an organization owner.
!!!
Expand All @@ -58,7 +58,7 @@ The following roles grant privileges within a project:
- View and download a usage report

!!!note
At least one user must be a project owner.
At least one user must be a project owner.
!!!

- **Project editor** — This role has edit privileges to the project and can perform the following actions within the project:
Expand Down Expand Up @@ -130,6 +130,7 @@ Copy and this access key and save it in a secure location. The access key is ava

Assign some organization role or project role to this newly created machine user. For more information, see [users](#users).

!!!note
!!! note
The user management on BigAnimal's UI at project level is used to assign the project role to the machine user, and not for managing the machine users and their access key.
!!!
!!!

Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
---
title: "AWS Secrets Manager integration"
---

With BigAnimal, you can use AWS Secrets Manager. AWS Secrets Manager helps you manage, retrieve, and rotate database credentials, access keys, and other secrets throughout their lifecycle.

To create a secret manager:

1. Create a PostgreSQL cluster on the BigAnimal portal.

1. Create and save an [access key](../reference/access_key/#create-your-personal-access-key).

1. Create a secret in AWS Secrets Manager for your psql credentials.

Create the secret manager using a Lambda script or using the AWS console:

- Lambda script:

```shell
import boto3
import json

def create_secret(secret_name, username, password, database, host):
client = boto3.client('secretsmanager')

secret_string = json.dumps({
"username": username,
"password": password,
"engine": "postgresql",
"host": host,
"dbname": database,
"port": 5432
})

response = client.create_secret(
Name=secret_name,
SecretString=secret_string
)

return response
```

Using the created secret:

```shell
create_secret('mySecretName', 'myUsername', 'myPassword', 'myDatabase', 'myHost')
```

- AWS console:

1. Search for Secret Manager under Services.
1. Select **Store a new secret**.
1. On the **Choose secret type** page, select **Credentials for other databases** and provide:
- Username
- Password
- Encryption key
- Database
Provide the server address, database name and port as per the selected database engine. Select **Next**.
1. On the **Configure secret** page, provide **Secret name**. Optionally, you can provide:
- Description
- Tags
- Resource permissions
- Replicate secret
Select **Next**.
1. Optionally, on the **Configure rotation** page, provide details.
1. Review the code in different languages like: Java, JavaScript, C#, Python3, Ruby, Go, and Rust. To create the secret manager, select **Store**.

1. Create the secret in the centralized Secrets Manager for your access key.

1. Create a sample login application.

For example, using a Lambda script:

```shell
[cloudshell-user@ip-10-130-83-78 ~]$ cat lambda_connect.py
import json
import boto3
import base64
import psycopg2
region = 'us-east-1'
client = boto3.client('secretsmanager', region_name=region)
response = client.get_secret_value(
SecretId='dev/toy/demo'
)
secretDict = json.loads(response['SecretString'])
connection = psycopg2.connect(
user=secretDict['username'],
password=secretDict['password'],
host=secretDict['host'],
port=secretDict['port'],
sslmode='require',
database=secretDict['dbname'])
mycursor = connection.cursor()
create = "create table Demo0503(Toyota int)"
#sql = "INSERT into secretmgr(id,name) values (%s, %s)"
#value = (2, "Toyota_Demo")
mycursor.execute(create)
connection.commit()
```

Fetch all the rows from the database:

```shell
print(mycursor.rowcount, "record")
```

## Example

In this example, a script file has all the commands required to create a Secrets Manager rotation Lambda function, execute the rotation script, and execute the sample application.

```shell
cat gen_pass_rotate_bigani_and_secretmgr_pass.py
import os
import secrets
import string
import requests
import json
import boto3
# Get the key from an environment variable
key = os.getenv("MY_SECRET_KEY")
if not key:
raise ValueError("Missing secret key")
def generate_password(length):
alphabet = string.ascii_letters + string.digits + string.punctuation
password = ''.join(secrets.choice(alphabet) for i in range(length))
return password
# Generate a 12-character password
password = generate_password(12)
try:
lambda_func = lambda: requests.patch(
"https://portal.biganimal.com/api/v3/projects/prj_30GlIxgAyvWhtmn3/clusters/p-hxx6mp2mtw",
data=json.dumps({"password": password}),
headers={
"Content-Type": "Application/JSON",
"x-access-key": key
}
)
# Display the password
response = lambda_func()
response.raise_for_status() # Raises a HTTPError if the status is 4xx, 5xx
except requests.exceptions.RequestException as e:
print(f"Request failed: {e}")
raise
print(response.status_code)
print(response.text)
def update_password_in_secret(secret_name):
new_password = password
client = boto3.client('secretsmanager')
try:
# Get the current secret
response = client.get_secret_value(SecretId=secret_name)
secret_data = json.loads(response['SecretString'])
# Update the password field
secret_data['password'] = new_password
# Store the updated secret
update_response = client.update_secret(
SecretId=secret_name,
SecretString=json.dumps(secret_data) )
except client.exceptions.ClientError as e:
print(f"Failed to update secret: {e}")
raise
return new_password, update_response
# Usage - Run the the password update on AWS Secret Manager
try:
new_password, response = update_password_in_secret('/dev/toyota/demo')
except Exception as e:
print(f"Failed to update password in secret: {e}")
raise
```
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ You can enable in-app inbox or email notifications to get alerted when the pause

!!!note
A TDE enabled cluster, resumes only if the TDE key status is ready or available. Clusters are automatically paused if there is any issue with the TDE key. You need to resolve/give permissions to the key in your respective cloud region. Resume the cluster manually after resolving the issues.
!!!
!!!
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: BigAnimal April 2024 release notes
navTitle: April 2024
---

In April 2024 BigAnimal saw the following enhancements and bugfixes:

| Type | Description |
|------|-------------|
| Enhancement | A known issue "A PGD replication slot may fail to transition cleanly from disconnect to catch up" with EDB Postgres Distributed has been resolved. With this resolution, for example, if you were to delete a VM as part of a fault injection exercise, the replication slot will reconnect in a timely manner. |


67 changes: 36 additions & 31 deletions product_docs/docs/biganimal/release/release_notes/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,44 @@
title: BigAnimal release notes
navTitle: Release notes
navigation:
- mar_2024_rel_notes
- feb_2024_rel_notes
- jan_2024_rel_notes
- dec_2023_rel_notes
- nov_2023_rel_notes
- oct_2023_rel_notes
- sep_2023_rel_notes
- aug_2023_rel_notes
- jul_2023_rel_notes
- jun_2023_rel_notes
- may_2023_rel_notes
- apr_2023_rel_notes
- mar_2023_rel_notes
- feb_2023_rel_notes
- jan_2023_rel_notes
- 2024_04_apr_rel_notes
- 2024_03_mar_rel_notes
- 2024_02_feb_rel_notes
- 2024_01_jan_rel_notes
- 2023_12_dec_rel_notes
- 2023_11_nov_rel_notes
- 2023_10_oct_rel_notes
- 2023_09_sep_rel_notes
- 2023_08_aug_rel_notes
- 2023_07_jul_rel_notes
- 2023_06_jun_rel_notes
- 2023_05_may_rel_notes
- 2023_04_apr_rel_notes
- 2023_03_mar_rel_notes
- 2023_02_feb_rel_notes
- 2023_01_jan_rel_notes
---

The BigAnimal documentation describes the latest version of BigAnimal, including minor releases and patches. These release notes provide information on what was new in each release. For new functionality introduced in a minor or patch release, the content also indicates the release that introduced the feature.

| Month |
| 2024 |
|--------------------------------------|
| [March 2024](mar_2024_rel_notes) |
| [February 2024](feb_2024_rel_notes) |
| [January 2024](jan_2024_rel_notes) |
| [December 2023](dec_2023_rel_notes) |
| [November 2023](nov_2023_rel_notes) |
| [October 2023](oct_2023_rel_notes) |
| [September 2023](sep_2023_rel_notes) |
| [August 2023](aug_2023_rel_notes) |
| [July 2023](jul_2023_rel_notes) |
| [June 2023](jun_2023_rel_notes) |
| [May 2023](may_2023_rel_notes) |
| [April 2023](apr_2023_rel_notes) |
| [March 2023](mar_2023_rel_notes) |
| [February 2023](feb_2023_rel_notes) |
| [January 2023](jan_2023_rel_notes) |
| [April 2024](2024_04_apr_rel_notes) |
| [March 2024](2024_03_mar_rel_notes) |
| [February 2024](2024_02_feb_rel_notes) |
| [January 2024](2024_01_jan_rel_notes) |

| 2023 |
|--------------------------------------|
| [December 2023](2023_12_dec_rel_notes) |
| [November 2023](2023_11_nov_rel_notes) |
| [October 2023](2023_10_oct_rel_notes) |
| [September 2023](2023_09_sep_rel_notes)|
| [August 2023](2023_08_aug_rel_notes) |
| [July 2023](2023_07_jul_rel_notes) |
| [June 2023](2023_06_jun_rel_notes) |
| [May 2023](2023_05_may_rel_notes) |
| [April 2023](2023_04_apr_rel_notes) |
| [March 2023](2023_03_mar_rel_notes) |
| [February 2023](2023_02_feb_rel_notes) |
| [January 2023](2023_01_jan_rel_notes) |
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ To stop the management costs on the cluster, contact EDB's BigAnimal Support tea
## Delete your cluster

!!! Important
You can delete a cluster only if you have either promoted or deleted each of its faraway replicas. See [Faraway replicas](/biganimal/latest/overview/replication/).
You can delete a cluster only if you have either promoted or deleted each of its faraway replicas. See [Faraway replicas](/biganimal/latest/overview/replication/).
!!!

1. Go to the [Clusters](https://portal.biganimal.com/clusters) page in the [BigAnimal portal](https://portal.biganimal.com).
2. To delete the cluster, do one of the following:
Expand All @@ -28,8 +29,8 @@ You can restore your deleted cluster for as long as the backup is available.

When the process completes, the restored cluster is available on the [Clusters](https://portal.biganimal.com/clusters) page.

!!!note
!!! note
To restore a TDE enabled cluster, the TDE key material must match with source cluster encryption key material. In case a different key material is used the restore operation fails.

We recommend, not to enable TDE while restoring a cluster, if the source cluster is a non-TDE cluster.
!!!
!!!
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Use the properties in the `efm.properties` file to specify connection, administr
| [db.service.name](#db_service_name) | | | | Required if running the database as a service. |
| [db.bin](#db_bin) | Y | | | Directory containing the pg_controldata/pg_ctl commands such as '/usr/edb/as*nn*/bin'. |
| [db.data.dir](#db_data_dir) | Y | | | Same as the output of query 'show data_directory;' |
| [db.config.dir](#db_config_dir) | | | | Same as the output of query 'show config_file;'. Should be specified if it is not same as *db.data.dir*. |
| [db.config.dir](#db_config_dir) | | | | Same as the output of query 'show config_file;'. Specify if it's not the same as *db.data.dir*. |
| [jdbc.sslmode](#jdbc_sslmode) | Y | Y | disable | See the [note](#jdbc_note). |
| [user.email](#user_email) | | | | This value must be same for all the agents; can be left blank if using a notification script. |
| [from.email](#from_email). | | | [efm@localhost](mailto:efm@localhost) | Leave blank to use the default [efm@localhost](mailto:efm@localhost). |
Expand Down Expand Up @@ -557,7 +557,7 @@ To perform maintenance on the primary database when `primary.shutdown.as.failure

<div id="update_physical_slots_period" class="registered_link"></div>

Use the `update.physical.slots.period` property to define the slot advance frequency. When `update.physical.slots.period` is set to a positive integer value, the primary agent reads the current `restart_lsn` of the physical replication slots after every `update.physical.slots.period` seconds and sends this information with its `pg_current_wal_lsn` and `primary_slot_name` (if it is set in the postgresql.conf file) to the standbys. The physical slots must already exist on the primary for the agent to find them. If physical slots do not already exist on the standbys, standby agents create the slots and then update `restart_lsn` parameter for these slots. A non-promotable standby doesn't create new slots but updates them if they exist.
Use the `update.physical.slots.period` property to define the slot advance frequency. When `update.physical.slots.period` is set to a positive integer value, the primary agent reads the current `restart_lsn` of the physical replication slots after every `update.physical.slots.period` seconds. It sends this information with its `pg_current_wal_lsn` and `primary_slot_name` (if it's set in the `postgresql.conf` file) to the standbys. The physical slots must already exist on the primary for the agent to find them. If physical slots don't already exist on the standbys, standby agents create the slots and then update the `restart_lsn` parameter for these slots. A non-promotable standby doesn't create new slots but updates them if they exist.

Before updating the `restart_lsn` value of a slot, the agent checks to see if an `xmin` value has been set, which may happen if this was previously a primary node. If an `xmin` value has been set for the slot, the agent drops and recreates the slot before updating the `restart_lsn` value.

Expand Down
Loading

2 comments on commit 3ab29f2

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

πŸŽ‰ Published on https://edb-docs.netlify.app as production
πŸš€ Deployed on https://664cd3c6ddfe671529dd34a9--edb-docs.netlify.app

Please sign in to comment.