Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Adrian Klaver
On 04/09/2015 02:32 PM, Volkan Unsal wrote: I set up logging for connections. Here is what I see: LOG: connection received: host=104.131.66.183 port=38912 LOG: replication connection authorized: user=postgres LOG: connection received: host=104.131.66.183 port=38913 LOG: repli

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Volkan Unsal
I set up logging for connections. Here is what I see: LOG: connection received: host=104.131.66.183 port=38912 > LOG: replication connection authorized: user=postgres > LOG: connection received: host=104.131.66.183 port=38913 > LOG: replication connection authorized: user=postgres Two connec

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Adrian Klaver
On 04/09/2015 02:22 PM, Volkan Unsal wrote: Not sure that is a problem as the logs show the database reaching a consistent state: But the database doesn't open a port after reaching this state. Hence, when I nmap the IP address of the standby server, I don't see an open port for postgr

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Volkan Unsal
> > > Not sure that is a problem as the logs show the database reaching a > consistent state: But the database doesn't open a port after reaching this state. Hence, when I nmap the IP address of the standby server, I don't see an open port for postgresql. Is that normal? Also setting up logging

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Adrian Klaver
On 04/09/2015 01:34 PM, Volkan Unsal wrote: Thanks for giving it a shot, Adrian. I'm scouring the Postgres source code looking for some inspiration around the error message "database system was interrupted". Let me know if you can think of anything else. Not sure that is a problem as the logs s

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Volkan Unsal
That was from the standby server logs. On Thu, Apr 9, 2015 at 5:00 PM, Adrian Klaver wrote: > On 04/09/2015 01:52 PM, Volkan Unsal wrote: > >> Yup, just did. Can never be too paranoid about this. :) >> > > So where did the below come from?: > > LOG: database system was interrupted; last known u

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Adrian Klaver
On 04/09/2015 01:52 PM, Volkan Unsal wrote: Yup, just did. Can never be too paranoid about this. :) So where did the below come from?: LOG: database system was interrupted; last known up at 2015-04-09 16:35:05 GMT LOG: entering standby mode LOG: redo starts at 0/E28 LOG: consistent r

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Volkan Unsal
Yup, just did. Can never be too paranoid about this. :) On Thu, Apr 9, 2015 at 4:51 PM, Adrian Klaver wrote: > On 04/09/2015 01:48 PM, Volkan Unsal wrote: > >> HI Adrian, >> >> Is there a chance you have a recovery.conf in your primary server >> directory? >> >> >> No, this file is only

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Adrian Klaver
On 04/09/2015 01:48 PM, Volkan Unsal wrote: HI Adrian, Is there a chance you have a recovery.conf in your primary server directory? No, this file is only in the standby server. From the gist, here is where recovery.conf gets created

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Volkan Unsal
HI Adrian, > Is there a chance you have a recovery.conf in your primary server > directory? No, this file is only in the standby server. From the gist, here is where recovery.conf gets created . -- *Volk

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Adrian Klaver
On 04/09/2015 01:34 PM, Volkan Unsal wrote: Thanks for giving it a shot, Adrian. I'm scouring the Postgres source code looking for some inspiration around the error message "database system was interrupted". Let me know if you can think of anything else. From your original post: LOG: databas

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Volkan Unsal
Thanks for giving it a shot, Adrian. I'm scouring the Postgres source code looking for some inspiration around the error message "database system was interrupted". Let me know if you can think of anything else. On Thu, Apr 9, 2015 at 4:32 PM, Adrian Klaver wrote: > On 04/09/2015 01:14 PM, Volkan

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Adrian Klaver
On 04/09/2015 01:14 PM, Volkan Unsal wrote: Oops. I used a dummy IP address in the yml file for privacy reasons. The actual IP addresses would be placed there in my setup. The pg_basebackup connection to the MASTER_PORT_5432_TCP___ADDR is successful, so I know that slave can connect to the master

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Volkan Unsal
Oops. I used a dummy IP address in the yml file for privacy reasons. The actual IP addresses would be placed there in my setup. The pg_basebackup connection to the MASTER_PORT_5432_TCP_ADDR is successful, so I know that slave can connect to the master at least. But it just cannot open a streaming b

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Adrian Klaver
On 04/09/2015 01:00 PM, Volkan Unsal wrote: Hi Adrian, 1) What version(s) of Postgres are you using on either end? I'm using Postgres 9:3. 2) Are the primary and the standby in different containers? Yes, and they are on different servers as well. 3) What is the container/machi

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Volkan Unsal
Hi Adrian, So in your recovery.conf is standby_mode set to on? Yes, here is that entire file: standby_mode = 'on' > primary_conninfo = 'host=${MASTER_PORT_5432_TCP_ADDR} port=5432 > user=${REP_USER} password=${REP_PASS}' > trigger_file = '/tmp/promote_db_slave' On Thu, Apr 9, 2015 at 3:56 PM,

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Volkan Unsal
Hi Adrian, 1) What version(s) of Postgres are you using on either end? > I'm using Postgres 9:3. > 2) Are the primary and the standby in different containers? > Yes, and they are on different servers as well. 3) What is the container/machine/network layout? > I created a gist of all the file

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Adrian Klaver
On 04/09/2015 12:46 PM, Volkan Unsal wrote: Hi Amit, My postgresql.conf file in the standby server looks like this: wal_level = hot_standby hot_standby = on max_standby_streaming_delay = 15min In the master server, it looks like this: listen_addresses = '*' wal_level = ho

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Adrian Klaver
On 04/09/2015 12:39 PM, Volkan Unsal wrote: Hi Melvin, When I make this entry hostreplication rep 104.131.66.183/32 md5 It complains that it cannot have both CIDR and mask number and fails to start –– I assume it's referring to /32 –– and

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Volkan Unsal
Hi Amit, My postgresql.conf file in the standby server looks like this: wal_level = hot_standby > hot_standby = on > max_standby_streaming_delay = 15min In the master server, it looks like this: listen_addresses = '*' > wal_level = hot_standby > max_wal_senders = 10 > max_connections=100 > che

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Volkan Unsal
HI Adrian, Also what do the standby server logs show while you are trying to connect? The logs show that pg_basebackup competed successfully. But then something goes wrong. LOG: database system was interrupted; last known up at 2015-04-09 19:22:50 > GMT > LOG: entering standby mode > LOG: re

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Volkan Unsal
Hi Melvin, When I make this entry hostreplication rep104.131.66.183/32md5 It complains that it cannot have both CIDR and mask number and fails to start –– I assume it's referring to /32 –– and when I remove that it starts alright, but it doesn't accept replication co

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Adrian Klaver
On 04/09/2015 12:32 PM, Volkan Unsal wrote: Hi Adrian, I can confirm that the REP_USER is a role with replication attribute in the master Role name | Attributes | Member of -++---

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Volkan Unsal
Hi Adrian, I can confirm that the REP_USER is a role with replication attribute in the master Role name | Attributes | Member of -++--- postgres | Superuser, Create role, Create

Re: [GENERAL] Regarding bytea column in Posgresql

2015-04-09 Thread John R Pierce
On 4/9/2015 4:10 AM, Bill Moran wrote: 1. Is 'bytea' column intended for storing text data? No, it's intended for storing binary data. >2. Typically a chat can have text data with several special characters (which can be represented in multi bytes), how these characters can be sto

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Melvin Davidson
So did you make the following entry in pg_hba,conf? hostreplication rep104.131.66.183/32md5 Is rep a valid postgres user in the cluster? Did you remember to do: SELECT pg_reload_conf(); After making the changes to pg_hba.conf? On 4/9/15, Volkan Unsal wrote: > HI A

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Adrian Klaver
On 04/09/2015 12:05 PM, Volkan Unsal wrote: HI Adrian, Can you connect remotely from the standby using psql? Yes, I can connect directly from the standby using psql and DB_USER and DB_PASS. And you are sure the REP_USER is being correctly substituted in and that it has the REPLICATION

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Volkan Unsal
HI Adrian, > Can you connect remotely from the standby using psql? Yes, I can connect directly from the standby using psql and DB_USER and DB_PASS. -- *Volkan Unsal* *web and mobile development* volkanunsal.com

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Volkan Unsal
Hi Melvin, 0.0.0.0 has the specific meaning "unspecified". So you really should > enter the specific ip address for the slave in the master pg_hba.conf. > I tried this, but I am getting this error when I do that: FATAL: no pg_hba.conf entry for replication connection from host "104.131.66.183

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Adrian Klaver
On 04/09/2015 10:15 AM, Volkan Unsal wrote: I have been configuring a slave server that needs to connect to the host. Both the master and the standby servers have a pg_hba.conf that looks like this: # Allow anyone to connect remotely so long as they have a valid username and # password

Re: [GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Melvin Davidson
Three things: 1. 0.0.0.0 has the specific meaning "unspecified". So you really should enter the specific ip address for the slave in the master pg_hba.conf. 2. Is ${REP_USER} defined on BOTH master & slave? IS ${REP_USER} defined as a valid user that can login in the database? 3. I do not know

[GENERAL] no pg_hba.conf entry for replication connection from host

2015-04-09 Thread Volkan Unsal
I have been configuring a slave server that needs to connect to the host. Both the master and the standby servers have a pg_hba.conf that looks like this: # Allow anyone to connect remotely so long as they have a valid username and # password. hostreplication ${REP_USER} 0.

[GENERAL] Can a bdr enabled server belong to more than one bdr group?

2015-04-09 Thread Dennis
Can a server instance that has a db in one existing bdr group add that same db to a different/new bdr group so that the db belongs to two different bdr groups at the same time? e.g. node 1, db_x, bdr_group (node 1, node 2) node 2, db_x, bdr_group (node 1, node 2) AND bdr_group(node 2, node 3) n

Re: [GENERAL] ecpg rejects input parameters

2015-04-09 Thread Adrian Klaver
On 04/09/2015 07:12 AM, Andrew Pennebaker wrote: Makes sense. Yes, it would be great if psql offered a flag for validating syntax. Other programming languages do this, for example, bash -n, ruby -c, and php -l. Or pgsanity could take this: CREATE DATABASE :db; and convert it into: CREATE DA

Re: [GENERAL] ecpg rejects input parameters

2015-04-09 Thread Andrew Pennebaker
Makes sense. Yes, it would be great if psql offered a flag for validating syntax. Other programming languages do this, for example, bash -n, ruby -c, and php -l. On Wed, Apr 8, 2015 at 3:53 PM, Tom Lane wrote: > Andrew Pennebaker writes: > > I can't find a relevant section to address my specif

Re: [GENERAL] Cannot connect from local network to my postgresql server

2015-04-09 Thread John McKown
On Thu, Apr 9, 2015 at 5:00 AM, dlefebvre wrote: > Hi, > > I use ubuntu 14.01 and i install a postgresql 9.3 server. I want to connect > an other pc from local network to this server. But the server seems to only > listen on localhost. > ​I'm running 9.3.6 on Fedora 21 x86_64.​ > > There is t

Re: [GENERAL] Cannot connect from local network to my postgresql server

2015-04-09 Thread Adrian Klaver
On 04/09/2015 03:00 AM, dlefebvre wrote: Hi, I use ubuntu 14.01 and i install a postgresql 9.3 server. I want to connect an other pc from local network to this server. But the server seems to only listen on localhost. There is the conf files : pg_hba.conf : # TYPE DATABASEUSER

Re: [GENERAL] unexpected (to me) sorting order

2015-04-09 Thread Glyn Astill
> From: Scott Marlowe > To: Glyn Astill > Cc: Björn Lundin ; "pgsql-general@postgresql.org" > > Sent: Thursday, 9 April 2015, 13:23 > Subject: Re: [GENERAL] unexpected (to me) sorting order > > On Wed, Apr 8, 2015 at 3:33 AM, Glyn Astill > wrote: > >> >>> From: Björn Lundin >>> To:

Re: [GENERAL] unexpected (to me) sorting order

2015-04-09 Thread Scott Marlowe
On Wed, Apr 8, 2015 at 3:33 AM, Glyn Astill wrote: > >> From: Björn Lundin >>To: pgsql-general@postgresql.org >>Sent: Wednesday, 8 April 2015, 10:09 >>Subject: [GENERAL] unexpected (to me) sorting order >> >>select * from T_SORT order by NAME ; >> >>rollback; >> id |name >>+--

Re: [GENERAL] Regarding bytea column in Posgresql

2015-04-09 Thread Bill Moran
On Thu, 9 Apr 2015 11:03:30 + "Deole, Pushkar (Pushkar)" wrote: > > I have been assigned to a product that uses Postgresql 9.3 as backend > database. I am new to postgresql. > The product provides chat functionality between the uses and the completed > chats are stored in the database table

[GENERAL] Regarding bytea column in Posgresql

2015-04-09 Thread Deole, Pushkar (Pushkar)
Hi, I have been assigned to a product that uses Postgresql 9.3 as backend database. I am new to postgresql. The product provides chat functionality between the uses and the completed chats are stored in the database table in a 'bytea' column in the form of xml. When I query the data from this c

[GENERAL] Cannot connect from local network to my postgresql server

2015-04-09 Thread dlefebvre
Hi, I use ubuntu 14.01 and i install a postgresql 9.3 server. I want to connect an other pc from local network to this server. But the server seems to only listen on localhost. There is the conf files : pg_hba.conf : # TYPE DATABASEUSERADDRESS METHOD # IPv4