Monday, 30 September 2024

Filled under:

 It looks like the vendor replied on August 27th with some details related to the information I shared with them last Friday. The case remained unacknowledged on our end. I've responded to them today and provided further details to move things forward.

Posted By Nikhil19:53

Friday, 27 September 2024

Filled under:

 





Posted By Nikhil20:14
Filled under:




Posted By Nikhil20:12

Thursday, 26 September 2024

Filled under:

#!/bin/bash


# Variables

DB_NAME="your_database_name"           # Replace with your PostgreSQL database name

DB_USER="your_db_user"                 # Replace with the PostgreSQL user

OUTPUT_FILE="/path/to/flat_file.log"   # Define the path to the flat file

HOST="localhost"                       # Hostname of the PostgreSQL server, adjust if necessary

PORT="5432"                            # Port for PostgreSQL (default: 5432)


# Date and time format

DATE=$(date '+%Y-%m-%d')

TIME=$(date '+%H:%M:%S')


# Capture the database size using psql

DB_SIZE=$(psql -U $DB_USER -h $HOST -p $PORT -d $DB_NAME -t -c "SELECT pg_size_pretty(pg_database_size('$DB_NAME'));" | tr -d ' ')


# Check if DB_SIZE is not empty or null

if [[ -z "$DB_SIZE" ]]; then

    echo "[$DATE $TIME] ERROR: Could not fetch the database size" >> $OUTPUT_FILE

else

    # Write date, time, and size to the output file

    echo "[$DATE $TIME] Database: $DB_NAME Size: $DB_SIZE" >> $OUTPUT_FILE

fi


Posted By Nikhil19:16
Filled under:

 I've noticed that the password file for our database has been changing weekly. I'm reaching out to see if there is a specific process or reason for these changes. While I'm not certain if these modifications were made intentionally, they are causing the standby database to fall out of sync and triggering alerts related to the database being down.

If there’s a procedure in place that requires these updates, please let me know. Understanding the context would be really helpful in addressing the alerts and ensuring everything remains stable.

Posted By Nikhil19:00

Wednesday, 25 September 2024

a

Filled under:

 wanted to provide a quick handover regarding the recent database incident.

Incident Summary

  • The database was in a starting state on the leader site, and the standby was not in sync.
  • We engaged the vendor via a call, and they requested the logs, which have already been uploaded.

Current Actions

  • The instance has been restarted, and the new leader is [New Leader Name].
  • The rebuild of the other site is currently in progress.
  • We have decided to stop the old leader, [Old Leader Name], and will not restart it.

Next Steps

  • I raised a separate case with the vendor to investigate the following:
    • Database inflation
    • Possible solutions for out-of-sync issues at specific times
    • Checkpointing messages noted in the log file

Please let me know if you need any further information.

Posted By Nikhil22:42
Filled under:

 Request for Support: Investigation of Rapid Database Growth and Checkpoint Issues

Dear [Vendor's Support Team/Specific Contact Name],

I hope this message finds you well. We are reaching out to seek your expertise regarding some issues we've been experiencing with our PostgreSQL database that require further investigation.

Issue Overview

We have observed that our PostgreSQL database has been growing rapidly, which has raised our concerns. Our initial suspicion points towards potential tempfile usage or table bloat, but we would appreciate your guidance on identifying all possible causes for this growth and the best practices to mitigate it.

Specific Observations

  1. Rapid Database Growth:

    • The database size has increased significantly in a short period. We are particularly interested in understanding the contributing factors, including:
      • Tempfile creation
      • Table bloat (especially in frequently updated tables)
      • Large transactions or queries that might be creating excessive temporary data
  2. Frequent Checkpoints:

    • We have also noticed that the database experiences a higher number of checkpoints at specific times, which seems to coincide with periods when the database goes out of sync temporarily. We would like to understand:
      • The relationship between checkpoint frequency and database performance
      • Potential configuration adjustments to optimize checkpoint settings
      • Best practices for maintaining database consistency during high-load scenarios

Request for Support

We would greatly appreciate your insights into the following:

  • Possible reasons behind the rapid growth of our database.
  • Recommendations for monitoring and addressing tempfiles and bloat.
  • Guidance on configuring checkpoint settings to minimize disruption and ensure data synchronization.
  • Any additional best practices you might suggest for maintaining overall database health.

We look forward to your advice and appreciate your support in helping us resolve these issues. Please let us know if you need any specific logs or metrics from our side to assist in the investigation.

Thank you for your attention to this matter.

Posted By Nikhil21:48

Tuesday, 24 September 2024

Filled under:

 ChatGPT 4o mini

Posted By Nikhil19:59

Thursday, 19 September 2024

Filled under:

 We received an alert indicating that the filesystem threshold was reached. The base directory and database sizes are large, but currently, we are below the threshold, so no action is needed at this time. The pg_wal has been drained as the replica database is now in sync.

I've opened a case with the vendor to explore precautionary measures and potential reasons for this issue

Posted By Nikhil21:11
Filled under:

 4o mini

Posted By Nikhil19:51
Filled under:

 ChatGPT 4o mini

Posted By Nikhil18:17