Re: [GENERAL] Latest PostgreSQL on Raspbian Jessie - Mailing list pgsql-general

From Ertan Küçükoğlu
Subject Re: [GENERAL] Latest PostgreSQL on Raspbian Jessie
Date
Msg-id 004c01d28dde$56eaf2e0$04c0d8a0$@1nar.com.tr
Whole thread Raw
In response to Re: [GENERAL] Latest PostgreSQL on Raspbian Jessie  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: [GENERAL] Latest PostgreSQL on Raspbian Jessie  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Adrian Klaver
Sent: Thursday, February 23, 2017 3:55 PM
To: Ertan Küçükoğlu <ertan.kucukoglu@1nar.com.tr>;
pgsql-general@postgresql.org
Subject: Re: [GENERAL] Latest PostgreSQL on Raspbian Jessie

On 02/23/2017 01:56 AM, Ertan Küçükoğlu wrote:
> Hello,
>
> I could not decide which forum is more appropriate. I end up posting
> my question here.
>
> For a small but important Project, I need to develop a GUI application
> on Raspberry Pi with PostgreSQL using Lazarus. PostgreSQL 9.4.10
> server will be running on Raspberry Pi 3 Model B and another
> PostgreSQL 9.6.2 will be running on a Windows OS. Lazarus installed on
> Raspberry Pi is version 1.7 (built from latest subversion trunk
> sources) using with FreePascal 3.1.1 (also built from latest subversion
trunk sources).
>
> Raspberry Pi application will save some data in PostgreSQL running on
> Pi and very same application also needs to save some *other* data on
> PostgreSQL
> 9.6.2 running on Windows OS. Both OSes will be running in same LAN.
>
> Saving everything on Raspberry Pi and later copying using another
> application/method is not allowed by design.
>
> I could not find 9.6.x version of the PostgreSQL to install on
> Raspberry Pi in packages. Most recent I can install using APT package
> system is 9.4.10. I do not mind that it is rather old.
>
> My problem starts when I try to reach a PostgreSQL 9.6.2 using 9.4.10
> pglib library (I think).

Can you show what is you are doing?

If not what happens if you use the Postgres command line client(psql) to
connect to the 9.6.2 database?

> - Connection may hang and application stops responding.
> - If connection succeeds a simple select * from query hangs and
> application stops responding and after a while terminates for good.
>
> I installed PgAdmin3 on Raspberry Pi to make some tests. I get lots of
> warnings and some error messages when I try to connect that database
> on Windows OS.

What are the warnings/errors?

>
> I am new to PostgreSQL and am not sure if there may be some connection
> problems from old version libraries to new version PostgreSQL servers.
> My limited little experience says I need same version on both systems
> for best stability.
>
> I would like to know;
> 1- Is it possible to install 9.6.2 with same version pglib on Raspberry
Pi?
> If possible to do on Raspberry Pi, I think I can build my own version
> from sources assuming I am provided a good detailed how to document for
doing so.
> 2- If above is not possible, is it possible to build just the latest
> version pglib and overcome my connection problem?
> 3- If I need to select number 2 solution above, is that latest version
> library will talk to old version without any problems?

Yes:

aklaver@arkansas:~$ psql -d postgres -U aklaver -p 5434 Password for user
aklaver:
psql (9.6.2, server 9.4.11)
Type "help" for help.

postgres=> select 'test';
  ?column?
----------
  test
(1 row)



> 4- I am always open to other suggestions.
>
> Thanks.
>
> Regards,
> Ertan Küçükoğlu
>
>
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com

Hi,

Sorry about not indenting. Have to use Outlook as e-mail app.

I cannot show any work at the moment, I am just researching right now,
before I start actual job. I have a single form making connection to local
PostgreSQL and remote one. Local seems to be OK in all respects. Remote is a
problem.

Below you can see some psql output.

postgres@raspberrypi:~$ psql -d test -U postgres -p 5432 -h 192.168.1.105
Password for user postgres:
DEBUG:  CommitTransaction
DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR,
xid/subid/cid: 0/1/0, nestlvl: 1, children:
psql (9.4.10, server 9.6.1)
WARNING: psql major version 9.4, server major version 9.6.
         Some psql features might not work.
Type "help" for help.

test=# select count(*) from sale;
DEBUG:  StartTransactionCommand
DEBUG:  StartTransaction
DEBUG:  name: unnamed; blockState:       DEFAULT; state: INPROGR,
xid/subid/cid: 0/1/0, nestlvl: 1, children:
DEBUG:  CommitTransactionCommand
DEBUG:  CommitTransaction
DEBUG:  name: unnamed; blockState:       STARTED; state: INPROGR,
xid/subid/cid: 0/1/0, nestlvl: 1, children:
 count
--------
 176588
(1 row)

test=#

Btw, I am surprised that psql can make a connection *and* runs a query just
fine.

My main problem with my application is to run a query. Connection seems to
be OK. Trying to run a query and my application simply freeze.

PgAdmin3 gives lots of error messages some objects missing, assertion
failures, etc. After all these messages PgAdmin3 seems to establish a
connection to PostgreSQL 9.6 database on Windows OS. However, PgAdmin3
cannot run a query, too. When I try to do a select, PgAdmin3 freeze. Waiting
only kills my application, or PgAdmin3. No log messages that I can find of.

Thanks.
-Ertan




pgsql-general by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [GENERAL] Building PostgreSQL 9.6devel sources with MicrosoftVisual C++ 2015?
Next
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] Latest PostgreSQL on Raspbian Jessie