[ QPostgreSQL ] [10.4.1 ] PostGreSQL Server

This is the best place for community developers to publish their genius work. Your Apps enrich the QNAP Turbo NAS.
jeroenho
New here
Posts: 2
Joined: Mon Jun 11, 2012 9:10 pm

Re: [ QPostgreSQL ] [ 9.6.1 ] PostGreSQL Server

Post by jeroenho »

@psycho_asylum: have you cheched postgresDB/pg_hba.conf?
ElectricJoe
New here
Posts: 2
Joined: Sat Aug 12, 2017 11:40 pm

Re: [ QPostgreSQL ] [ 9.6.1 ] PostGreSQL Server

Post by ElectricJoe »

Has anybody gotten PostGreSQL 9.6.1 running on QNAP 4.3.3 and cares to share how to do that? Does that require a new QPKG?
ElectricJoe
New here
Posts: 2
Joined: Sat Aug 12, 2017 11:40 pm

Re: [ QPostgreSQL ] [ 9.6.1 ] PostGreSQL Server

Post by ElectricJoe »

Found some tidbits of info here: viewtopic.php?f=45&t=83067&start=28
khunpoom
New here
Posts: 8
Joined: Sun Oct 15, 2017 6:36 am

Re: [ QPostgreSQL ] [ 9.6.1 ] PostGreSQL Server

Post by khunpoom »

psycho_asylum wrote:I installed the qpkg fine, but cannot seem to connect to it using the postgres user I created. I'm trying pgAdmin to connect and it says "Connection Refused." Any ideas?

edit: I can see the socket: /tmp/.s.PGSQL.5432=

edit2: It seems I can connect to it using PGWeb. Not sure why I can't connect outside localhost. I tried setting the listen address on the postgresql.conf but the socket never gets created.
for solve it need to have linux command in console experience

1. enable SSH access and connect via SSH console to ur nas
2. find file postgresql.conf i use command

Code: Select all

find / -name "postgresql.conf"
3. edit postgresql.conf using "vi" editor config by command

Code: Select all

vi /share/MD0_DATA/.qpkg/PostgreSQL/postgresDB/postgresql.conf
look string listen_addresses = 'localhost' and change to

Code: Select all

listen_addresses = '0.0.0.0'
(in vi editor use "i" for enter to edit mode, for exit editor mode press ESC, next for save file and exit type ":wq" or ":q!" for exit without save)
4. find file pg_hba.conf command

Code: Select all

find / -name "pg_hba.conf"
5. edit pg_hba.conf

Code: Select all

vi /share/MD0_DATA/.qpkg/PostgreSQL/postgresDB/pg_hba.conf
6. add at end of file

Code: Select all

host  all  all 0.0.0.0/0 md5
7. restart postgres by command

Code: Select all

/share/MD0_DATA/.qpkg/PostgreSQL/PostgreSQL.sh restart 
(or search where ur file PostgreSQL.sh or just reboot nas)

default login/password is postgres (if u cant login remotely then first set new password via web interface phpPgAdmin)

also log file here (or find it) /share/MD0_DATA/.qpkg/PostgreSQL/tmp/log
ETH 0xd8F2b22e50B200214303E4f0B95435c918ca9CcF
afenton1
First post
Posts: 1
Joined: Sat Oct 28, 2017 4:28 pm

Re: [ QPostgreSQL ] [ 9.6.1 ] PostGreSQL Server

Post by afenton1 »

This worked for me - I can now login remotely

Thanks!
rileiv
New here
Posts: 4
Joined: Wed Mar 14, 2018 9:26 am

Re: [ QPostgreSQL ] [ 9.6.1 ] PostGreSQL Server

Post by rileiv »

I'm trying to create a Davinci Resolve 14 Server for my production house, so I installed a PGAdmin on our Qnap TVS-1282T3-i5. Alredy Modified the postgresql.conf (#listen_addresses = '*') and the pg_hba.conf (added on 1p4 connections: host all all 0.0.0.0/0 md5) but nothing seems to work. On PGAdmin4, installed on my macbook pro, I keep getting: "server is "not listening". I wonder if there's a kind of secret Firewall that prevents the Qnap to communicate with the external application. Also,alredy fowarded the 5432 port on my router.

Thanks for your valuable time!
Sincerely
Ricardo.
presenceofmind
Know my way around
Posts: 198
Joined: Thu May 26, 2016 3:05 pm

Re: [ QPostgreSQL ] [ 9.6.1 ] PostGreSQL Server

Post by presenceofmind »

Hi all

PostgreSQL is available in the app centre.

Is it worth installing this version instead?

Cheers
yanuk
Know my way around
Posts: 164
Joined: Mon Feb 08, 2016 9:45 am

Re: [ QPostgreSQL ] [ 9.6.1 ] PostGreSQL Server

Post by yanuk »

Hi Stephane

I updated to the latest 10.4.1 and got the following error

Code: Select all

psql.bin: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
I have created the the user postgres previously and was running fine prior to update.

Did I miss something out?
TS451
TS453
TVS-682
User avatar
QNAP_Stephane
Experience counts
Posts: 4802
Joined: Wed Mar 27, 2013 1:00 am

Re: [ QPostgreSQL ] [ 9.6.1 ] PostGreSQL Server

Post by QNAP_Stephane »

strange i dont see why... it runs nicely on TS-253PRO and TVS-473

check if this file exists on the bin path /opt/QPostgreSQL/bin
---------------------------------------------------------------------------------------------------------------------------

Find all QPKG in the MyQnap.org repository https://www.myqnap.org
join our discord server for any inquiry related to qpkg - https://discord.gg/4fPxHSWKQW

----------------------------------------------------------------------------------------------------------------------------
yanuk
Know my way around
Posts: 164
Joined: Mon Feb 08, 2016 9:45 am

Re: [ QPostgreSQL ] [ 9.6.1 ] PostGreSQL Server

Post by yanuk »

yups /opt/QPostgreSQL/bin exists.

If I run ./psql -l the same error comes out again.

I thought it was strange too...
TS451
TS453
TVS-682
yanuk
Know my way around
Posts: 164
Joined: Mon Feb 08, 2016 9:45 am

Re: [ QPostgreSQL ] [ 9.6.1 ] PostGreSQL Server

Post by yanuk »

ok found the problem.

Code: Select all

The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.4.
how do I upgrade the database without losing any data?

running bin/pg_upgrade gave me

Code: Select all

pg_upgrade: cannot be run as root
Failure, exiting
TS451
TS453
TVS-682
User avatar
QNAP_Stephane
Experience counts
Posts: 4802
Joined: Wed Mar 27, 2013 1:00 am

Re: [ QPostgreSQL ] [ 9.6.1 ] PostGreSQL Server

Post by QNAP_Stephane »

not expert on postgresql ... may be a dump possible but no idea
---------------------------------------------------------------------------------------------------------------------------

Find all QPKG in the MyQnap.org repository https://www.myqnap.org
join our discord server for any inquiry related to qpkg - https://discord.gg/4fPxHSWKQW

----------------------------------------------------------------------------------------------------------------------------
yanuk
Know my way around
Posts: 164
Joined: Mon Feb 08, 2016 9:45 am

Re: [ QPostgreSQL ] [ 9.6.1 ] PostGreSQL Server

Post by yanuk »

QNAP_Stephane wrote:not expert on postgresql ... may be a dump possible but no idea
no prob! will roll back to ver 9.6
Luckily this i backed up before upgrading. Will wait for any postgresql experts to shed light.

I googled upgrading 9.6 to 10 but the linux methods didn't work out for qnap's modified linux.

Thanks Stephane! Your replies earlier on were very much appreciated!
TS451
TS453
TVS-682
zelda
Getting the hang of things
Posts: 86
Joined: Tue Oct 19, 2010 5:41 am

Re: [ QPostgreSQL ] [10.4.1 ] PostGreSQL Server

Post by zelda »

Only the Odoo app runs with the QpostgreSQL . But there is no phpPgAdmin management possible. The PGWeb tool does not work on my NAS.

So if not being able to manage the QpostgreSQL DB with a professional admin tool stable version, this QPGSQL DB does not make any sense for me.

With the official PostgreSQL and the phpPgAdmin I can manage all DBs. Also tried the Odoo 12 win version running on any ClientPC and then

connecting with the QNAP NAS PostgreSQL as DB. Works fine and even fast. Of course the Odoo running files must be installed on the Clients, but 300MB for today's HDs

should not be any problem.

So maybe there is another point of view for a plus why QpostgreSQL should be used, and I only did not get it.

But on the other side, only one PostgreSQL can run on one NAS. :roll:
cslif216
First post
Posts: 1
Joined: Tue Nov 20, 2018 6:22 am

Re: [ QPostgreSQL ] [10.4.1 ] PostGreSQL Server

Post by cslif216 »

Hi Stephanie,
Is there a version of postgresSQL that runs on QNAP TS-1635? I can't seem to find it in my app center.
Post Reply

Return to “Community Apps”