Skip to main content
9 votes

How to quickly test if postgres database is accessible?

Something like: pg_isready --host=192.168.79.8 --username=test --port=5432 192.168.79.8:5432 - no response Another solutions is telnet: telnet 192.168.79.8 5432 Which returns: Trying 192.168.79.8.....
Soerendip's user avatar
  • 271
6 votes

Postgresql in DevOps skills

In my opinion an Operations candidate (DevOps is a culture, not a role) should be capable to perform at least the following actions: deploy postgres backup postgres restore postgres run some psql ...
030's user avatar
  • 13.3k
6 votes
Accepted

Blue Green Deployment DB transactions management

As per Martin Flowers' definition of Blue-Green deployment The blue-green deployment approach does this by ensuring you have two production environments, as identical as possible. At any time one ...
Yasen's user avatar
  • 702
5 votes

Best practice for Postgres setup with docker-compose

First, use alpine images if possible. Second, use ENV variables for prepare database configuration. More info. Third, use /docker-entrypoint-initdb.d directory for extend image. More info. Example ...
AfsmNGhr's user avatar
  • 151
4 votes
Accepted

Can't get either Postgres permissions or PVC working in AKS

The following setup works for me. When using the subPath in volumeMounts, the permission issue is automatically addressed, as the user postgres owns the folder corresponding to the subPath. spec: ...
kca2ply's user avatar
  • 156
3 votes

Include curl commands in a PostgreSQL Docker environment

One way to use curl inside the container will be to use a custom Dockerfile to build you postgrsql container. Just use the image: postgres:12-alpine as the base image of your Dockerfile and install ...
RASOANAIVO Alindrianja's user avatar
3 votes
Accepted

Why won't InSpec admit that port 5432 is listening inside a PostgreSQL container?

You did everything right, it is the correct InSpec test and use with Docker! You encountered a bug in InSpec that is related to InSpec's netstat output parsing combination with Alpine's netstat ...
Christoph Hartmann's user avatar
2 votes

How to use port 5433 with Azure managed postgres

You can not change the port that Azure Database for PostgreSQL server uses. Connections to your Azure Database for PostgreSQL server communicate over port 5432. When you try to connect from within a ...
Ken W - Zero Networks's user avatar
2 votes
Accepted

Stolon vs CrunchyData for HA Postgresql

I ended up using stolon for its automatic leader election and fail over handling. Crunchy Data offers small building blocks so there is a lot of work to do to put them all together while stolon has a ...
Nouran S. Ahmad's user avatar
2 votes

Where does PGBouncer sit on a Kubernetes Cluster

PGBouncer is a connection pooler. So, one instance of PGBouncer should be enough in between the apps and postgres.
Auston Barboza's user avatar
2 votes

get value of default_statistics_target on postrgesql

Actually, there are two questions: Where default(100) value is declared? How can I see Stats target value before applying SET default_statistics_target=1000 Where default(100) value is declared? ...
Yasen's user avatar
  • 702
2 votes
Accepted

Autoscaling Postgres Database using Kubernetes

Yes, you can create a Postgres cluster using k8s StatefulSets. take a look at this example.
Mhm0ud's user avatar
  • 46
2 votes

Postgresql in DevOps skills

To add to 030's answer, and as a devops engineer who has had to do this a few times, learning how to set up replication and failover in an automated fashion is very important. If you're learning, ...
Peter Turner's user avatar
  • 1,560
1 vote

Docker and host IP migration times out on Postgres import

PostgreSQL has a statement_timeout setting that defines how long a query is allowed to run before it's canceled. If the import process is hitting this timeout, it could be causing the connection to ...
playwithcode's user avatar
1 vote

Is the data shared between two pods database deployment k8s

Is the data shared between those two pods of postgres images or is it possible to set it to share data? Each pod has its own filesystem; there is no sharing between pods by default. With the right ...
larsks's user avatar
  • 793
1 vote

Ansible Connecting to remote Docker container over SSH

I have found a hacky workaround for my problem. I replicated the behavior of the community.postgresql.* modules that I want to use in a bash script and execute it using the community.docker....
Tiim's user avatar
  • 21
1 vote
Accepted

What is IPC:BufferIO in managed postgresql metrics on AWS

IPC:BufferIO wait event is actually LWLock:BufferIO , starting from PostgreSQL 14 BufferIO wait event moved from LWLock wait event type to IPC wait event type , please check this commit and this ...
Mohamed Ali's user avatar
1 vote

mounting overlayfs within kubernetes POD - "cannot mount overlay read-only"

After a while I found out that I need to declare the container to have a privileged security context. Suddenly it works! spec: containers: - securityContext: privileged: true There is ...
peschü's user avatar
  • 131
1 vote

What are the best practices for sharing production Postgres access with developers?

We keep a RO clone of the important DB's. Any dev can access the basic RO clone if he's in the right dev group vpn, because the cloudsql instances are deployed in a private service net that peers ...
Ron Jarrell's user avatar
1 vote

Minimum postgresql + spring + react hardware requirements

It's hard to tell, this kind of thing comes with experience but I'm sure 4 GB of RAM and 20 GB of disk storage will be enough.
Paweł Pyra's user avatar
1 vote

Blue Green Deployment DB transactions management

As promised, here is a solution using haproxy with sticky cookies. Note, that this approach requires support on the application side (as only your application layer may know once transactions are ...
taleodor's user avatar
  • 920
1 vote

Which system user should I use to run Postgres?

What is the default user of postgresql? postgres How does hardcoding the postgres user improve security? It's not using the root user. You can use any account you like, but consistency is a ...
Phill  W.'s user avatar
  • 148
1 vote

i have questions about docker-compose

I searched for the healthcheck/postgres:alpine and I found the following repository with the Dockerfile: https://github.com/docker-library/healthcheck/blob/master/postgres/Dockerfile.alpine Assuming ...
petrchpetr's user avatar
1 vote

Planning a backup system using postgress, chef and vault

First chef runs as often as you configure it to do. Second Chef is a configuration management system and not a crontab or an orchestration system. Use chef to configure cron (that can not be not an ...
Tensibai's user avatar
  • 11.4k

Only top scored, non community-wiki answers of a minimum length are eligible