Infrastructure at your Service

All Posts By

Daniel Westermann

Daniel Westermann

Some thoughts about working with/on AWS

By | AWS, Database Administration & Monitoring | One Comment

In the last year working with/on AWS has become an almost daily task in my life as a consultant and trainer. From a trainer perspective there is not much to say about it because we use a very limited amount of services (EC2, mostly) and we have a limited amount of trainers that use the platform to deliver our trainings. When the amount of services you use is small and the amount of people managing…

Read More
Daniel Westermann

Rapid PostgreSQL cloning using AWS EBS snapshots

By | AWS, Cloud, Database Administration & Monitoring | No Comments

When you go for AWS EC2 instances to host your PostgreSQL deployments and you want to rapidly clone PostgreSQL instances for development or testing purposes you can make use of AWS EBS snapshots. In this post we’ll look at how you can quickly spin up EC2 instances that use these snapshots as a base for new PostgreSQL clusters. Although we’ll be using the AWS console to show how this can be done you should use…

Read More
Daniel Westermann

PostgreSQL 13 – Autovacuum can now be triggered based on inserts

By | Database Administration & Monitoring | No Comments

A common issue with insert only tables in PostgreSQL is, that autovacuum well never kick in as the formula for autovacuum considers obsoleted tuples since the last vacuum but not the number of inserted tuples. Because of this you usually run a manual vacuum when a table is bulk loaded right after the load or you schedule regular vacuums for tables you know are insert only. PostgreSQL 13 will finally solve that issue because autovacuum…

Read More
Daniel Westermann

Using AWS Storage Gateway as a backup target for PostgreSQL – Cached volume gateway

By | Database Administration & Monitoring | No Comments

In the last post we had a look on how you can use AWS Storage Gateway as File gateway to store your PostgreSQL backups safely offsite on AWS S3. Another method of doing that would be to use “Cached Volume gateway” instead of the File gateway we used in the last post. The volume gateways does not provide access via NFS or SMB but does provide a volume over iSCSI and the on-prem machines will…

Read More
Daniel Westermann

Using AWS Storage Gateway as a backup target for PostgreSQL

By | Cloud, Database Administration & Monitoring | No Comments

In the last post we had a quick look at AWS Kinesis data streams and how you can push data to AWS S3 using AWS Firehose. Another great AWS service is AWS Storage Gateway and in this post we’ll use that to push our PostgreSQL backups to AWS. The primary usage of AWS Storage Gateway is to extend you local storage to AWS so that you do not have to extend your local storage on…

Read More
Daniel Westermann

Sending PostgreSQL data to AWS S3 by using AWS Kinesis data streams

By | Cloud, Database Administration & Monitoring | No Comments

Before we really start with this post: This is just an experiment and you should not implement it like this in real life. The goal of this post is just to show what is possible and I am not saying that you should do it (the way it is implemented here will be catastrophic for your database performance and it is not really secure). As I am currently exploring a lot of AWS services I…

Read More
Daniel Westermann

PostgreSQL message levels

By | Database Administration & Monitoring | No Comments

When you start to write business logic in the database by using triggers or functions/procedures you usually want to report messages to the user that runs your code or you want to include some debugging output for your own. In Oracle a lot of people use the dbms_output package to return simple messages to the user’s screen. In PostgreSQL you can do the same but of course the way it is implemented is not the…

Read More
Daniel Westermann

Migrating an Oracle instance to AWS Aurora – 4 – AWS DMS Change Data Capture (CDC)

By | Database Administration & Monitoring | No Comments

This is the last post in this little series about migrating on Oracle instance to AWS Aurora with PostgreSQL compatibility. For the previous one you can check here, here and here. In this post we’ll look at how you can configure change data capture so that changes on the source Oracle instance are automatically replicated to the target Aurora instance. In a real life migration this is what you probably need as long down times…

Read More
Daniel Westermann

Migrating an Oracle instance to AWS Aurora – 3 – Data replication with AWS DMS

By | Database Administration & Monitoring | No Comments

If you followed the last two posts in this little series (here and here) this is the current status of this demo migration project: We have converted the Oracle SH schema and applied it to the target AWS Aurora with PostgreSQL compatibility instance. This worked quite well but a few objects (mostly PL/SQL procedures) would need manual actions. The next and final step is to replicate the data from Oracle to the Aurora instance using…

Read More