Infrastructure at your Service

Category

Postgres

Franck Pachot

See you on Polywork (an new LinkedIn?)

By | AWS, Database Administration & Monitoring, Kubernetes, NoSQL, Oracle, Postgres | No Comments

By Franck Pachot . I have published 105 additional blog posts here since the 500th one https://blog.dbi-services.com/rollback-to-savepoint/ that I have written on my come back to dbi-services. On Oracle Database, of course, other databases as well, on clouds (OCI and AWS mainly, with a look at GCP and Azure). But also with some thoughts on the rise of the “scale-out” obsession of NoSQL. And, because I’m convinced that consistency, referential integrity, and SQL is a…

Read More
Franck Pachot

PostgreSQL on Oracle free tier ARM

By | Oracle, Postgres | 4 Comments

By Franck Pachot . This follows the previous post about the Oracle Cloud ARM compute shape just announced on May 25th. The processor is ARM v8.2 with LSE (atomic instructions) and PostgreSQL can benefit from it (see Dramatical Effect of LSE Instructions for PostgreSQL on Graviton2 Instances). I have installed GCC 11 in the previous post, on a Oracle Linux 7.9 image with comes with GCC 7. If you installed the Ubuntu 20.4 image, you…

Read More
Franck Pachot

PostgreSQL on AWS Graviton2: CFLAGS

By | AWS, Postgres | No Comments

By Franck Pachot . In a previous post I’ve compiled PostgreSQL with GCC 7 and GCC 11 with the default options and checked that the ARM v8.2 features were used. However it may not be so simple: PostgreSQL ./configure defines gcc flags to produce a binary that is compatible with older versions of ARM. This means that it may not use the LSE feature introduced in ARM v8.1 With this, the default compilation (-march=armv8-a) doesn’t…

Read More
Franck Pachot

Delphix and upgrading the clones (Oracle)

By | Postgres | No Comments

By Franck Pachot . Delphix is a tool for easy cloning of databases. The idea is that all is automated: the user can create a clone, rewind or refresh it with one click. However, I was suprised that the following common scenario is not managed by the Delphix engine: You clone from production, say Oracle 12c You upgrade the clone, say Oracle 19c You test there You refresh the clone from production, obviously being back…

Read More
Franck Pachot

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
Franck Pachot

K8s on Windows/VirtualBox

By | Kubernetes, Postgres | No Comments

By Franck Pachot . This is a little demo, easy to copy-paste, if you want to play with Kubernetes on your laptop. And, not a simple “Hello World” but a real database running here, able to scale up and down with full availability. Install Virtualbox I use Oracle VirtuaBox because I’m a big fan of Oracle products, especially when they are good and free. However, you can use Hyper-V (then just skip this paragraph and…

Read More
Franck Pachot

Should CPU-intensive logic be done in the DB or in application server?

By | Cloud, Postgres | No Comments

By Franck Pachot . Should CPU-intensive logic be done in the DB or in application server? Here was a answer found in Reddit: Comment from discussion xpiv’s comment from discussion "Should CPU-intensive logic be done in the DB or in application server?". Reducing the CPU usage on the database server is a major cost saver with commercial databases, like Oracle Enterprise Edition where you pay license per core. But even in Open Source, on-premises or…

Read More
Franck Pachot

Foreign Keys in MySQL, SQL, NoSQL, NewSQL

By | MySQL, Oracle, Postgres | No Comments

By Franck Pachot . In the NoSQL times, it was common to hear thinks like “SQL is bad”, “joins are bad”, “foreign keys are bad”. Just because people didn’t know how to use them, or they were running on a database system with a poor implementation of it. MySQL was very popular because easy to install, but lacking on many optimization features that you find in other open source or commercial databases. Sometimes, I even…

Read More
Franck Pachot

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
Franck Pachot

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