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

Michael Wagner mikepwagner at gmail.com
Tue Mar 10 00:13:54 EDT 2015


Very cool - I deleted the postgres login role I had created yesterday, 
and re-created it as the postgres user, added the password in the psql 
prompt with the \password command, and tried a "Save As" in gnucash, and 
everything apparently worked.

Then I looked in pgAdmin III, and there was in fact a gnucash db.

I know people suggested using XML, but I figured that if postgres would 
give me ACID properties, etc., and was pretty easy to set up, I'd prefer 
that to a flat file format. I have played with postgres on and off 
several times, and it seems like a pretty cool tool.

Mike

On 03/09/2015 11:47 PM, Michael Wagner wrote:
> I don't know if this will get threaded correctly - I hadn't set my 
> email type to MIME, which makes it hard to respodn to one message in a 
> digest. I have fixed that now.
>
> In response to Colin Law's message, I installed Postegres with a 
> package manager.
>
> I looked at the gnucash.trace in temp, and I think it's telling me the 
> same thing at postgres told me - an authentication failure:
>
> * 22:49:27  WARN <gnc.python> Unable to initialize Python module 
> (unable to open /usr/share/gnucash/python/init.py)
> * 22:49:43  CRIT <gnc.core-utils> gnc_uri_get_components: assertion 
> 'uri != NULL && strlen (uri) > 0' failed
> * 22:49:43  CRIT <GLib> g_ascii_strcasecmp: assertion 's1 != NULL' failed
> * 22:49:54  CRIT <gnc.backend.dbi> [pgsql_error_fn()] DBI error: 
> FATAL:  password authentication failed for user "michael"
> FATAL:  password authentication failed for user "michael"
>
> * 22:49:54  CRIT <gnc.backend.dbi> gnc_dbi_set_error: assertion 
> 'dbi_conn != NULL' failed
> * 22:49:54  CRIT <gnc.backend.dbi> [gnc_dbi_postgres_session_begin()] 
> Unable to connect to database 'gnucash'
>
> I tried giving the db user with the same name as my login no 
> authentication with the following line in pg_hba.conf - I think this 
> says "on the local machine, user michael has access to all databases 
> with no authtentication".
>
> # TYPE  DATABASE        USER            ADDRESS METHOD
> local       all                    michael    trust
>
> That didn't seem to help, so I also used gpgadmin3 to add a password 
> to the postgres login - it certainly looks like an md5 encrypted 
> password, but I still saw the same error from in the postgres log:
>
> 2015-03-09 23:35:50 EDT FATAL:  password authentication failed for 
> user "michael"
> 2015-03-09 23:35:50 EDT DETAIL:  Connection matched pg_hba.conf line 
> 92: "host    all             all             127.0.0.1/32 md5"
> 2015-03-09 TABASE        USER            ADDRESS METHOD
>
> 2015-03-09 23:35:50 EDT DETAIL:  Connection matched pg_hba.conf line 
> 92: "host    all             all             127.0.0.1/32 md5"
>
> Just  out of curiosity, when the gnucash "Save As" window asks for my 
> "Username" and "Password", is it asking for my UNIX username and 
> password, the postgres "login role" and "password"?
>
> Maybe I will pursue this on some postgres mailing list.
>
> Thanks,
>
> Mike
> ~
>
>



More information about the gnucash-user mailing list