Daily Post Image from Upsplash

September: 11th

2024

PGRX

Going to spend a decent amount of the time going through the pgrx documentation and notes, doing my best to build out a simple extension and then make minor improvements upon it. The command to start up a pgrx session is:

cd ./apps/kilobase/
cargo pgrx run

We want to go ahead and shift this over to a nx run command.


"pgrx": {
    "executor": "nx:run-commands",
    "options": {
        "cwd": "apps/kilobase",
        "commands": [
          
          "cargo pgrx run"
        ],
        "parallel": false
    }
}

This happens to run postgres on port 28815 or sometimes another random port, thus I think we can update the command to pass the default port of 5432. Actually nevermind, I like their system of having the base port be 28800 and then the final number representing the different postgres versions, so 28816 is postgres 16. Replacing this system or making any changes would not be helpful, instead we could just run a test bouncer on 5432 and then have it route to the other instances.

Okay after setting up the dev and testing environment, we can begin the base production pipeline! I am thinking that we focus on getting the image deployed into the docker hub and then we can go back and look for optimizations. Furthermore, I know the supabase base image is both x86 and aarm, but for now, we will just focus on the x86 deployment. This does mean that there might be some issues test casing on the m1 mac because we would not be supporting the aarm version of kilobase but the m1 can still help with debugging and the dev cycle.

I just realized that the default postgres that is on my WSL is v14, which means we need to make adjustments to our code, since we will be only supporting the version 15, the supabase version. Once supabase releases a base 16 version of their aio postgres, we can come back around and update this library for that.

Under the toml, we will go ahead and remove the other versions of postgres.


[features]
default = ["pg15"]
pg12 = ["pgrx/pg12", "pgrx-tests/pg12" ]
pg13 = ["pgrx/pg13", "pgrx-tests/pg13" ]
pg14 = ["pgrx/pg14", "pgrx-tests/pg14" ]
pg15 = ["pgrx/pg15", "pgrx-tests/pg15" ]
pg16 = ["pgrx/pg16", "pgrx-tests/pg16" ]
pg17 = ["pgrx/pg17", "pgrx-tests/pg17" ]
pg_test = []

and now the new features toml will be just pg15.


[features]
default = ["pg15"]
pg15 = ["pgrx/pg15", "pgrx-tests/pg15" ]
pg_test = []

Afterwards, we will go ahead and make sure that we are running postgres 15, with the pg_config returning the postgres 15 headers. To make sure your postgres15 is ready, go ahead and run this command:

/usr/lib/postgresql/15/bin/pg_config --version

Granted it might be located in a different location, this was the location for me.

2023

  • 6:30am - Preparing the morning minutes and general stand-in protocols, honestly I forget that I am muted way too long during them anyhow, should just ask if I am needed before I stay in the call.
  • 11:00am - Excited to see a quick surge in TSLA stock value, I am waiting to sell about 500 shares for $270/$275 each, so I can turn around and sell puts against TSLA.
  • 1:00pm - Meetings went great so far, but there are ways
  • 10:37pm - Fixing up the parcel packager and it looks like the Yorha UI Widget is nearing production level, I just need to test case a couple integrations from a couple older widgets.

Quote

The winner ain’t the one with the fastest car it’s the one who refuses to lose. — Dale Earnhardt


Tasks

  • [ ]