How Far We’ve Come – Pt. 7

By | August 20, 2017
after creating user image

Originally I did a stupid thing. It was so stupid I made it the featured image for this post. I used the install/remove applications menu option to install postgresql and postgresql-contrib. Finding postgresql was like finding a needle in a haystack after using the search. The software manager for the Raspberry Pi doesn’t order by package name nor does it display that first. It displays the one-line human friendly description first and has a sort order which completely mystifies me. Seemed like there were over 100 entries to scroll through on that tiny screen. Searching for “postgresql-contr” yielded almost a direct hit.

I copied my postgres_tax_backups directory from the thumb drive, changed to that directory, flagged the shell script as executable and launched. It took a while before I noticed I was getting a different kind of fatal error than expected from psql.

psql: FATAL: Peer authentication failed for user "roland"
database created
Extracting ... 2015
psql: FATAL: Peer authentication failed for user "roland"
psql: FATAL: Peer authentication failed for user "roland"

Gotta (*^&)(*&)(*ing hate security! Postgres will no longer let you connect as a different user than the one you are logged into the OS as. *^)(*&^)(*&)_

Yes, I could have added an account for “roland” and went through everything again, but, it was just too much effort for a one time test. Ultimately, time allowing, we will get to cross compiling for the Pi, which was the original goal. So, I redid the command you see in the image to create a PostgreSQL account for pi. Then I did a quick hack to

export PGUSER=pi
export PGPASSWORD=raspberry

Yes, I should have gotten fancy, having the script prompt for user and password. I leave that as a programming exercise for the reader. I wrote this for me. You need to modify it for yourself.

After the quick hack and new user the script ran fine.

Pi after import image

Pi after import

The backup script required no modifications.

So, now we just need to compile the application on the Raspberry Pi to be certain all is well.

<Previous-part Next-Part>

Related posts:

QT Database book

AGILE book

Where Did My QDebug Output Go?

MOC Parse Error at “std”

KDE Neon – Distcc and Qt

CopperSpice Experiments

QtCreator – No qmlScene installed

So You Can’t Get Your Models to Work with QML?

Category: Experience Information Technology Raspberry Pi Tags: ,

About seasoned_geek

Roland Hughes started his IT career in the early 1980s. He quickly became a consultant and president of Logikal Solutions, a software consulting firm specializing in OpenVMS application and C++/Qt touchscreen/embedded Linux development. Early in his career he became involved in what is now called cross platform development. Given the dearth of useful books on the subject he ventured into the world of professional author in 1995 writing the first of the "Zinc It!" book series for John Gordon Burke Publisher, Inc. A decade later he released a massive (nearly 800 pages) tome "The Minimum You Need to Know to Be an OpenVMS Application Developer" which tried to encapsulate the essential skills gained over what was nearly a 20 year career at that point. From there "The Minimum You Need to Know" book series was born. Three years later he wrote his first novel "Infinite Exposure" which got much notice from people involved in the banking and financial security worlds. Some of the attacks predicted in that book have since come to pass. While it was not originally intended to be a trilogy, it became the first book of "The Earth That Was" trilogy: Infinite Exposure Lesedi - The Greatest Lie Ever Told John Smith - Last Known Survivor of the Microsoft Wars When he is not consulting Roland Hughes posts about technology and sometimes politics on his blog. He also has regularly scheduled Sunday posts appearing on the Interesting Authors blog.