Обсуждение: [GENERAL] Latest PostgreSQL on Raspbian Jessie
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). - 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. 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? 4- I am always open to other suggestions. Thanks. Regards, Ertan Küçükoğlu
Il 23/02/2017 10:56, Ertan Küçükoğlu ha scritto: > I would like to know; > 1- Is it possible to install 9.6.2 with same version pglib on Raspberry Pi? In subject you call it as Raspbian Jessie, so I assume it's somewhat related to Debian Jessie. Debian repository does not (at last, not in the last few weeks) have Postgresql 9.5 and 9.6. To get these via apt, you should add the Postgres Development Group (PGDG) repo in your sources.list https://www.tqhosting.com/kb/446/How-to-install-PostgreSQL-95-on-Debian-8-Jessie.html (it's for Postgresql 9.5 and Debian Jessie, but if my assumption is right, it would fit your case, since PGDG contains 9.6 also) > 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? > 4- I am always open to other suggestions. > > Thanks. > > Regards, > Ertan Küçükoğlu > > > >
On 02/23/2017 02:57 AM, Moreno Andreo wrote: > Il 23/02/2017 10:56, Ertan Küçükoğlu ha scritto: >> I would like to know; >> 1- Is it possible to install 9.6.2 with same version pglib on >> Raspberry Pi? > In subject you call it as Raspbian Jessie, so I assume it's somewhat > related to Debian Jessie. > Debian repository does not (at last, not in the last few weeks) have > Postgresql 9.5 and 9.6. > To get these via apt, you should add the Postgres Development Group > (PGDG) repo in your sources.list > > https://www.tqhosting.com/kb/446/How-to-install-PostgreSQL-95-on-Debian-8-Jessie.html I think the issue will be the architecture: https://wiki.postgresql.org/wiki/Apt Architectures: amd64 (64-bit x86), i386 (32-bit x86), ppc64el (little-endian 64-bit POWER; not on wheezy/precise) The Raspberry Pi is ARM. > > > (it's for Postgresql 9.5 and Debian Jessie, but if my assumption is > right, it would fit your case, since PGDG contains 9.6 also) > >> 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? >> 4- I am always open to other suggestions. >> >> Thanks. >> >> Regards, >> Ertan Küçükoğlu >> >> >> >> > > > > -- Adrian Klaver adrian.klaver@aklaver.com
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
-----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
On 02/23/2017 06:08 AM, Ertan Küçükoğlu wrote: > -----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 > > > 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. Yeah with the caveat: "Some psql features might not work." The older version of psql does not 'know' about new features in 9.6. > > 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. So the issue is with the Postgres library that Lazarus/FreePascal is using. What would that library be? > > 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. Not all that surprising as pgAdmin3 is no longer supported: https://www.pgadmin.org/download/source.php As you found out, I don't think the last version of pgAdmin3 is compatible with 9.6. > > Thanks. > -Ertan > > > > -- Adrian Klaver adrian.klaver@aklaver.com