Re: [HACKERS] PostgreSQL 10 (latest beta) and older ICU

2017-08-01 Thread Victor Wagner
On Tue, 1 Aug 2017 08:16:54 -0400 Peter Eisentraut wrote: > On 8/1/17 02:12, Victor Wagner wrote: > >> We are only calling uloc_toLanguageTag() with keyword/value > >> combinations that ICU itself previously told us were supported. So > >> just ignoring errors do

Re: [HACKERS] PostgreSQL 10 (latest beta) and older ICU

2017-07-31 Thread Victor Wagner
On Mon, 31 Jul 2017 19:42:30 -0400 Peter Eisentraut wrote: > On 7/25/17 15:20, Victor Wagner wrote: > > It turns out, that PostgreSQL enumerates collations for all ICU > > locales and passes it into uloc_toLanguageTag function with strict > > argument of this function set

Re: [HACKERS] PostgreSQL 10 (latest beta) and older ICU

2017-07-25 Thread Victor Wagner
On Tue, 25 Jul 2017 16:50:38 -0400 Tom Lane wrote: > Victor Wagner writes: > > PostgreSQL 10 when build with --with-icu requires ICU 4.6 and above. > > (because it searches for libicu using pkgconfig, and pgkconfig > > support significantly changed in ICU version 4.6)

[HACKERS] PostgreSQL 10 (latest beta) and older ICU

2017-07-25 Thread Victor Wagner
. -- Victor Wagner -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Explicit subtransactions for PL/Tcl

2017-03-10 Thread Victor Wagner
x27;t depend on function OIDs They ignore stack trace ($::errorinfo global variable) completely, and analyze just error message. -- Victor Wagner diff --git a/doc/src/sgml/pltcl.sgml b/doc/src/sgml/pltcl.sgml index ad216dd..87bc4ad 100644 --- a/doc/src/sgml/

Re: [HACKERS] Explicit subtransactions for PL/Tcl

2017-03-09 Thread Victor Wagner
l the errors inside Tcl code and return just message, but it would sufficiently narrow test functionality. Now test demonstrate how errors uncaught on the Tcl level interact with postgresql error system. With best regards, Victor -- Victor Wagner --

Re: [HACKERS] Explicit subtransactions for PL/Tcl

2017-03-09 Thread Victor Wagner
e patch. Attached fixed version of patch with regress tests and couple more whitespace issues fixed. With best regards, Victor -- Victor Wagner diff --git a/doc/src/sgml/pltcl.sgml b/doc/src/sgml/pltcl.sgml index ad216dd..87bc4ad 100644 --- a/doc/src/sgml/pltcl

Re: [HACKERS] Explicit subtransactions for PL/Tcl

2017-03-08 Thread Victor Wagner
cessary data in function automatic variables. Really python doesn't need this stack to, because Python context manager is a python language object and can keep state inside it). Although we still need to keep MemoryContext and ResourceOwner and restore them upon transaction finish.

Re: [HACKERS] Explicit subtransactions for PL/Tcl

2017-03-08 Thread Victor Wagner
ntexts is not necessary at all. But it require a bit more investigation and testing. With best regards, Victor -- Victor Wagner -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Explicit subtransactions for PL/Tcl

2017-01-08 Thread Victor Wagner
On Sun, 8 Jan 2017 20:57:50 +0300 Victor Wagner wrote: > Collegues! > > Recently I've found out that PL/Python have very nice feature - > explicit subtransaction object, which allows to execute block of code > in the context of subtransaction. > [skip] > >

[HACKERS] Explicit subtransactions for PL/Tcl

2017-01-08 Thread Victor Wagner
re in the same piece of code rather than in separate __enter__ and __exit__ methods as in Python, so there is no possibility to call exit without enter or vice versa. -- Victor Wagner -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) T

Re: [HACKERS] Random PGDLLIMPORTing

2016-11-24 Thread Victor Wagner
On Thu, 24 Nov 2016 15:01:33 +0100 Magnus Hagander wrote: > On Thu, Nov 24, 2016 at 2:58 PM, Craig Ringer > wrote: > > > Hi all > > > > Noticed this while reading something unrelated > > > > extern PGDLLIMPORT pid_t PostmasterPid; > > extern bool IsPostmasterEnvironment; > > extern PGDLLIMPORT

Re: [HACKERS] Password identifiers, protocol aging and SCRAM protocol

2016-11-08 Thread Victor Wagner
On Wed, 9 Nov 2016 15:23:11 +0900 Michael Paquier wrote: > > (This is about patch 0007, not 0001) > Thanks, you are right. That's not good as-is. So this basically means > that the characters here should be from 32 to 127 included. Really, most important is to exclude comma from the list of al

Re: [HACKERS] Password identifiers, protocol aging and SCRAM protocol

2016-11-08 Thread Victor Wagner
On Tue, 18 Oct 2016 16:35:27 +0900 Michael Paquier wrote: Hi > Attached is a rebased patch set for SCRAM, with the following things: > - 0001, moving all the SHA2 functions to src/common/ and introducing a > PG-like interface. No actual changes here. It seems, that client nonce generation in th

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-10-24 Thread Victor Wagner
On Wed, 19 Oct 2016 12:04:27 -0400 Robert Haas wrote: > On Thu, Oct 13, 2016 at 5:53 AM, Victor Wagner > wrote: > > On Thu, 13 Oct 2016 12:30:59 +0530 > > Mithun Cy wrote: > >> On Fri, Sep 30, 2016 at 2:14 PM, Victor Wagner > >> wrote: > >>

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-10-24 Thread Victor Wagner
On Wed, 19 Oct 2016 20:15:38 -0400 Robert Haas wrote: > > Some more comments: > > - I am pretty doubtful that the changes to connectOptions2() work as > intended. I think that's only going to be called before actualhost > and actualport could possibly get set. I don't think we keep > reinvoki

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-10-24 Thread Victor Wagner
On Mon, 24 Oct 2016 11:36:31 +0100 Thom Brown wrote: > > - It's pretty clear that this isn't going to work if the host list > > includes a mix of hostnames and UNIX socket addresses. The code > > that handles the UNIX socket address case is totally separate from > > the code that handles the mu

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-10-13 Thread Victor Wagner
On Thu, 13 Oct 2016 12:30:59 +0530 Mithun Cy wrote: > On Fri, Sep 30, 2016 at 2:14 PM, Victor Wagner > wrote: > Okay but for me consistency is also important. Since we agree to > disagree on some of the comments and others have not expressed any > problem I am moving it to com

Re: [HACKERS] [PATCH] Generic type subscription

2016-10-04 Thread Victor Wagner
On Sat, 1 Oct 2016 16:52:34 +0700 Dmitry Dolgov <9erthali...@gmail.com> wrote: > > I've tried to compile this patch with current state of master > > (commit 51c3e9fade76c12) and found out that, when configured with > --enable-cassert, > > it doesn't pass make check. > > Thanks for the feedba

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-09-30 Thread Victor Wagner
On Thu, 29 Sep 2016 23:45:52 +0530 Mithun Cy wrote: > This patch do not apply on latest code. it fails as follows It's strange. I have no problems applying it to commit fd321a1dfd64d30 Ok, some trailing whitespace and mixing of tabs and spaces which git apply doesn't like really present in the

Re: [HACKERS] [PATCH] Generic type subscription

2016-09-27 Thread Victor Wagner
On Fri, 9 Sep 2016 18:29:23 +0700 Dmitry Dolgov <9erthali...@gmail.com> wrote: > Hi, > > Regarding to the previous conversations [1], [2], here is a patch > (with some improvements from Nikita Glukhov) for the generic type > subscription. It allows > to define type-specific subscription logic for

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-09-27 Thread Victor Wagner
On Sun, 25 Sep 2016 17:31:53 +0530 Mithun Cy wrote: > I have some more comments on libpq-failover-8.patch > > + /* FIXME need to check that port is numeric */ > > Is this still applicable?. > Unfortunately, it was. I've fixed this problem in 9-th version of patch (attached) > > I think we ne

[HACKERS] Inheriting PostgresNode object

2016-09-13 Thread Victor Wagner
stead of inheritance. This would require some black magic with AutoLoader module to avoid writing wrapper for each PostgresNode method. Which approach would people recommend to take? -- Victor Wagner -- Sent via pgsql-hackers mailing list (pgsql

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-09-09 Thread Victor Wagner
On Fri, 9 Sep 2016 11:20:59 +0530 Mithun Cy wrote: > If concern is only about excluding address which was tried > previously. Then I think we can try this way, randomly permute given > address list (for example fisher-yates shuffle) before trying any of > those address in it. After that you can t

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-09-08 Thread Victor Wagner
On Tue, 6 Sep 2016 07:58:28 +0530 Mithun Cy wrote: > On Mon, Sep 5, 2016 at 4:33 PM, Aleksander Alekseev < > a.aleks...@postgrespro.ru> wrote: > >After a brief examination I've found following ways to improve the > >patch. > Adding to above comments. > I'm sending new version of patch. I've r

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-09-07 Thread Victor Wagner
On Mon, 5 Sep 2016 14:03:11 +0300 Aleksander Alekseev wrote: > Hello, Victor. > > > 1) It looks like code is not properly formatted. > Thanks for pointing to the documentation and formatting problems. I'll fix them > > static int > > connectDBStart(PGconn *conn) > > { > > + struc

Re: [HACKERS] [PATCH] Reload SSL certificates on SIGHUP

2016-09-07 Thread Victor Wagner
On Wed, 7 Sep 2016 17:09:17 +0900 Michael Paquier wrote: > On Sun, Sep 4, 2016 at 11:39 PM, Andreas Karlsson > wrote: > > 1) Serialize the certificates, key, and CRL and write them to the > > backend_var temp file and then deserialize everything in the > > backends. > > > > Sounds like you would

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-09-05 Thread Victor Wagner
t) (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 -- Sent via pgsql-hackers mailing list (pgsql-hac

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-09-04 Thread Victor Wagner
On Mon, 5 Sep 2016 07:59:02 +0530 Mithun Cy wrote: > On Aug 31, 2016 1:44 PM, "Victor Wagner" wrote: > > Thanks, I've added this to 7-th (yet unpublished here) version of my > > patch. > Hi victor, just wanted know what your plan for your patch 07. Would > yo

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-08-31 Thread Victor Wagner
On Tue, 30 Aug 2016 14:54:57 +0530 Mithun Cy wrote: > On Fri, Aug 26, 2016 at 10:10 AM, Mithun Cy > wrote: > > > > >rpath,'/home/mithun/edbsrc/patch6bin/lib',--enable-new-dtags > > >-lecpg > > -lpgtypes -lpq -lpgcommon -lpgport -lz -lrt -lcrypt -ldl -lm -o > > test1 > > >../../../../../s

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-08-31 Thread Victor Wagner
On Fri, 26 Aug 2016 10:10:33 +0530 Mithun Cy wrote: > On Thu, Mar 17, 2016 at 4:47 AM, David Steele > wrote: > >Since there has been no response from the author I have marked this > >patch > "returned with feedback". Please feel free >to resubmit for 9.7! > I have started to work on this patc

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-08-25 Thread Victor Wagner
JDBC driver have following options > targetServerType=any|master|slave|preferSlave for same purpose. Probably we should havbe a comptibility alias. -- Victor Wagner -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] UTF-8 docs?

2016-08-23 Thread Victor Wagner
On Mon, 22 Aug 2016 10:53:25 -0400 Peter Eisentraut wrote: > On 8/22/16 9:32 AM, Tatsuo Ishii wrote: > > I don't know what kind of problem you are seeing with encoding > > handling, but at least UTF-8 is working for Japanese, French and > > Russian. > > Those translations are using DocBook XML

Re: [HACKERS] UTF-8 docs?

2016-08-22 Thread Victor Wagner
On Mon, 22 Aug 2016 14:16:45 +0900 (JST) Tatsuo Ishii wrote: > Just out of curiopusity, I wonder why we can't make the encoding of > SGML docs to be UTF-8, rather than current ISO-8859-1. What a reason of "make the encoding of sgml docs" to be something? What actual change should be made and wh

Re: [HACKERS] Use pread and pwrite instead of lseek + write and read

2016-08-17 Thread Victor Wagner
On Wed, 17 Aug 2016 12:17:35 +0200 Magnus Hagander wrote: > On Wed, Aug 17, 2016 at 11:34 AM, Victor Wagner > wrote: > > I don't think that all platforms, supported by PostgreSQL support > > this API. Especially, I cannot find any mention of pread/pwrite in > > th

Re: [HACKERS] Use pread and pwrite instead of lseek + write and read

2016-08-17 Thread Victor Wagner
On Wed, 17 Aug 2016 10:58:09 +0300 Oskari Saarenmaa wrote: > > The attached patch replaces FileWrite and FileRead with FileWriteAt > and FileReadAt and removes most FileSeek calls. FileSeek is still > around so we can find the end of a file, but it's not used for > anything else. It seems th

Re: [HACKERS] handling unconvertible error messages

2016-08-13 Thread Victor Wagner
On Sat, 13 Aug 2016 12:02:30 -0400 Tom Lane wrote: > Victor Wagner writes: > > I think it is better to avoid such a problem and fix system so > > server would never send a message in the encoding, different from > > client one. > > Don't hold your b

Re: [HACKERS] handling unconvertible error messages

2016-08-13 Thread Victor Wagner
LS messages into the client desired encoding, and if not - fall back to untranslated messages. -- Victor Wagner -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] handling unconvertible error messages

2016-08-09 Thread Victor Wagner
On Wed, 10 Aug 2016 11:08:43 +0900 (Tokyo Standard Time) Kyotaro HORIGUCHI wrote: > Hello, > > (I've recovered the lost Cc recipients so far) > > At Mon, 8 Aug 2016 12:52:11 +0300, Victor Wagner > wrote in <20160808125211.1361c...@fafnir.local.vm> > > On Mon

Re: [HACKERS] handling unconvertible error messages

2016-08-08 Thread Victor Wagner
On Mon, 08 Aug 2016 18:28:57 +0900 (Tokyo Standard Time) Kyotaro HORIGUCHI wrote: > > I don't see charset compatibility to be easily detectable, In the worst case we can hardcode explicit compatibility table. There is limited set of languages, which have translated error messages, and limited (

Re: [HACKERS] handling unconvertible error messages

2016-08-08 Thread Victor Wagner
On Mon, 08 Aug 2016 18:11:54 +0900 (Tokyo Standard Time) Kyotaro HORIGUCHI wrote: > At Mon, 08 Aug 2016 17:18:21 +0900 (Tokyo Standard Time), Kyotaro > HORIGUCHI wrote in > <20160808.171821.100221089.horiguchi.kyot...@lab.ntt.co.jp> > > Somewhat wrong. The core problem is the procedures offered

Re: [HACKERS] handling unconvertible error messages

2016-08-08 Thread Victor Wagner
On Mon, 08 Aug 2016 17:18:21 +0900 (Tokyo Standard Time) Kyotaro HORIGUCHI wrote: > > I'm not sure what messages may be raised before authentication > but it can be a more generic-solution. (Adding check during > on-session.) Definitely, there can be authentication error message, which is sent i

Re: [HACKERS] handling unconvertible error messages

2016-08-08 Thread Victor Wagner
On Fri, 5 Aug 2016 11:21:44 -0400 Peter Eisentraut wrote: > On 8/4/16 2:45 AM, Victor Wagner wrote: > > 4. At the session startup try to reinitializie LC_MESSAGES locale > > category with the combination > > of the server (or better client-send) language and region an

Re: [HACKERS] handling unconvertible error messages

2016-08-08 Thread Victor Wagner
On Fri, 5 Aug 2016 11:23:37 -0400 Peter Eisentraut wrote: > On 8/4/16 9:42 AM, Tom Lane wrote: > > I'm inclined to think that we should reset the message locale > > to C as soon as we've forked away from the postmaster, and leave it > > that way until we've absorbed settings from the startup pack

Re: [HACKERS] handling unconvertible error messages

2016-08-05 Thread Victor Wagner
On Thu, 04 Aug 2016 14:25:52 -0400 Tom Lane wrote: > Victor Wagner writes: > > Really, if this response is sent after backend has been forked, > > problem probably can be easily fixed better way - StartupMessage > > contain information about desired client encoding, so

Re: [HACKERS] handling unconvertible error messages

2016-08-04 Thread Victor Wagner
On Thu, 04 Aug 2016 09:42:10 -0400 Tom Lane wrote: > Victor Wagner writes: > > If error occurs during processing of StartMessage protocol message, > > i.e. client request connection to unexisting database, > > ErrorResponse would contain message in the server default l

Re: [HACKERS] handling unconvertible error messages

2016-08-03 Thread Victor Wagner
On Mon, 25 Jul 2016 10:43:44 -0400 Peter Eisentraut wrote: e is > a real error message, but it could not be converted. > > I think ideally we could make this better in two ways: > > 1) Send the original error message untranslated. That would require > saving the original error message in errms

Re: [HACKERS] handling unconvertible error messages

2016-08-03 Thread Victor Wagner
On Mon, 25 Jul 2016 10:43:44 -0400 Peter Eisentraut wrote: > Example: I have a database cluster initialized with > --locale=ru_RU.UTF-8 (built with NLS). Let's say for some reason, I > have client encoding set to LATIN1. All error messages come back > like this: > > test=> select * from notthe

Re: [HACKERS] OpenSSL 1.1 breaks configure and more

2016-07-05 Thread Victor Wagner
On Fri, 1 Jul 2016 02:27:03 +0200 Andreas Karlsson wrote: > 0003-Remove-OpenSSL-1.1-deprecation-warnings.patch > > Silence all warnings. This commit changes more things and is not > necessary for getting PostgreSQL to build against 1.1. This patch breaks feature, which exists in PostgreSQL si

[HACKERS] Building PL/Perl with ActiveState Perl 5.22 and MSVC

2016-03-26 Thread Victor Wagner
option appeared in VC2003, so it should be safe to add. Hope that results of my experiments would be useful for someone. -- Victor Wagner -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Convert pltcl from strings to objects

2016-02-24 Thread Victor Wagner
On Tue, 23 Feb 2016 17:14:26 -0600 Jim Nasby wrote: > On 2/23/16 6:04 AM, Victor Wagner wrote: > > > Please, send updated patch to the list in this thread, so it would > > appear in the commitfest and I can mark your patch as "ready for > > committer". >

Re: [HACKERS] Convert pltcl from strings to objects

2016-02-23 Thread Victor Wagner
On Mon, 22 Feb 2016 17:57:36 -0600 Jim Nasby wrote: > On 2/18/16 6:26 AM, Victor Wagner wrote: > Are you referring to this comment? > > > / > > * Add the proc description block to the &g

Re: [HACKERS] Convert pltcl from strings to objects

2016-02-18 Thread Victor Wagner
On Tue, 9 Feb 2016 16:23:21 -0600 Jim Nasby wrote: > Currently, pl/tcl is implemented through nothing but string > manipulation. In other words, the C code is effectively creating a > giant string that the tcl interpreter must re-parse every time the > function is executed. Additionally, all arg

Re: [HACKERS] Small PATCH: check of 2 Perl modules

2016-02-16 Thread Victor Wagner
ommitfest left, and it would be quite a radical change. And even if would appear in the next release, it cannot be easily backpatched to 9.5. So we'll probably live with autoconf until the end-of-life of 9.5 series at least. -- Victor Wagner -- Sent via

Re: [HACKERS] Small PATCH: check of 2 Perl modules

2016-02-16 Thread Victor Wagner
On Mon, 15 Feb 2016 08:34:11 -0500 Peter Eisentraut wrote: > On 2/12/16 8:20 AM, Eugene Kazakov wrote: > > TAP-tests need two Perl modules: Test::More and IPC::Run. > > > > The patch adds checking of modules in configure.in and configure. > > I think those modules are part of a standard Perl

Re: [HACKERS] [REVIEW] In-core regression tests for replication, cascading, archiving, PITR, etc.

2016-02-04 Thread Victor Wagner
t of tests. I think that this patch should be commited as soon as possible in its current form (short of already reported reject in the PostgresNode.pm init function). -- Victor Wagner -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)

Re: [HACKERS] In-core regression tests for replication, cascading, archiving, PITR, etc.

2016-02-04 Thread Victor Wagner
t just prevents configure to finish successfully if --enable-tap-tests is specified and required modules are not available. -- Victor Wagner -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] In-core regression tests for replication, cascading, archiving, PITR, etc.

2016-02-04 Thread Victor Wagner
On Thu, 4 Feb 2016 12:59:03 +0300 Michael Paquier wrote: for it? > > > 1) Better to raise more meaningful error when IPC::Run is absent. > > This has been discussed before, and as far as I recall the current > behavior has been concluded as being fine. That's where > --enable-tap-tests becom

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-01-24 Thread Victor Wagner
e name of host and port number used to make actual connection, as they were specified in the connect string or service file. > > Thom -- Victor Wagner -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-01-24 Thread Victor Wagner
ould imply readonly flag if only one host/port pair is specified in the command line. Now it does check for standby regardless of number of hosts specified. -- Victor Wagner -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make chan

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-01-24 Thread Victor Wagner
o real temporary cluster. Probably, based on Perl TAP framework which is actively used in the Postgres recently. > -- Victor Wagner -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-01-22 Thread Victor Wagner
FATAL message from server which is not properly up yet. So, it is fixed too. Addititonally, error messages from all failed connect attempts are not accumulated now. Only last one is returned. -- Victor Wagner diff --git a/doc/src/sgml/libpq.sgml b/doc/s

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-01-21 Thread Victor Wagner
On Tue, 19 Jan 2016 14:34:54 + Thom Brown wrote: > The segfault issue I originally reported now appears to be resolved. > > But now I have another one: > > psql > 'postgresql://thom@127.0.0.1:5530,127.0.0.1:5531,127.0.0.1:5532,127.0.0.1:5533/postgres?hostorder=random&readonly=1&failover_tim

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2015-12-21 Thread Victor Wagner
On Mon, 21 Dec 2015 17:18:37 +0300 Teodor Sigaev wrote: > Sorry, but there is something wrong with your patch: > % patch -p1 -C < ~/Downloads/libpq-failover-5.patch Really, somehow broken version of the patch got into message. Here is correct one. diff --git a/doc/src/sgml/libpq.sgml b/doc/src

Re: [HACKERS] Is postgresql on Windows compatible with flex 2.6.0?

2015-12-10 Thread Victor Wagner
On Thu, 10 Dec 2015 21:19:46 +0900 Michael Paquier wrote: > On Thu, Dec 10, 2015 at 5:45 PM, Victor Wagner > > Postgres seems to compile fine with flex 2.6.0. > > It seems that 32f15d05 missed to update its equivalent in > src/tools/msvc. Per se the patch attached as you

[HACKERS] Is postgresql on Windows compatible with flex 2.6.0?

2015-12-10 Thread Victor Wagner
e when version 2.6.0 didn't exist? Postgres seems to compile fine with flex 2.6.0. -- Victor Wagner -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2015-12-09 Thread Victor Wagner
inting to this problem. I've overlooked it. Probably I should improve my testing scenario. I', attaching new version of the patch, which, hopefully, handles address list freeing correctly. -- Victor Wagner diff --git a/doc/src/sgml/libpq.sgml b/d

[HACKERS] What .gitignore files do in the tarball?

2015-11-24 Thread Victor Wagner
"$(distdir)/$$file" && chmod 777 "$(distdir)/$$file"; \ -- Victor Wagner -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Patch (3): Implement failover on libpq connect level.

2015-11-17 Thread Victor Wagner
On Tue, 17 Nov 2015 19:42:42 + Thom Brown wrote: > > This patch doesn't apply. On line 636, this appears: It doesn't apply to current state of the master branch due to changes in fe-connect.c made by Tom Lane in the commit c40591885. Unfortunately these changes appears in the source just

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2015-11-09 Thread Victor Wagner
On Mon, 9 Nov 2015 15:14:02 +0800 Craig Ringer wrote: > > I'd rather not see convoluted and complex connstrings, per my prior > post. The JDBC extended URL style seems good enough. It is what my patch implements. > IMO the biggest problem is that client-side failover is way more > complex th

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2015-11-05 Thread Victor Wagner
tring between them is good thing. So, I've modelled syntax of multihost feature in the libpq URL-style syntax after jdbc syntax. -- Victor Wagner -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2015-10-30 Thread Victor Wagner
On Fri, 30 Oct 2015 14:26:45 +0100 Robert Haas wrote: > On Thu, Oct 29, 2015 at 8:29 PM, Peter Eisentraut > wrote: > > That's true, but doesn't allowing every parameter to be multiply > specified greatly increase the implementation complexity for a pretty > marginal benefit? I think host and

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2015-10-28 Thread Victor Wagner
On Mon, 26 Oct 2015 16:25:57 -0400 Peter Eisentraut wrote: > Also, this assumes that all the components other than host and port > are the same. Earlier there was a discussion about why the ports > would ever need to be different. Well, why can't the database names > be different? I could have

[HACKERS] Patch (3): Implement failover on libpq connect level.

2015-10-26 Thread Victor Wagner
On 2015.10.14 at 13:41:51 +0300, Victor Wagner wrote: > Attached patch which implements client library failover and > loadbalancing as was described in the proposal > <20150818041850.ga5...@wagner.pp.ru>. New version of patch 1. Handles replication connections correctly (i.e doe

Re: [HACKERS] Patch (2): Implement failover on libpq connect level.

2015-10-23 Thread Victor Wagner
d, you have a bit of garbage in the patch (the patch inserts > UNIXSOCK_PATH(portstr, portnum, conn->pgunixsocket); in the header > comment at the top of fe-connect.c). > Thanks, I'd address this issues in the next version of path. -- Vict

Re: [HACKERS] Patch (2): Implement failover on libpq connect level.

2015-10-23 Thread Victor Wagner
age: row number 0 is out of range 0..-1 and connection failed. Can you tell me a bit more of your setup. At least which architecture you are compiling Postgres for. -- Victor Wagner -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To m

Re: [HACKERS] Patch (2): Implement failover on libpq connect level.

2015-10-23 Thread Victor Wagner
On Thu, 22 Oct 2015 14:33:11 +0100 Thom Brown wrote: > On 21 October 2015 at 10:07, Victor Wagner wrote: > > On 2015.10.14 at 13:41:51 +0300, Victor Wagner wrote: > > > >> > >> Attached patch which implements client library failover and > >> load

[HACKERS] Patch (2): Implement failover on libpq connect level.

2015-10-21 Thread Victor Wagner
On 2015.10.14 at 13:41:51 +0300, Victor Wagner wrote: > > Attached patch which implements client library failover and > loadbalancing as was described in the proposal > <20150818041850.ga5...@wagner.pp.ru>. > I'm sending imporoved verison of patch. As Olexander Shulg

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2015-10-15 Thread Victor Wagner
On 2015.10.15 at 17:13:46 +0800, Craig Ringer wrote: > On 14 October 2015 at 18:41, Victor Wagner wrote: > > > 5. Added new parameter readonly=boolean. If this parameter is false (the > > default) upon successful connection check is performed that backend is > > not in t

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2015-10-15 Thread Victor Wagner
is special case, because we just check syntax of host-port pair list. And I have to choose how to handle it - either complain or silently strip it away. Complaining was similier. We compute port number and check if it is between 1 and 65535. Zero-length port number is not integer between 1 and 65

[HACKERS] Patch: Implement failover on libpq connect level.

2015-10-14 Thread Victor Wagner
On 2015.08.18 at 07:18:50 +0300, Victor Wagner wrote: > Rationale > = > > Since introduction of the WAL-based replication into the PostgreSQL, it is > possible to create high-availability and load-balancing clusters. > > However, there is no support for failover in

Re: [HACKERS] Proposal: Implement failover on libpq connect level.

2015-09-07 Thread Victor Wagner
В Mon, 07 Sep 2015 17:32:48 +0200 "Daniel Verite" пишет: > Victor Wagner wrote: > > > It would just take a bit more time for client and a bit more load > > for server - to make sure that this connection is read-write by > > issuing >

[HACKERS] Discussion summary: Proposal: Implement failover on libpq connect level.

2015-09-06 Thread Victor Wagner
oad balancing of readonly clients) should be implemented as in original proposal. -- Victor Wagner -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Proposal: Implement failover on libpq connect level.

2015-08-19 Thread Victor Wagner
On 2015.08.20 at 00:17:35 +0900, Tatsuo Ishii wrote: > > But once connection is established, each client works with one > > server (at least until communication failure occurs and it would call > > PQreset. In this case it has to reprepare statements anyway). > > One downside of this is, if one o

Re: [HACKERS] Proposal: Implement failover on libpq connect level.

2015-08-19 Thread &#x27;&#x27;Victor Wagner *EXTERN*' *EXTERN*' *EXTERN*
On 2015.08.19 at 15:35:17 +0100, Simon Riggs wrote: > > I think we do need some way of saying that a readonly connection is OK. So I had such thing in my propsal (boolean parameter readonly). But haven't yet checked if it is compatible with jdbc syntax. > the default would be to connect to eac

Re: [HACKERS] Proposal: Implement failover on libpq connect level.

2015-08-19 Thread Victor Wagner
e lists such as host=master.db.com,standby1.db.com.standby2.db.com port=,2345, hostaddr=,192.168.0.4,192.160.1.8 with evident semantic: get port, host and hostaddr elements with same number, and if some of them are empty, behave as it was only host and corresponding parameter not specified at all. -- Victor Wagner -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Proposal: Implement failover on libpq connect level.

2015-08-19 Thread Victor Wagner
On 2015.08.19 at 12:55:15 +0530, Amit Kapila wrote: > > I think that failover procedure should begin before first connection is > > ever established. > > > > As far as I understand, failover gets initiated once the master server goes > down or is not accessible due to some reason, so for such cas

Re: [HACKERS] Proposal: Implement failover on libpq connect level.

2015-08-19 Thread &#x27;&#x27;Victor Wagner *EXTERN*' *EXTERN*'
gether. But your variant allows to handle hostaddr parameter same way as host and port. -- Victor Wagner -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Proposal: Implement failover on libpq connect level.

2015-08-19 Thread Victor Wagner *EXTERN*
On 2015.08.19 at 12:29:51 +0530, Amit Kapila wrote: > > It seems that most people discussing in this thread think in millisecond > > time intervals (failure and immediate reconnect). > > Why not have this as a separate parameter (*_timeout or something like > that)? Because it is not in the soft

Re: [HACKERS] Proposal: Implement failover on libpq connect level.

2015-08-19 Thread Victor Wagner
On 2015.08.19 at 12:42:45 +0900, Tatsuo Ishii wrote: > I wonder how extended protocol is handled by this proposal. Suppose > load balacing mode is enabled. PQprepare is executed on standby1. Then > PQexecPrepared gets called. This may be executed on standby2, which > will fail because there's no p

Re: [HACKERS] Proposal: Implement failover on libpq connect level.

2015-08-19 Thread Victor Wagner
On 2015.08.19 at 08:28:32 +0530, Amit Kapila wrote: > On Tue, Aug 18, 2015 at 9:48 AM, Victor Wagner wrote: > > > > > > Behavoir > > > > > > If PQconnectdb encounters connect string with multiple hosts specified, > > it attempts

Re: [HACKERS] Proposal: Implement failover on libpq connect level.

2015-08-18 Thread &#x27;Victor Wagner *EXTERN*'
ave unintended connotations, such is "this is first, main server". I think that client should treat all given servers as equal and let cluster administration to choose which one would accept connection. -- Victor Wagner -- Sent via pgsql-hackers mailing

[HACKERS] Proposal: Implement failover on libpq connect level.

2015-08-17 Thread Victor Wagner
only clients should be load-balanced using this feature, there are much more read-only clients, than read-write ones. So some extra load related with read-write connection seems to be justified by simplification of client configuration. -- Victor Wagner -- Sent via pgsql-hackers

Re: [HACKERS] [PATCHES] Backend SSL configuration enhancement

2006-09-07 Thread Victor Wagner
On 2006.09.04 at 15:46:03 -0400, Bruce Momjian wrote: > Tom Lane wrote: > > Bruce Momjian <[EMAIL PROTECTED]> writes: > > > This has been saved for the 8.3 release: > > > http://momjian.postgresql.org/cgi-bin/pgpatches_hold > > > > This version was withdrawn by the author for rework, no? > > R

[HACKERS] Re: [PATCHES] Cyrillic to UNICODE conversion

2001-05-04 Thread Victor Wagner
f from RFC1483, and only afterward it has appear on unicode.org, and Chernov's KOI8 pages. But anyway, if anybody is able to get them from unicode.org, why bother. -- Victor Wagner [EMAIL PROTECTED] Chief Technical Officer Office:7-(095)-748-53-88 Communiware.Ne