PostgreSQL and Greenplum Database Monitoring and Administration Queries
This guide provieds a comprehensive collection of SQL queries for monitoring and managing PostgreSQL and Greenlpum databases, covering session analysis, lock investigation, resource management, and metadata operations.
Active Connection Analysis
Monitor current client connections and their status:
-- Count active connections excluding curren ...
Posted on Mon, 28 Sep 2026 16:41:53 +0000 by boogybren
Deploying Kong Gateway on Kubernetes with PostgreSQL
1. Verify Helm Installatino
$ helm version
version.BuildInfo{
Version:"v3.8.2",
GitCommit:"6e3701edea09e5d55a8ca2aae03a68917630e91b",
GitTreeState:"clean",
GoVersion:"go1.17.5"
}
2. Configure Kong Helm Chart
Donwload the Kong Helm chart and modify the values.yaml:
databaseConfig:
type: "po ...
Posted on Fri, 25 Sep 2026 16:52:41 +0000 by pneudralics
Configuring PostgreSQL, PostGIS, and QGIS for Geospatial Applications
Download the necessary software:
PostgreSQL 15 installer
PostGIS extension installer
Installing PostgreSQL
Run the PostgreSQL installer and follow the default installation steps, modifying the installation directory if needed.
Environment Variable Configuration
Access the system environment variables via System Properties > Advanced > E ...
Posted on Wed, 23 Sep 2026 16:21:10 +0000 by maliary
Understanding PostgreSQL Configuration Parameters via pg_settings
PostgreSQL configuration parameters control database behavior and performance. These settings are categorized based on how changes take effect.
Parameter Context Types
Context
Description
internal
Read-only parameters compiled into the server or set during initialization.
postmaster
Requires a server restart to apply changes.
sighup
...
Posted on Sun, 13 Sep 2026 16:03:35 +0000 by interpim
Comprehensive Guide to BenchmarkSQL Database Benchmarking Tool
BenchmarkSQL is a JDBC-based database benchmarking tool that incorporates TPC-C test scripts and supports multiple databases including PostgreSQL, Oracle, and MySQL. This guide covers installation, configuration, and execution of TPC-C benchmarks using BenchmarkSQL on CentOS 7.
1. Prerequisites
Operating System: CentOS 7
Java: BenchmarkSQL is ...
Posted on Fri, 04 Sep 2026 16:49:14 +0000 by EcLip$e
Installing and Using the dblink Extension in PostgreSQL and Greenplum
The dblink extension allows a PostgreSQL database to interact with a remote PostgreSQL database.
Prerequisites and Installation
To use dblink, you must compile and install it from the PostgreSQL source code. 1. Navigate to the contrib/dblink directory within your PostgreSQL source code.
2. Compile the extension using make.
3. Install it with ma ...
Posted on Fri, 28 Aug 2026 16:42:23 +0000 by nowaydown1
Database Time Function Reference Across Different SQL Dialects
Implementation Setup
The solution uses a scripting platform with JSON formatting capabilities. The core functionality involves converting structured data into a readable JSON format for easy reference.
function transformData(inputPayload) {
var jsonObject = parseInput(inputPayload);
var formattedResult = JSON.stringify(jsonObject, null, ...
Posted on Fri, 28 Aug 2026 16:16:11 +0000 by Scottya
Implementing a Custom Vector Type for PostgreSQL with pgrx
Defining the Vector Structure
Our goal is to enable SQL statements like:
CREATE TABLE embeddings (embedding vector(3));
We start by defining a Rust struct that wraps a vector of floating-point numbers:
#[derive(Debug, serde::Deserialize, serde::Serialize)]
#[serde(transparent)]
pub struct VectorData {
components: Vec<f64>,
}
</f6 ...
Posted on Tue, 25 Aug 2026 16:51:34 +0000 by mjohnson025
PostgreSQL Role Management: Users, Groups, and Permissions
In PostgreSQL, every account that can connect to the server is represented by a role. A role can act as a single user, a collection of users, or even a template for other roles. Understanding how to create, configure, and secure roles is essential for maintaining a safe and well-organized database environment.
Role Attributes
When is a concise ...
Posted on Mon, 17 Aug 2026 16:40:52 +0000 by olm475
Automated Database Backup System
Scheduled File Upload Script client.py
#!/usr/bin/env python
import os
import time
from time import sleep
from socket import *
HOST = '10.239.44.242'
PORT = 21567
BUFSIZ = 4096
ADDR = (HOST, PORT)
tcpCliSock = socket(AF_INET, SOCK_STREAM)
tcpCliSock.connect(ADDR)
while 1:
sleep(1)
day_date = time.strftime("%Y%m%d",time.loca ...
Posted on Fri, 14 Aug 2026 16:10:24 +0000 by JoCitizen