Upgrading Postgres 10.3 to 11.1 Using Homebrew

February 15th, 2019

PostgreSQL.jpg

It's time to make sure that my laptop has the latest version of PostgreSQL, as I was reading that they were making big strides in the windowing functions in postgreSQL 11. And with Homebrew 2.0 out, it made sense to just write it all down again, just so that I have it for reference.

The process isn't bad... dump all the databases into one file, stop the server, update Homebrew, update postgres. This gets us to the point that we are ready to rebuild the new database:

  $ pg_dumpall > dump.sql
  $ brew services stop postgresql
  $ brew update
  $ brew upgrade postgres

Now we need to move out the old database data, create a new structure, and restart the service:

  $ cd /usr/local/var
  $ mv postgres postgres.old
  $ initdb -D /usr/local/var/postgres
  $ brew services start postgresql

You then need to go back to the directory of the first command - the one where you dumped the databases, and reload them all:

  $ psql -d postgres -f dump.sql

and at this point, everything should be back and running:

  $ psql --version
  psql (PostgreSQL) 11.1
  $ psql -l
                                      List of databases
      Name     | Owner | Encoding  |    Collate     |     Ctype      |  Access privileges
  -------------+-------+-----------+----------------+----------------+---------------------
   health      | drbob | SQL_ASCII | en_US.US-ASCII | en_US.US-ASCII |
   inventory   | drbob | SQL_ASCII | en_US.US-ASCII | en_US.US-ASCII |
   northhollow | drbob | SQL_ASCII | en_US.US-ASCII | en_US.US-ASCII |
   postgres    | drbob | SQL_ASCII | en_US.US-ASCII | en_US.US-ASCII |
   template0   | drbob | SQL_ASCII | en_US.US-ASCII | en_US.US-ASCII | =c/drbob           +
               |       |           |                |                | drbob=CTc/drbob
   template1   | drbob | SQL_ASCII | en_US.US-ASCII | en_US.US-ASCII | drbob=CTc/drbob    +
               |       |           |                |                | =c/drbob           +
               |       |           |                |                | _postgres=CTc/drbob+
               |       |           |                |                | postgres=CTc/drbob
   test        | drbob | SQL_ASCII | en_US.US-ASCII | en_US.US-ASCII |
  (7 rows)

At this point you can remove the old data:

  $ rm -rf /usr/local/var/postgres.old
  $ rm dump.sql

and everything is updated. You can then use any of the normal tools, including the Apache/PHP/Postgres that Apple makes available, and Postico - a great GUI client.

Oracle Drops JDK 10

February 14th, 2019

java-logo-thumb.png

I've been rebuilding a new MacBook Pro laptop from work because the security tools we use at The Shop don't allow Migration Assistant to work - which is sad, because it works so well under normal circumstances, but water under the bridge, and I have to reinstall a lot of things on the box - as if from scratch.

Because of Clojure, one of the things I have to make sure to install is the latest JDK. Actually, I need to install all the latest JDKs - 1.8, 9, 10, and 11. And then I have a simple little tool for changing the JDK version that I want to be using. Simple. Easy.

When I last went to upgrade the versions of the JDKs, I found that Oracle has dropped support for JDK 9. I had heard a lot of talk about how JDK 9 wasn't really doing well because of some of the design decisions... and so this wasn't really a surprise, but it was unexpected to see that Oracle had pulled it from the Downloads. But OK... they didn't want people using it, so they pulled it.

Today, I saw that Oracle had pulled JDK 10 as well. Now that was a bit of a surprise. I know that it wasn't as popular with the Clojure community as JDK 1.8, but to see a second abandoned JDK version... well... that's a heck of a realization from Oracle. It's not good... it's causing us too much to support it... drop it.

So I have JDK 1.8 and 11 on the new laptop, even though on my personal machine I still have the last available JDK 10. But at some point, that will have to be thinned out because it just won't be supported. Wild.

Hats off to the JDK 1.8 guys - You've made a heck of a product.

Google Docs has a New Look

February 14th, 2019

Google Docs

This morning I noticed that Google Docs had done a little bit of an upgrade to the style, and specifically, that the Note cards on the right side of the docs, were sporting a little more whitespace, and the font wasn't tied into the font on the doc.

I also noticed that the buttons on the Slide decks were colored with yellow - for the presentation tool. OK... sure... who doesn't like primary colors? But it was the whitespace that was a little annoying.

I like to keep things tight on the screen - not a lot of chrome, buttons, etc. And certainly not a ton of whitespace - it just takes up space. But at the same time, it's all about evolving and adapting to those things which you cannot change - and Google is certainly not interested in my style preferences.

Wonder if this is something of a bigger change on the horizon?

Cognitect has an AWS Client Library

February 7th, 2019

Clojure.jpg

This morning I saw a tweet that announced that the Cognitect AWS Client library 0.8.243 was released. This was news to me, because I've been using Amazonica for years now, and it works, but has plenty of little things that always made me write a wrapper around all the things I really needed to do.

But hey... Cognitect are the guys that own Clojure - so if there's a "preferred way" to integrate with AWS, these guys would be the ones that would do it in the best way possible. I haven't looked at the docs much, but I wanted to put all this in a post so I could come back to it the next time I needed to talk to AWS from Clojure, and give this a spin.

Quite interesting...

UPDATE: I've taken a look at it, and I find it very interesting. Rather than use the AWS Java SDK, and just wrap the Java objects in Clojure code - which isn't bad but it doesn't really make it discoverable, and you end up wondering if there isn't a simpler way to get the data. With the Cognitect scheme, you send data, and get data, and it's up to you to then read what you need. Much nicer.

Interesting Breakdown of Heroku’s 2019 Plans

February 6th, 2019

Heroku

I saw this on Twitter this morning:

Adam McCrea - @adamlogic: I see a lot of confusion around @heroku's free dynos, so I wrote up a guide. Let me know if you find this helpful, and please share!

https://railsautoscale.com/heroku-free-dynos

and I have to say, it's packed with a lot of really useful information about the free, hobby, and paid dynes and database plans. What I really liked was that the alternatives, and work-arounds that he presented makes it clear there are some decent alternatives to the Heroku plans, but that Heroku is still in a good place.

I still want to put some Clojure service up on Heroku someday... I just need to know what the app is, and maybe it's tied into a macOS or iOS app as well. Who knows... but I really like to see someone look into the good, and the not-so-great parts of a service provider - just to keep them honest.

The Ice Storm Cometh

February 5th, 2019

Umbrella

This morning a friend at the train station in Naperville mentioned that tonight starting at 6:00 pm there was forecast an Ice Storm that would make evening - and morning - commutes really nasty. So I had to look this up when I got into the office... was it really going to be all that bad? What was the latest news?

When I got in, and had time to look it up, it was sound pretty nasty:

...ICE STORM WARNING IN EFFECT FROM 6 PM THIS EVENING TO 6 AM CST WEDNESDAY... * WHAT...SIGNIFICANT ICING EXPECTED DUE TO FREEZING RAIN. ICE ACCUMULATIONS OF ONE TENTH TO FOUR TENTHS OF AN INCH EXPECTED...

and if that wasn't enough, it went on to reassure us with:

POWER OUTAGES AND TREE DAMAGE ARE POSSIBLE DUE TO THE ICE. TRAVEL COULD BE NEARLY IMPOSSIBLE ON UNTREATED SURFACES. THE HAZARDOUS CONDITIONS MAY IMPACT THE EVENING COMMUTE.

And I just started giggling... We just got out of the Polar Vortex, and now we're going to covered in ice - and rain (to make it nice and slick) overnight, so that most places will be very hard to walk in the morning.

I have time, and knowledge, so we'll see what happens to that forecast as the day wears on. But it doesn't look particularly good for tomorrow morning's walk from the train station. But there's also working at home, or toughing it out... we'll have to see.

The Big Chill is on the Way

January 29th, 2019

The forecast is saying that with the 6"+ of snow on the ground, we are going to be getting a once in 25 year cold spell. It's about 1 deg now, and heading down to something like -23 deg tonight. A good friend in Alabama sent me a picture of his driveway with the comment "Not [sure] I can handle all the snow" - and it looked like a September day.

So I took a picture out my front door, and sent it to him:

Before The Big Chill

and we giggled about the difference.

He's from Northern Indiana, so he remembers this all too well... and I don't mind it, so we can share a laugh about the fact that he's there, I'm here, the cold is coming, but we have both had the wonderful experience of walking in the Chicago Winter with the wind chill in excess of -30 deg - and lived to tell the tale.

This is why we live in the Midwest. Not because it's easy, but because it is hard.

UPDATE: went out a few hours later, and shoveled off the snow that fell last night. It was chilly... I had forgotten the bite of the cold wind. It was something I always want to remember... always.

Mega Update Morning

January 23rd, 2019

Software Update

This morning, actually, last night, Apple released macOS 10.14.3, iOS 12.1.3, and tvOS 12.1.2 - and so I had a good morning updating my devices. It always puts me in a good mood to update machines... it's a fresh start... a new beginning, and it makes me smile.

I am glad to have updated to the latest Apple TV because the TV app is really a great thing for keeping track of the shows that I'm watching on Netflix and Hulu - all in one place. And it goes to my iPhone just in case I'd like to watch on the train home.

All updated and ready to take on the day!

Really Enjoying BeatsX and AirPods

January 22nd, 2019

Apple Computers

I got a pair of the AirPods from the first week they were launched. Amazing devices. But the fit wasn't as good as I'd hoped, so I kept using my Apple wired in-ear headphones at the office because they fit better and blocked out a lot more noise. So a few months ago, I got the BeatsX headphones from the Apple Store. Wow... very nice.

The charge is about like my AirPods, and now that I need a Lightening cable around to charge headsets, the AirPods are easier for me to charge as well. Bonus!

They are amazingly easy to use, can be controlled from my iPhone, or Mac - as long as it's logged into iCloud, and the mic/control fob is just as easy to use as the one on my wired headphones. Super simple... super easy... amazingly convenient to ditch the cord.

I have moved into the cordless world, and I have to say, I don't mind it at all. Up next: wireless charging of my iPhone...

Watching Timeless on Hulu

January 20th, 2019

TV.jpg

I've recently started watching Timeless on Hulu, as I know it has only two seasons, and I saw an interview one of the stars of the show did, and she was surprisingly impressive when talking about the show. Now, this could be like Bill & Ted's Excellent Adventure - which was a pretty funny movie, and treated time travel in a very good, funny way, but there have been tons of times when the science gets in the way, and things really don't end up working out so well.

I've been really amazed at the writing in Timeless. First, it doesn't try to explain too much - which is good, and it's got just enough rules - born out, they say, by experimental evidence that didn't go well. In all, I give the science a passing grade. Nicely done.

And then there's the premise... kinda like an evil Carmen SanDiego... which means there is a lot of hidden learning in the episodes. Also, as with the Back to the Future movies, changes in the past, effect the timeline they return to, but don't effect them. It's really a well written show.

It's the team that makes me smile the most... both the bad guys, and the good guys. There are a lot of things happening in the show, and while I'm only up to the sixth episode, they way in which secrets and motivations are handled is a very good story. I really like that.

It'll be interesting to see how the two seasons play out. I'm hoping they keep it up.