[pgAdmin III] #298: pg_hba.conf editor is buggy

From: "pgAdmin Trac" <trac(at)code(dot)pgadmin(dot)org>
To:
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: [pgAdmin III] #298: pg_hba.conf editor is buggy
Date: 2011-01-09 22:45:50
Message-ID: 056.3a16eb7f0a8b60e1bbe1988e1ba6ce58@code.pgadmin.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

#298: pg_hba.conf editor is buggy
-----------------------------+----------------------------------------------
Reporter: Damien Clochard | Owner: dpage
Type: bug | Status: new
Priority: major | Milestone:
Component: pgadmin | Version: 1.12
Keywords: conf editor | Platform: all
-----------------------------+----------------------------------------------
Last month during a PG training, i found a very bad behaviour from
pgadmin. Here's the step to follow :

0- backup your pg_hba.conf
1- launch pgadmin
2- edit the pg_hba.conf
3- Add a new line with an error inside the CIDR address.
For example : host all all 10.224.24.26 trust
4- save
5- close pgadmin
6- now if you edit pg_hba.conf with a generic text editor
the line you've added will appear.
7- launch pgadmin again
8- edit pg_hba.conf
9- your line doesn't appear
10- you need to modify pg_ba.conf with a text editor or restore your
backup

As you may have noticed, between step 4 and step 10 you'll be unable to
start PostgreSQL because the pg_hba.conf has a syntax error.

I can't describe how much this is confusing for newbies : they write a
pg_hba rule that seems correct (they just wrote an IP Address instead of
a CIDR ) and then they restart PG to test it... Now the server won't
start and if they restart pgAdmin, then the faulty line is hidden !

What's even more confusing is the dialog window that adds a new line....
There's a field for each part of the pg_hba line. But when it comes to
the CIDR Address the field label is "IP Address" instead of "CIDR
Address" or "IP Address + Netmask"

At the very least, i think the behaviour should coherent. Either pgadmin
accepts faulty lines then it must be able to display them, or
Pgadmin refuses to write a faulty line in the pg_hba.conf and in that
case it's ok hide them...

I think the best behaviour would be :

a/ pgadmin refuses to write a faulty line
b/ pgadmin display faulty lines **in red** (if any)

...which is basically the opposite to what pgAdmin is doing now... :)

Here's more detail :

* Platform : Windows XP and Linux
* Language : French
* Distribution : EDB installer / Ubuntu package / Source
* Version : 1.10.5 and 1.12.2
* nothing in pgadmin.log

--
Ticket URL: <http://code.pgadmin.org/trac/ticket/298>
pgAdmin III <http://code.pgadmin.org/trac/>
pgAdmin III

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Guillaume Lelarge 2011-01-09 23:26:19 New options dialog
Previous Message Guillaume Lelarge 2011-01-09 21:47:30 Re: pgAdmin III commit: Another fix on my "unlogged table" patch