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 ...
  • 12.8k
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 ...
  • 151
5 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 ...
  • 582
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 ...
3 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: ...
  • 146
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 ...
3 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.....
  • 171
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, ...
  • 1,366
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 ...
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 ...
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.
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? ...
  • 582
2 votes
Accepted

Autoscaling Postgres Database using Kubernetes

Yes, you can create a Postgres cluster using k8s StatefulSets. take a look at this example.
  • 46
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 ...
  • 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 ...
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.
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 ...
  • 787
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 ...
  • 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 ...
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 ...
  • 11.1k

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