Posts by David Rader
Author: David Rader
Relocatable PG RPMs

Feed: Planet PostgreSQL. Relocatable PostgreSQL RPMs – You asked and we delivered!In our years of dealing with PostgreSQL users, one of the main gripes they have with PostgreSQL is not a missing feature or capability but rather it is the fact that the provided rpms are non relocatable rpms. The reasons for wanting relocatable rpms are many including the company they work for has specific standards or they are installing in a lab with other installations and they want to keep their install separate or they just simple want to place things in a more logical/accessible place. Before now, the ... Read More
Holy Easy PostgreSQL deployment

Feed: Planet PostgreSQL. Holy Easy PostgreSQL deployment!In case you missed it, the BigSQL team released an awesome package manager for installing and configuring PostgreSQL and many related, useful components. The package manager can be found here: https://www.bigsql.org/package-manager.jsp. Playfully named pgc, for ‘pretty good command line’, pgc is a utility similar to yum or apt-get that allows you to install, configure, update and manage Postgres related components including foreign data wrappers, stored procedure languages, connectors, devops tools, HA tools and monitoring tools. Common uses: Provision Postgres (9.2 through 9.6, including multiple versions on same server) Installing pgBouncer, Backrest, and other community projects ... Read More
PostgreSQL Replication Checklist

Feed: Planet PostgreSQL. Replication is a key part of creating an “Enterprise” Postgres deployment, to support high availability, failover, disaster recovery, or scale-out queries.Built-in streaming replication was added to PostgreSQL in version 9.0, but the Postgres community has had a number of trigger based replication options for many years, with the big 3 being Slony-I, Londsite, and Bucardo (we’re biased towards Slony-I with it’s high performance C-language triggers — and not just because of the cute slonik logo or that the original author works at OpenSCG). And a whole new generation of logical replication has been introduced in the pglogical project. How do you ... Read More
Improve PostgreSQL on Windows performance by 100%

Feed: Planet PostgreSQL. It sounds like click-bait, or one of those late night TV promotions – “Improve your database performance by 100% – by changing just this one setting!” But in this case, it’s true – you can drastically improve PostgreSQL on Windows performance by changing one configuration setting – and we made this the default in our Postgres by BigSQL distribution for 9.2 thru 9.6.tl;dr – if you have high query load, change “update_process_title” to ‘off’ on Windows, and get 100% more throughput. Performance Improvement by turning off update_process_title Most Postgres DBA’s already know that they need to tune ... Read More
Read environment variables from PostgreSQL using plpython

Feed: Planet PostgreSQL. Sometimes in your PostgreSQL code you want to read an environment variable – whether to get the input file location for a data load, or check that the postgres user has the right path set, or verify that the TDSDUMP environment variable is set when configuring the tds_fdw to connect to SQL Server. Here’s a plpython based function that will do just that (or the gist):create extension plpythonu;
create type py_environ_type as (name text, value text);
create or replace function py_environ(name varchar DEFAULT NULL)
returns setof py_environ_type
as $$
import os
aev = []
if name is ... Read More
Recent Comments