Infrastructure at your Service

Tag

PostgreSQL Archives - Page 3 of 39 - Blog dbi services

Open source Team

Pass a variable to a trigger in PostgreSQL

By | Postgres | 3 Comments

By Franck Pachot . With Oracle there are many ways to set a state in the session: context variables, set with DBMS_SESSION.SET_CONTEXT and retrieved with SYS_CONTEXT, or package global variables, or global or private temporary tables with ON COMMIT PRESERVE ROWS,… How would you do it in PostgreSQL? I’m taking an example from a Yugabyte slack question, as Yugabyte SQL layer is the PostgreSQL one. CREATE TABLE employees ( employee_no integer PRIMARY KEY, name text,…

Read More
Daniel Westermann

temBoard on SLES15 – 2 – The agent

By | Database Administration & Monitoring | No Comments

In the last post we’ve installed the temBoard repository and the UI. As this alone is not so much fun, we’ll be installing the temBoard agent on another SLES 15 machine in this post. We’ll end up with one PostgreSQL instance registered in the temBoard repository and this instance is constantly monitored. With the repository and the UI we had the requirement to use Python 2.7, but this is not anymore required for the temBoard…

Read More
Daniel Westermann

temBoard on SLES15 – 1 – The WebUI

By | Database Administration & Monitoring | No Comments

During our last SwissPUG online meeting there was a presentation about monitoring PostgreSQL with temBoard. A question that came up afterwards was: How to install that on SLES 15 as there are only packages for Debian and CentOS/RHEL. As temBoard is written in Python you can also install it using pip. That requires a bit more work compared to the package method, but it is perfectly fine. The only downside (but this is true for…

Read More
Daniel Westermann

PostgreSQL 14: LZ4 compression for TOAST

By | Database Administration & Monitoring | No Comments

In PostgreSQL a row or tuple can not span multiple pages (a page is typically 8kB), but of course you can store larger rows and PostgreSQL brakes and compresses these rows into smaller chunks by using a technique called TOAST. Once your table contains a toast-able data type a so-called toast table is created automatically. Up to PostgreSQL 13 you had no choice how the data is compressed, but a recent commit brings the option…

Read More
Daniel Westermann

Getting started with the Zalando Operator for PostgreSQL

By | Database Administration & Monitoring | No Comments

In the previous posts (Rancher, up and running, on EC2 – 1 – One node, Rancher, up and running, on EC2 – 2 – Three nodes, Rancher, up and running, on EC2 – 3 – Rancher setup, Rancher on SLES 15 as a demo environment, and Deploying a Kubernetes cluster on EC2 with Rancher) it was all about deploying a Kubernetes cluster and getting Rancher up and running. In this post we’ll use one of…

Read More
Open source Team

AWS: PostgreSQL on Graviton2 with newer GCC

By | AWS, Postgres | 8 Comments

By Franck Pachot . In the previous post I have run PostgreSQL on AWS m6gd.2xlarge (ARM Graviton2 processor). I didn’t precise the compilation option and this post will give more details following this feedback: @FranckPachot thanks for sharing the results. Our own testing showed similar perf when using the default gcc7. However, with newer compiler and use of LSE, the graviton2 would provide higher performance : https://t.co/x9OgFqiPPy — NB (@N_B__N_B) March 9, 2021 First, the…

Read More
Open source Team

AWS: PostgreSQL on Graviton2

By | AWS, Postgres | No Comments

By Franck Pachot . On the AWS free tier, you can run a t2.micro instance for 750 hours per month during the first 12 month after sign-up date. And currently, until June 2021, you can also run a T4g.micro. But be careful, when the free trial ends, or if your usage exceeds the free trial restrictions, you’ll pay the standard pay-as-you-go rates. This is a good occasion to test the Graviton2 ARM processors, and you…

Read More
Daniel Westermann

Be careful with prepared transactions in PostgreSQL

By | Database Administration & Monitoring | No Comments

PostgreSQL gives you the possibility for two-phase commit. You’ll might need that if you want an atomic distributed commit. If you check the PostgreSQL documentation there is a clear warning about using these kind of transactions: “Unless you’re writing a transaction manager, you probably shouldn’t be using PREPARE TRANSACTION”. If you really need to use them, you need to be very careful, that prepared transactions are committed or rollback-ed as soon as possible. In other…

Read More
Daniel Westermann

[Data]nymizer – Data anonymizer for PostgreSQL

By | Database Administration & Monitoring | No Comments

Often there is the requirement to populate a test or development database with data from production, but this comes with a risk: Do you really want, that developers or testers have access to sensitive data? In a lot of companies this might not be an issue, but for others, sensitive data must not be available to any other database than production. In Oracle there is Data Masking but there is nothing in Community PostgreSQL which…

Read More
Daniel Westermann

8000 PostgreSQL clusters on one host?

By | AWS, Database Administration & Monitoring | No Comments

Coming back to the last post: 8000 databases in one PostgreSQL cluster?. As we’ve seen this is doable but comes with a lot of pain points. Another solution for this kind of requirement would be to host 8000 PostgreSQL clusters on one host. Again, I am not saying this is something you should do, and again, this is not how it finally will be implemented. This is more about if you can do it, and…

Read More