A Full Bundle

In the process of working on a customer migration and came up with a neat query for finding tables that don’t have a primary key:

SELECT c.oid::REGCLASS::TEXT AS table
  FROM pg_class c
  JOIN pg_namespace n ON (n.oid = c.relnamespace)
  LEFT JOIN pg_constraint p ON (p.conrelid=c.oid AND p.contype = 'p')
 WHERE c.relkind IN ('p', 'r')
   AND n.nspname NOT IN ('pglogical', 'information_schema', 'bdr')
   AND n.nspname NOT LIKE 'pg\_%'
   AND p.conrelid IS NULL;

For anyone out there that is using pglogical, this is how you figure out if there are any tables that won’t work in the default replication set.

While watching the migration, at one point I noticed a ZFS thread using 99% CPU on the host machine. It seems odd that ZFS would be CPU-bound by something, but it could be an artifact of the encrypted filesystem. I’ll have to watch the next time I dry-run the migration to see if it comes back.

I also finally ordered a GMMK Keyboard to replace my rapidly deteriorating Logitech G710. I can only deal with keys randomly not working and ghost spaces for so long, especially since there’s now about four keys that arbitrarily stop working for several strokes at a time. I ordered the GMMK customized with Kailh Box White switches that are supposed to have a slightly lower actuation force and travel than the current Cherry MX Blues I’m using.

Supposedly the G710 sometimes has bad solder points which I could theoretically fix. But oddly enough, I don’t have a spare keyboard to use while it would be out of commission for such a surgery. So this would help solve at least part of that issue.

I’ve also been experimenting with adding a bit of white rice later in the day to shore up my carb load. The entire time I’ve been on keto (over two years now), I’ve had extreme dry mouth and have basically lacked any and all energy or endurance. I suspect this has also been tied to the endless muscle spasms that have been plaguing me for the past few months as well. I was tentatively diagnosed with Peripheral Nerve Hyperexcitability, but that’s so rare, I find it hard to believe I’m not suffering from a more mundane malady that’s merely masquerading. Even Paul Saladino is leaning this direction, so I’m wondering if some people simply can’t do full keto or Carnivore for whatever reason.

Until Tomorrow