Setting up gnucash to use postgesql back end - close but no cigar ...

Wm wm+gnc at tarrcity.demon.co.uk
Mon Mar 9 05:03:08 EDT 2015


Sun, 8 Mar 2015 22:42:16 <54FD0888.1070203 at gmail.com>  Michael Wagner 
<mikepwagner at gmail.com>

>I have an ubuntu laptop at home that I would like to set up to use as a 
>personal financial machine. I'd like to use postgrsql as my backend. 
>The ubuntu in question is 14.04
>
>I am new to both postgres and gnu cash, and I am confused as to where 
>the disconnect is.

My first question is why, when you are new to both gnc and databases, 
are you using the backend that is (as far as I can work out) least used?

First: get used to working with the XML backend, then graduate to the 
SQLite3 backend.  Doing so needn't take more than a day or so.  Have got 
SQLite2 working nicely you should ask yourself why do I need postgresql? 
The answer should be you don't.

Further any SQL related gnc development is going to be concentrated on 
SQLite3 with MySQL and postgres the fat ugly sisters at the ball.

>Reading manuals and websites, I've installed postgres 9.3, and added a 
>user with the same name as my login. I can login and create and 
>manipulate a database (create tables, etc). I can even create a 
>"gnucash" db, and create some of the same tables that gnucash creates.

That's likely to make thins worse rather than better, as a neophyte you 
want to avoid table name clashes, etc and generally should be keeping 
things as simple as possible.

>When I try to create a "new file" in gnu cash and save, it, I have been 
>using my login user credentials. The "Save As..." window has 
>"Host:localhost" Database:gnucahsh", and I use my loging  my 
>("Username:michael",and password).

Using Save As with an existing XML file may make the process more clear.

>When I do all that, gnucash says "The server at URL 
>postgres://michael@localhost/gnucash experienced an error or 
>encountered bad or corrupt data."
>
>If I look in the postgres log, it says:
>
>2015-03-08 22:35:54 EDT FATAL:  password authentication failed for user 
>"michael"
>2015-03-08 22:35:54 EDT DETAIL:  Connection matched pg_hba.conf line 
>92: "host    all             all             127.0.0.1/32 md5"
>2015-03-08 22:35:54 EDT FATAL:  password authentication failed for user 
>"michael"
>2015-03-08 22:35:54 EDT DETAIL:  Connection matched pg_hba.conf line 
>92: "host    all             all             127.0.0.1/32 md5"
>
>I think that means that gnucash and postgres are using different 
>authentication mechanisms. I am pretty clueless about this, but I think 
>that "md5" and  "ident" are two different auithentication mechanisms.
>
>Is that correct?

That has nothing to do with gnc and everything to do with your 
understanding of postgres.  You don't really need any authentication at 
this stage and I'd make it all as simple as possible to begin with.

>Do I need to do soomething my postgres pg_hba.conf file to enable a 
>different authentication mechanism? Do I need to change something about 
>gnucash?

Understand XML and SQLite3 backend first; *when* you discover something 
SQL related you can't do with SQLite3 let us know.

-- 
Wm...


More information about the gnucash-user mailing list