Posts

Upgrade from PostgreSQL 15 to 17 on Windows using pg_upgrade

#pg_upgrade#postgresql#windows 10#pg_dump#pg_dumpall

Overview At work I needed to upgrade from PostgreSQL from 15 to 17. The process is not that different than upgrading in Ubuntu but there were a couple of items that threw me off. Perform Backup This should be done prior to the update in case something goes wrong: CTyler@CTYLER_NB  C:\Program Files\PostgreSQL\17\bin  [08:22] ❯ & 'C:\Program Files\PostgreSQL\17\bin\pg_dumpall.exe' -p 5432 -U postgres -f D:\Backups\postgresql-ctyler_nb-20241107-1.out This was based on the documentation PostgreSQL: Documentation: 17: pg_dumpall.

Read more →

November 10, 2024

Setup Apt-Mirror on Ubuntu

#apt-mirror#apache#ubuntu#python

Notes on how to setup apt-mirror with Ubuntu 24.04

Read more →

September 13, 2024

Count Number of Lines in a Git Repository

#git#xargs#cat#wc#til

If you were ever curious how many lines of code you have in a repo.

Read more →

September 5, 2024

Get Your Work Recognized

#brag document#smart goals#career#performance review

Make sure that you document your work to get recognized at work.

Read more →

August 27, 2024

Reboot using Hugo

#github#hugo#hextra theme#pelican

Migrating away from Pelican to Hugo.

Read more →

August 24, 2024

Rebuild Pelican Source

#pelican#python#hugo#git#git submodules#pyenv#pelican-jupyter

More work than expected to get my development system to work with Pelican.

Read more →

August 11, 2024

Check for unused Indexes

#til#postgresql#index

Part of a larger PostgreSQL management article.

Read more →

December 18, 2023

Powershell Remoting

#til#powershell#remote

A couple of different ways to connect to a remote PC.

Read more →

December 4, 2023

View Code of Stored Procedure

#til#ms sql server#ms sql server management studio#mssms

I needed to see the code of a stored procedure in MS SQL Server at work so that I could create a modified query. I normally don’t use Stack Overflow much anymore but this was actually useful and well described. Using SQL Server Management Studio do the following: Go to Database -> Programmmability -> Stored Procedure. Right click on the procedure you want to view and click Modify. Be careful not to modify it when you only want to view it.

Read more →

November 28, 2023

How to List Active Connections on PostgreSQL

#til#pg_stat_activity#postgresql

How to check using a query what is actively running.

Read more →

October 17, 2023

Check for Unvalidated Database Constraints

#til#postgresql#constraints#pg_constraint#mastodon

Verify that you don’t have a constraint created without validation.

Read more →

October 10, 2023

Deprecated

#til#python#deprecated

I neat way to deprecate parts of a Python program.

Read more →

September 19, 2023

How to Read a Vim Swapfile

#til#swapfile#vim

How to read a swapfile, especially where there isn’t an reference file.

Read more →

September 12, 2023

Get Battery Status in CLI

#til#linux#battery#cat#find

How to get the battery status using standard CLI tools in Linux.

Read more →

September 12, 2023

Delete Files Older Than x Days on Linux

#til#linux#find#rm#mtime

Quickly delete files older than a certain number of days.

Read more →

September 5, 2023

How to Use a match case Statement

#til#python 3.10#match case#python

Some examples of how to use match case statement in Python.

Read more →

August 29, 2023

Vim Tips

#til#vim#pybites

Notes from the VIM Workshop from pybites

Read more →

August 22, 2023

Create Git Branch and Checkout

#til#git#branch#checkout

Create a git branch and checkout at once.

Read more →

August 15, 2023

Set Statement Timeout

#til#timeout#statement_timeout#postgresql#idle_in_transaction

Set a timeout in case you want to terminate a long running query.

Read more →

August 1, 2023

SQL Window Functions Explained

#review#Anton Zhiyanov#sql

Book review summary of Anton’s SQL Window Functions.

Read more →

June 10, 2023

Escape Keys using psycopg2

#til#psycopg2#python#postgresql

Making sure that using % in PostgreSQL works with psycopg2.

Read more →

June 2, 2023

Setup Python Package to use with Pipx

#til#python#pipx#pyproject#flit

Setting up your Python project to work with pipx and pyproject.toml

Read more →

May 26, 2023

Prune Docker Images

#til#docker#prune#images

Remove images that are not in use.

Read more →

April 21, 2023

Clear Highlighting in Vim

#til#vim#highlighting

Clearing highlighting after performing a search for an example.

Read more →

April 14, 2023

Inject Packages in pipx

#pipx#visidata#psycopg2-binary

Add packages to an existing virtual environment.

Read more →

April 7, 2023

Find and Replace in Vim

#til#vim#find#replace#substitute

Different ways to find and replace items using vim.

Read more →

March 24, 2023

Include Schema in psycopg2 Connection String

#til#postgresql#psycopg2#sqlalchemy

Include schema in PostgreSQL connection string.

Read more →

December 19, 2022

Using Rich Inspect to Interrogate Python Objects

#til#python#rich#inspect

Using Rich can help format an object in the REPL.

Read more →

November 13, 2022

Weather Project - PyPi

#python#project

Setup PyPi with an empty project to lock in the project name.

Read more →

August 11, 2022

Weather Project

#python#project

Create a simple weather project to document how to add projects to PyPi and to aid with data analysis.

Read more →

July 19, 2022

Reuven Lerner's Object-orient Python

#training#Reuven Lerner#oop#python#review

Review of Reuven’s OOP Python self pace course.

Read more →

January 8, 2022