after creating user image
Experience, Information Technology, Raspberry Pi

How Far We’ve Come – Pt. 7

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 import_tax_backups.sh

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?