I did a couple of posts previously on dumping/restoring Azure PostgreSQL databases and also using the Azure migration tool. I had to ultimately do a combo of those because of the limitations of the Azure migration tool. Getting your roles in place The Azure migration…
Category: postgresql
I wanted to figure out how big (or approximately how big) my dump file would be. In QA, I have (relatively) large dbs (compared to prod). Enter the pgstattuple extension to help me determine how much free space is in my tables. Step 1: Installing…
Warning: It appears the migration doesn’t apply perms in the database related to global roles as part of the Azure migration. https://learn.microsoft.com/en-us/azure/postgresql/migrate/migration-service/concepts-user-roles-migration-service. I will be using pg_dumpall for scripting out the perms. You can refer to my last post under dumping from command line for…
I wanted to test a migration of Azure PostgreSQL from simple to flexible. I wanted a simple db to restore onto my single server. I may not have needed to do this, but I was then curious how one would go about dumping and restoring…
My company is moving from an Azure PostgreSQL single server to a flexible server. We want to set up managed identity/Entra access instead of having roles with passwords for every person/app. In particular, we want to use Entra groups. What is Azure PostgreSQL Flex? It…
I was working on two publisher contracts at the same time. I highly recommend never doing that. One is done, though, and it’s officially published as of September 2022. Check out my database auditing book published with Apress! https://www.amazon.com/Practical-Database-Auditing-Microsoft-Server/dp/1484286332 More to come (hopefully soon) on…
Run psql in docker exec docker exec -ti NAME_OF_CONTAINER psql -U YOUR_POSTGRES_USERNAME
This requires a different image in Docker. You can’t just use the postgres image and create an extension in it. Instead, you have to use the postgis image. This image will have a database in it already setup for you to use with postgis. If…
This is a super simple way to retain the data and settings that you create and change on your PostgreSQL Docker instance. There’s a lot of talk about attaching databases after you recreate your Docker container, but I found that it’s easier to have persistent…
I used to freak out each time (and especially the first time) I upgraded pgadmin on my local computer. What happened to my saved servers list?!? Of course, I could recreate it because I have a listing of all the servers in Confluence, but ugh…