On Tue, 6 Sep 2016 07:58:28 +0530 Mithun Cy <mithun...@enterprisedb.com> wrote:
> > Now if only one host is in connection string and it ask for read_write > connection(connect to master) I mean read_only is set 0 explicitly. > With above logic we will allow it to connect to standby?. I still > think psql connection to standby should be handled by changing the > default value of readonly to 1 (which means connect to any). It would definitely be more logical, but I haven't found easy way to do it. May be I should return to this place and rethink. I don't like and idea to explicitely ignore connection string parameter due to some condition. Really, I think, test for replication connection can be either removed from this part of code now. > Thinking > further probably replacing readonly parameter with > targetServerType=any|master (with default being any) should clear > some confusions and bring consistency since same is used in JDBC > multi host connection string. It seems that in this context change readonly=0|1 to targetServerType=any|master makes sense. > 2) > @@ -1460,33 +1538,80 @@ connectDBStart(PGconn *conn) > portstr, > (int) (UNIXSOCK_PATH_BUFLEN - 1)); > conn->options_valid = false; > + free(nodes->port); > > nodes->port was not allocated at this point. > I'll recheck it. -- Victor Wagner <vi...@wagner.pp.ru> -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers