Postgres.app

Alan Eddy alan at freedomsoftware.co.nz
Thu Aug 19 21:08:24 UTC 2021


Hey just a thought…
Have you allowed communication through your firewall?

Cheers
Alan

Sent from my iPhone

> On 20/08/2021, at 9:04 AM, Michael Houlberg <michael at houlbergdevelopment.com> wrote:
> 
> Alex,
> 
> Thanks for the tips on scram-256, I’ll look at that later once I’ve actually connected.
> 
> The server computer is running on Catalina 10.15.7 because it’s an older machine.  The client computer is running Big Sur 11.1.  I’m using Omnis 10.1 27575 on both, so not the latest.  I don’t see any libpq.x files at all in the Omnis Frameworks folder on either machine.  Do I really need to extract these files from the Archives?  I’m running Postgres using the Postgres.app version which places it’s files in the Application Support area.  I don’t see files with those names anywhere in there.  The technote you reference seems to indicate I’d need to do this for OpenSSL support, I’m not interested in that right now.
> 
> I installed pgAdmin on the “other” computer to see if it could connect to the server computer.  Is it just supposed to find it?  It doesn’t.  I tried to use the Add New Server button to locate the server, but either it isn’t seeing it or I don’t know what I’m doing.  It insists on a “Name” and seems to allow anything in there, but under the Server Group popup, nothing is listed.  I tried entering the IP number, (alone or with port), of the computer which is acting as server, but no luck.  So maybe it’s the pg_hba.conf file after all?
> 
> Here’s what’s in there right now after moving my line to the top:
> 
> # TYPE  DATABASE        USER            ADDRESS                 METHOD
> host    all                all                0.0.0.0/0                md5
> # "local" is for Unix domain socket connections only
> local   all             all                                     trust
> # IPv4 local connections:
> host    all             all             127.0.0.1/32            trust
> # IPv6 local connections:
> host    all             all             ::1/128                 trust
> # Allow replication connections from localhost, by a user with the
> # replication privilege.
> local   replication     all                                     trust
> host    replication     all             127.0.0.1/32            trust
> host    replication     all             ::1/128                 trust
> 
> Thanks,
> Michael Houlberg
> Houlberg Development, LLC
> 
>> On Aug 18, 2021, at 5:26 PM, Alex Clay via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:
>> 
>> Hi Michael,
>> 
>> While it won't help with your connection woes, I recommend you update from md5 to scram-256, which is much more secure. If you're setting up a new environment in PG 13, there's not much you should need to do beside change the allowed authentication mechanism and generate a fresh password.
>> 
>> https://www.postgresql.org/docs/current/auth-password.html
>> https://www.cybertec-postgresql.com/en/from-md5-to-scram-sha-256-in-postgresql/
>> https://blog.crunchydata.com/blog/how-to-upgrade-postgresql-passwords-to-scram
>> 
>> The "Client or interface function not available" sounds more like an issue with the client application being unable to locate the PostgreSQL libpq library (I'm guessing this is an Omnis client). You might try using the following instructions to install a current version of this library: https://www.omnis.net/developers/resources/technotes/tnsq0040.jsp
>> 
>> You could verify this is an issue in Omnis and not an issue with the PostgreSQL server by connecting with an alternate client app from the client computer, like pgAdmin. If you can connect there, then the issue is with Omnis.
>> 
>> FWIW your connection line looks like it will work—you've basically got wide-open access (using a password) for non-SSL connections to all databases for all roles (users) from all IPv4 addresses.
>> 
>> Also note that lines in pg_hba.conf are processed from the top down, so if there is a line preceding the one you added that blocks your connection, then your configuration line will never apply. You could move this line to the top and reload PostgreSQL to ensure it's processed first.
>> 
>> Alex
>> 
>>>> On Aug 18, 2021, at 18:21, Michael Houlberg <michael at houlbergdevelopment.com> wrote:
>>> 
>>> OK, I’ve made some real progress.  After years of primarily using MySQL, I’m giving PostgreSQL a look again.
>>> 
>>> I installed the Postgres.app again with PostgreSQL 13, but this time also installed pgAdmin4.  I’ve created the database, created a user/role, gave the user login capabilities, set privileges up for the database and so forth.  Logging on with a localhost connection is all good.
>>> 
>>> Now I want to connect from another computer on the LAN.
>>> 
>>> I went into postgresql.conf and editing this line:
>>> listen_addresses = '*'        # what IP address(es) to listen on;
>>> 
>>> I went into pg_hba.conf and added this line:
>>> host    all                all                0.0.0.0/0                md5
>>> 
>>> I restarted the server.
>>> 
>>> But the other machine still has this error:
>>> “Client or interface function not available”
>>> 
>>> Any help appreciated,
>>> Michael Houlberg
>>> Houlberg Development, LLC
>>> 
>>>> On Aug 17, 2021, at 11:18 PM, Sten-Erik Björling <s-e.bjorling at enviro.se> wrote:
>>>> 
>>>> Hi,
>>>> 
>>>> In addition to the use of PG Admin and tools like DBeaver for DB admin I also recommend that you look into https://pgtune.leopard.in.ua helping you to optimise the settings in Postgres for increased performance. If that is needed…
>>>> 
>>>> To access the server from other devices you have to add an entry in the pg_hba.conf file:
>>>> 
>>>> host    all                all                0.0.0.0/0                md5
>>>> 
>>>> Take care, all the best…
>>>> 
>>>> Stene
>>>> ______
>>>> 
>>>>> 17 aug. 2021 kl. 20:32 skrev Michael Houlberg <michael at houlbergdevelopment.com>:
>>>>> 
>>>>> $listers:
>>>>> 
>>>>> I’ve been looking at the Postgres app available at postgresapp.com which has some nice features.  Mainly it’s really easy to install, and when used with the Postico application, easy to administer.  My thinking is that I could specify this for users who are not too tech savvy and they could easily set themselves up.
>>>>> 
>>>>> But I have a couple of questions.
>>>>> 
>>>>> Can I set up roles and users?  It seems to ignore this completely.
>>>>> 
>>>>> Can I connect from another computer on the LAN?  It seems like it is intended as a single-user environment.
>>>>> 
>>>>> Has anyone got some experience with this?
>>>>> 
>>>>> Thanks,
>>>>> Michael Houlberg
>>>>> Houlberg Development, LLC
>>>> 
>>>> _____________________________________________________________
>>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
>>> 
>>> _____________________________________________________________
>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
>> 
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
> 
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 


More information about the omnisdev-en mailing list