PGSQL PHRIDAY #3: What is the PostgreSQL Community To You?

PostgreSQL
Very excited to take part in my third #PGSQLPhriday blogging event, even more so because it's a topic that's quite near and dear to my heart, community. To say that I'm new to the PostgreSQL community isn't simply an understatement. Other than some online stuff, I haven't been anywhere near the PostgreSQL community. That's not for a lack of trying (multiple sessions submitted to multiple events), but so far, still just doing the online thing. So, I don't know that I'm fully qualified to discuss what, specifically, the PostgreSQL community means to me. Instead, let's talk about why you want a vibrant and strong community. I'm going to start with my qualifications to discuss community (not that anyone, anywhere, needs qualifications to take part in community, man, I dislike gatekeeping).…
Read More

Validating Backups: PGSQL Phriday #002

PostgreSQL
It's time again for the another PGSQL Phriday, this time, the question has been asked: How do you do PostgreSQL backups? Honesty up front. I'm very much just beginning my journey of learning PostgreSQL. I've been documenting that learning over here at Simple-Talk (more on the way there), including backups. For this post, I'm not going to tell you about my "experience" maintaining a PostgreSQL backup routine because, well, there isn't any. Instead, I have something else to say about backups that I learned, the hard way I might add, while working in SQL Server, that is 100% applicable to PostgreSQL. Backups Do Not Matter You heard me. In a post that's supposed to be about how you do backups, I'm telling you backups don't matter, and yeah, I'm serious.…
Read More

PGSQL Phriday #001: Two Truths and a Lie

PostgreSQL
As a part of my own journey of learning within PostgreSQL, I've decided that I'm going to take part in PGSQL Phriday as often as I can, just as a way to continue to stretch my knowledge of this platform. Along the way, hopefully, I can help you learn a little too. The topic of this first post is Two Truths and a Lie about PostgreSQL. Now, the lie could easily be that I'm in any way qualified to talk about this topic, however, I can do a little better than that. Let's start off with simple, but important information, backups: Pg_dump can go to either a straight set of SQL, or, to a compressed digital formatPg_dumpall backups can be used to restore over existing databases with dataYou can use…
Read More

AWS RDS Restore To A Point In Time

AWS, PostgreSQL, RDS
The single most important part of backups are not backups. The single most important part of backups are restores. It doesn't matter a lick if you have 100, flawless backups of your database if you can't restore one of them. So, let's get started and talk about how perform an RDS restore. RDS Restore I'm going to use the portal because I like how GUIs allow me to easily illustrate what I'm doing. However, I'll probably do another post soon on how to use the command line to do this. That is the better approach in most cases. If you connect up to a database within RDS, you get a menu, Actions: Right there, near the bottom is what we're looking for, Restore to point in time. Clicking on this…
Read More

AWS RDS Backups

AWS, PostgreSQL, RDS
One of the things I love the most about Platform as a Service when it comes to data is the fact that you get RDS backups, built in. Go to the forums. Evidently, backups are one, or more, of the following:a) insanely difficult, so no one does themb) not considered important so no one does themc) not necessary in modern systems because of X technology so no one does them Then, someone deletes a row the business wants back. Someone drops a table. Someone drops a database. Then you find that one, or more, of the following is true:a) no one has ever tried to restore from X technology and you can'tb) come to find out, X technology doesn't really do backupsc) backups are still fundamental to protecting data Enter,…
Read More

Learning PostgreSQL: The Tools

AWS, PostgreSQL, RDS
In case you don't know, I've been writing a series of articles over on Simple-Talk as I learn PostgreSQL. It's all from the point of view of a SQL Server person, expanding into a new technology. In other words, a true story. I thought I'd take a moment here on my own blog to talk about the tools I'm using and why I chose those. AWS RDS Let's establish up front, I'm lazy. Very lazy. So yeah, I'm trying to learn this new technology, but I'm going to find as many ways to use the knowledge, skills & tools I already have as I can. Now, I first started learning PostgreSQL because I wanted to learn more about how Flyway works. Further, as I also needed to learn how to…
Read More

2022 State of PostgreSQL Survey

PostgreSQL
Hello all. I know most of you are still working within SQL Server. However, a few of you are become more like me, hybrid data managers, working in more than one platform. For those currently doing a little PostgreSQL management, I'd like to point out to you the 2022 State of PostgreSQL survey. These kinds of things are great ways to understand where the technology is headed, your place on that path, and how well your organization is doing with the management of PostgreSQL compared to others. If you have a couple of minutes, please follow the link and fill out the survey. And watch this space for a lot more SQL Server content coming up. I'm rewriting my query tuning book, from scratch, so lots of stuff in my…
Read More

PostgreSQL and Azure Data Studio

PostgreSQL
As I've been working more with PostgreSQL, I've found that I'm basically pretty happy just issuing SQL commands to get work done. However, it's handy to have an actual programming environment to work from. A few reasons for this. First, and probably most important, a good programming environment has easy connections to source control. Also, you'll get, hopefully, some help with type-ahead for the code you're writing. Finally, having a visual of the stuff in your database can be handy while working on it, so a GUI is nice. I use Azure Data Studio for most of my PostgreSQL work. Azure Data Studio and PostgreSQL I'm not sure exactly when support for PostgreSQL was added. The two years I've been poking around with PostgreSQL, Azure Data Studio (ADS) has supported…
Read More

SQL Server, PostgreSQL and the Future

PostgreSQL, SQL Server
This is just a quick note to talk about the future, mine, yours and this blog. First, I'm not abandoning SQL Server. I'm actively working on a revision of the query performance tuning book (something I should be working on instead of writing this post). SQL Server is my first, and best, database love. We're not going anywhere, SQL Server and I. You can expect more posts on SQL Server, query tuning, execution plans, DevOps, community, #sqlfamily, and everything I've blogged about for the last, ooh, 14 years next month. Second, our family is growing. Just like when a family brings home a new baby, well, I'm adding another database. It doesn't mean I don't love my first database. I still do. We're just going to ALSO be talking about…
Read More

PostgreSQL Restore in Azure

Azure, PostgreSQL
I recently wrote an article about PostgreSQL restores (and by extension, backups) over on Simple-Talk. The restore process within PostgreSQL, without 3rd party involvement, can be a little tricky. However, when you are using a Platform as a Service offering, like Azure Database for PostgreSQL, things get quite a bit easier. Let's explore this just a little. Restores Come From Backups I know we all know this, but as I said in the article over on Simple-Talk, discussing backup strategy is a mistake. You should instead be discussing a restore or recovery strategy. How do you intend to get your database back? How much data are you prepared to lose? How long should a restore take? Answering these questions leads you to a Recovery Point Objective (RPO), which tells you…
Read More