Re: [HACKERS] Floating point comparison inconsistencies of the geometric types

2016-11-17 Thread Kyotaro HORIGUCHI
Hello, At Mon, 14 Nov 2016 11:41:52 +0100, Emre Hasegeli wrote in > > What way to deal with it is in your mind? The problem hides > > behind operators. To fix it a user should rewrite a expression > > using

Re: [HACKERS] pg_hba_file_settings view patch

2016-11-17 Thread Haribabu Kommi
On Thu, Nov 17, 2016 at 10:13 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > On Wed, Nov 16, 2016 at 4:40 PM, Ashutosh Bapat > wrote: > > make check run with this patch shows server crashes. regression.out > > attached. I have run make check after

Re: [HACKERS] Hash Indexes

2016-11-17 Thread Amit Kapila
On Thu, Nov 17, 2016 at 10:54 PM, Robert Haas wrote: > On Thu, Nov 17, 2016 at 12:05 PM, Amit Kapila wrote: > >>> I think this comment is saying that we'll release the pin on the >>> primary bucket page for now, and then reacquire it later if the

Re: [HACKERS] PATCH: Batch/pipelining support for libpq

2016-11-17 Thread Tsunakawa, Takayuki
Hello, Craig, I'm sorry to be late to review your patch. I've just been able to read the HTML doc first. Can I get the latest .patch file for reading and running the code? Here are some comments and questions. I tried to avoid the same point as other reviewers, but there may be an overlap.

[HACKERS] WAL recycle retading based on active sync rep.

2016-11-17 Thread Kyotaro HORIGUCHI
Hello. We had too-early WAL recycling during a test we had on a sync replication set. This is not a bug and a bit extreme case but is contrary to expectation on synchronous replication. > FATAL: could not receive data from WAL stream: ERROR: requested WAL segment > 00010088

Re: [HACKERS] Parallel bitmap heap scan

2016-11-17 Thread Amit Khandekar
On 19 October 2016 at 09:47, Dilip Kumar wrote: > On Tue, Oct 18, 2016 at 1:45 AM, Andres Freund wrote: >> I don't quite understand why the bitmap has to be parallel at all. As >> far as I understand your approach as described here, the only thing that

Re: [HACKERS] Mail thread references in commits

2016-11-17 Thread Joshua Drake
Why not hash the URL? Something like: Http://postgresopen.org/archive/743257890976432 Where the hash is derived from the message if? On Nov 17, 2016 17:40, "Alvaro Herrera" wrote: > > Tom Lane wrote: > > Andrew Dunstan writes: > > > I love seeing

Re: [HACKERS] Push down more UPDATEs/DELETEs in postgres_fdw

2016-11-17 Thread Etsuro Fujita
On 2016/11/16 16:38, Etsuro Fujita wrote: On 2016/11/16 13:10, Ashutosh Bapat wrote: I don't see any reason why DML/UPDATE pushdown should depend upon subquery deparsing or least PHV patch. Combined together they can help in more cases, but without those patches, we will be able to push-down

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

2016-11-17 Thread Craig Ringer
On 17 November 2016 at 10:57, Robert Haas wrote: > On Wed, Nov 16, 2016 at 9:00 PM, Tsunakawa, Takayuki > wrote: >> Do we really want to enable libpq failover against pre-V10 servers? I don't >> think so, as libpq is a part of PostgreSQL

[HACKERS] Use procsignal_sigusr1_handler and RecoveryConflictInterrupt() from walsender?

2016-11-17 Thread Craig Ringer
Hi all While adding support for logical decoding on standby I noticed that the walsender doesn't respect SIGUSR1 with PROCSIG_RECOVERY_CONFLICT_DATABASE set. It blindly assumes that it means there's new WAL: WalSndSignals(void) { ... pqsignal(SIGUSR1, WalSndXLogSendHandler); /*

Re: [HACKERS] Mail thread references in commits

2016-11-17 Thread Alvaro Herrera
Tom Lane wrote: > Andrew Dunstan writes: > > I love seeing references to email threads in commit messages. It would > > make them a lot friendlier though if a full http URL were included > > instead of just a Message-ID, > > I've intentionally not done that, because it

Re: [HACKERS] Declarative partitioning - another take

2016-11-17 Thread Amit Langote
On 2016/11/18 1:43, Robert Haas wrote: > On Thu, Nov 17, 2016 at 6:27 AM, Amit Langote wrote: >> OK, I will share the performance results soon. > > Thanks. > >>> Also, in 0006: >>> >>> - I doubt that PartitionTreeNodeData's header comment will survive >>> contact with pgindent. >> >> Fixed by

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

2016-11-17 Thread Tsunakawa, Takayuki
From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Mithun Cy > I am adding next version of the patch it have following fixes. > Tsunakawa's comments > > 1. PGconn->target_server_type is now freed in freePGconn() 2. Added > PGTARGETSERVERTYPE. >

Re: [HACKERS] Document how to set up TAP tests for Perl 5.8.8

2016-11-17 Thread Craig Ringer
On 18 November 2016 at 07:10, Michael Paquier wrote: > On Thu, Nov 17, 2016 at 2:39 PM, Craig Ringer wrote: >> I wasted a bunch of time getting set up to test for such an ancient >> Perl and would love to save the next person along the hassle by

Re: [HACKERS] amcheck (B-Tree integrity checking tool)

2016-11-17 Thread Peter Geoghegan
On Wed, Nov 16, 2016 at 5:06 PM, Thomas Munro wrote: > + * Ideally, we'd compare every item in the index against every other > + * item in the index, and not trust opclass obedience of the transitive > + * law to bridge the gap between children and their

Re: [HACKERS] Document how to set up TAP tests for Perl 5.8.8

2016-11-17 Thread Michael Paquier
On Thu, Nov 17, 2016 at 2:39 PM, Craig Ringer wrote: > I wasted a bunch of time getting set up to test for such an ancient > Perl and would love to save the next person along the hassle by > documenting the easy way. It looks sensible to mention that in the README, so +1.

Re: [HACKERS] Document how to set up TAP tests for Perl 5.8.8

2016-11-17 Thread Craig Ringer
On 18 November 2016 at 05:41, Robert Haas wrote: > On Wed, Nov 16, 2016 at 9:54 PM, Craig Ringer wrote: >> On 17 November 2016 at 10:42, Craig Ringer wrote: >>> But sure, if it's easier, we can have 5.8.0 in the README. What's

Re: [HACKERS] Contains and is contained by operators of inet datatypes

2016-11-17 Thread Tom Lane
Andreas Karlsson writes: > Emre Hasegeli wrote: > Attached patch adds <@, @>, <<@, and @>> operator symbols for inet > datatype to replace <<=, >>=, <<, and >>. > Nice, I am fine with this version of the patch. Setting it to ready for > committer! I looked at this

Re: [HACKERS] quieting DEBUG3

2016-11-17 Thread Robert Haas
On Wed, Nov 16, 2016 at 12:00 PM, Alvaro Herrera wrote: > Robert Haas wrote: > >> Right: me either. So, here is a series of three patches. > > +1 to the general idea of the three patches. I didn't review nor test > them in detail. Thanks. Hearing no objections,

Re: [HACKERS] Mail thread references in commits

2016-11-17 Thread Andrew Dunstan
On 11/17/2016 04:06 PM, Andres Freund wrote: On November 17, 2016 1:02:38 PM PST, Andrew Dunstan wrote: I love seeing references to email threads in commit messages. It would make them a lot friendlier though if a full http URL were included instead of just a

Re: [HACKERS] Vacuum: allow usage of more than 1GB of work mem

2016-11-17 Thread Claudio Freire
On Thu, Nov 17, 2016 at 6:34 PM, Robert Haas wrote: > On Thu, Nov 17, 2016 at 1:42 PM, Claudio Freire > wrote: >> Attached is patch 0002 with pgindent applied over it >> >> I don't think there's any other formatting issue, but feel free to >> point

Re: [HACKERS] Document how to set up TAP tests for Perl 5.8.8

2016-11-17 Thread Robert Haas
On Wed, Nov 16, 2016 at 9:54 PM, Craig Ringer wrote: > On 17 November 2016 at 10:42, Craig Ringer wrote: >> But sure, if it's easier, we can have 5.8.0 in the README. What's five >> extra years matter anyway? Hey, while we're at it, lets change Pg to

Re: [HACKERS] Vacuum: allow usage of more than 1GB of work mem

2016-11-17 Thread Robert Haas
On Thu, Nov 17, 2016 at 1:42 PM, Claudio Freire wrote: > Attached is patch 0002 with pgindent applied over it > > I don't think there's any other formatting issue, but feel free to > point a finger to it if I missed any Hmm, I had imagined making all of the segments the

Re: [HACKERS] Vacuum: allow usage of more than 1GB of work mem

2016-11-17 Thread Robert Haas
On Thu, Nov 17, 2016 at 1:42 PM, Claudio Freire wrote: > Attached is patch 0002 with pgindent applied over it > > I don't think there's any other formatting issue, but feel free to > point a finger to it if I missed any Hmm, I had imagined making all of the segments the

Re: [HACKERS] Mail thread references in commits

2016-11-17 Thread Tom Lane
Andrew Dunstan writes: > I love seeing references to email threads in commit messages. It would > make them a lot friendlier though if a full http URL were included > instead of just a Message-ID, I've intentionally not done that, because it does not seem very

Re: [HACKERS] Fun fact about autovacuum and orphan temp tables

2016-11-17 Thread Michael Paquier
On Thu, Nov 17, 2016 at 11:16 AM, Robert Haas wrote: > On Thu, Nov 17, 2016 at 1:41 PM, Michael Paquier > wrote: >> Okay, let's remove the documentation then. What do you think about the >> updated version attached? >> (Even this patch enters

Re: [HACKERS] Mail thread references in commits

2016-11-17 Thread Alvaro Herrera
Robert Haas wrote: > On Thu, Nov 17, 2016 at 4:06 PM, Andres Freund wrote: > > On November 17, 2016 1:02:38 PM PST, Andrew Dunstan > > wrote: > >>I love seeing references to email threads in commit messages. It would > >>make them a lot friendlier though

Re: [HACKERS] Mail thread references in commits

2016-11-17 Thread Alvaro Herrera
Andrew Dunstan wrote: > I love seeing references to email threads in commit messages. It would make > them a lot friendlier though if a full http URL were included instead of > just a Message-ID, i.e. instead of put > . I

Re: [HACKERS] [BUG?] pg_event_trigger_ddl_commands() error with ALTER TEXT SEARCH CONFIGURATION

2016-11-17 Thread Alvaro Herrera
Artur Zakirov wrote: > Hello hackers, > > I attached the test extension. It just creates event trigger on > ddl_command_end. And pg_catalog.pg_event_trigger_ddl_commands() is executed > from extension's C-function handler. > > The pg_event_trigger_ddl_commands() returns the error: > > ERROR:

Re: [HACKERS] Mail thread references in commits

2016-11-17 Thread Robert Haas
On Thu, Nov 17, 2016 at 4:06 PM, Andres Freund wrote: > On November 17, 2016 1:02:38 PM PST, Andrew Dunstan > wrote: >>I love seeing references to email threads in commit messages. It would >>make them a lot friendlier though if a full http URL were

[HACKERS] Mail thread references in commits

2016-11-17 Thread Andrew Dunstan
I love seeing references to email threads in commit messages. It would make them a lot friendlier though if a full http URL were included instead of just a Message-ID, i.e. instead of put . I know this is a bit more

Re: [HACKERS] Mail thread references in commits

2016-11-17 Thread Andres Freund
On November 17, 2016 1:02:38 PM PST, Andrew Dunstan wrote: >I love seeing references to email threads in commit messages. It would >make them a lot friendlier though if a full http URL were included >instead of just a Message-ID, i.e. instead of put

Re: [HACKERS] amcheck (B-Tree integrity checking tool)

2016-11-17 Thread Peter Geoghegan
On Wed, Nov 16, 2016 at 1:03 PM, Andres Freund wrote: > I think the patch could use a pgindent run. Okay. > I'd really want a function that runs all check on a table. Why not just use a custom SQL query? The docs have an example of one such query, that verifies all user

Re: [HACKERS] DECLARE STATEMENT setting up a connection in ECPG

2016-11-17 Thread Michael Meskes
> [System Design Plan] > To support above functionality, ecpg precompiler should support: > - To understand the DECLARE STATEMENT syntax Already does, albeit as a noop. > - Translate the DECLARE STATEMENT into a new function with parameters. >These parameters carry the information like

Re: [HACKERS] Fun fact about autovacuum and orphan temp tables

2016-11-17 Thread Robert Haas
On Thu, Nov 17, 2016 at 1:41 PM, Michael Paquier wrote: > Okay, let's remove the documentation then. What do you think about the > updated version attached? > (Even this patch enters into "Needs Review" state). LGTM. I'll commit it if there are not objections. --

Re: [HACKERS] Declarative partitioning - another take

2016-11-17 Thread Robert Haas
On Thu, Nov 17, 2016 at 6:27 AM, Amit Langote wrote: > Meanwhile, here are updated patch that address most of the following comments. OK, I have re-reviewed 0005 and it looks basically fine to me, modulo a few minor nitpicks. "This is called, *iff*" shouldn't have

Re: [HACKERS] proposal: psql \setfileref

2016-11-17 Thread Pavel Stehule
Hi 2016-11-17 12:00 GMT+01:00 Pavel Stehule : > > Hi > > a independent implementation of parametrized queries can looks like > attached patch: > > this code is simple without any unexpected behave. > > parameters are used when user doesn't require escaping and when >

Re: [HACKERS] Vacuum: allow usage of more than 1GB of work mem

2016-11-17 Thread Claudio Freire
On Thu, Nov 17, 2016 at 2:51 PM, Claudio Freire wrote: > On Thu, Nov 17, 2016 at 2:34 PM, Masahiko Sawada > wrote: >> I glanced at the patches but the both patches don't obey the coding >> style of PostgreSQL. >> Please refer to [1]. >> >> [1] >>

Re: [HACKERS] Fun fact about autovacuum and orphan temp tables

2016-11-17 Thread Michael Paquier
On Thu, Nov 17, 2016 at 7:37 AM, Robert Haas wrote: > The whole point of the review process is to get an opinion from > somebody other than the original author on the patch in question. If > you write a patch and then mark your own patch Ready for Committer, > you're

Re: [HACKERS] patch: function xmltable

2016-11-17 Thread Alvaro Herrera
I've been going over this patch. I think it'd be better to restructure the before adding the docs for this new function; I already split it out, so don't do anything about this. Next, looking at struct TableExprBuilder I noticed that the comments are already obsolete, as they talk about

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

2016-11-17 Thread Michael Paquier
On Thu, Nov 17, 2016 at 8:12 AM, Robert Haas wrote: > So, the problem isn't Darwin-specific. I experimented with this on > Linux and found Linux does the same thing with libpgcommon_srv.a that > macOS does: a file in the archive that is totally unused is omitted > from the

Re: [HACKERS] Vacuum: allow usage of more than 1GB of work mem

2016-11-17 Thread Claudio Freire
On Thu, Nov 17, 2016 at 2:34 PM, Masahiko Sawada wrote: > I glanced at the patches but the both patches don't obey the coding > style of PostgreSQL. > Please refer to [1]. > > [1] >

Re: [HACKERS] Vacuum: allow usage of more than 1GB of work mem

2016-11-17 Thread Masahiko Sawada
On Thu, Oct 27, 2016 at 5:25 AM, Claudio Freire wrote: > On Thu, Sep 15, 2016 at 1:16 PM, Claudio Freire > wrote: >> On Wed, Sep 14, 2016 at 12:24 PM, Claudio Freire >> wrote: >>> On Wed, Sep 14, 2016 at 12:17 PM, Robert

Re: [HACKERS] Hash Indexes

2016-11-17 Thread Robert Haas
On Thu, Nov 17, 2016 at 12:05 PM, Amit Kapila wrote: > Are you expecting a comment change here? > >> +old_blkno = _hash_get_oldblock_from_newbucket(rel, >> opaque->hasho_bucket); >> >> Couldn't you pass "bucket" here instead of "hasho->opaque_bucket"? I >> feel

Re: [HACKERS] Hash Indexes

2016-11-17 Thread Amit Kapila
On Thu, Nov 17, 2016 at 3:08 AM, Robert Haas wrote: > On Sat, Nov 12, 2016 at 12:49 AM, Amit Kapila wrote: >> You are right and I have changed the code as per your suggestion. > > So... > > +/* > + * We always maintain the pin on

Re: [HACKERS] Declarative partitioning - another take

2016-11-17 Thread Robert Haas
On Thu, Nov 17, 2016 at 6:27 AM, Amit Langote wrote: > OK, I will share the performance results soon. Thanks. >> Also, in 0006: >> >> - I doubt that PartitionTreeNodeData's header comment will survive >> contact with pgindent. > > Fixed by adding "/* " at the

Re: [HACKERS] Avoiding pin scan during btree vacuum

2016-11-17 Thread Alvaro Herrera
Alvaro Herrera wrote: > I am ready now to backpatch this to 9.4 and 9.5; here are the patches. > They are pretty similar, but some adjustments were needed due to XLog > format changes in 9.5. (I kept most of Simon's original commit > message.) Finally done. -- Álvaro Herrera

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

2016-11-17 Thread Robert Haas
On Wed, Nov 16, 2016 at 11:28 PM, Michael Paquier wrote: > On Wed, Nov 16, 2016 at 8:04 PM, Michael Paquier > wrote: >> In the current set of patches, the sha2 functions would not get used >> until the main patch for SCRAM gets committed so

Re: [HACKERS] Use of pg_proc.probin is legal?

2016-11-17 Thread Kohei KaiGai
2016-11-16 7:46 GMT-08:00 Tom Lane : > Kohei KaiGai writes: >> On the other hands, interpret_AS_clause() raises an ereport if SQL >> function tries to use probin except >> for C-language. Is it illegal for other languages to use probin field >> to store

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-11-17 Thread Karl O. Pinc
Hi Gilles, On Sun, 30 Oct 2016 02:04:59 -0500 "Karl O. Pinc" wrote: > Attached is a patch to be applied on top of your v10 patch > which does basic fixup to logfile_writename(). I'm looking at the v13 patch and don't see a change I submitted with a patch to v10. You wrote:

Re: [HACKERS] Parallel execution and prepared statements

2016-11-17 Thread Robert Haas
On Thu, Nov 17, 2016 at 10:07 AM, Tobias Bussmann wrote: >> Yeah, we could do something like this, perhaps not in exactly this >> way, but I'm not sure it's a good idea to just execute the parallel >> plan without workers. > > sure, executing parallel plans w/o workers seems a

Re: [HACKERS] Fun fact about autovacuum and orphan temp tables

2016-11-17 Thread Robert Haas
On Wed, Nov 16, 2016 at 11:14 PM, Michael Paquier wrote: > Hm. Thinking about that again, having a GUC to control if orphaned > temp tables in autovacuum is an overkill (who is going to go into this > level of tuning!?) and that we had better do something more

Re: [HACKERS] Assignment of valid collation for SET operations on queries with UNKNOWN types.

2016-11-17 Thread Tom Lane
Rahila Syed writes: > CASE 2: > postgres=# create view v as select 'abc' a; > 2016-11-16 15:28:48 IST WARNING: column "a" has type "unknown" > 2016-11-16 15:28:48 IST DETAIL: Proceeding with relation creation anyway. > WARNING: column "a" has type "unknown" > DETAIL:

Re: [HACKERS] Unlogged tables cleanup

2016-11-17 Thread Robert Haas
On Wed, Nov 16, 2016 at 11:55 PM, Michael Paquier wrote: > On Wed, Nov 16, 2016 at 7:09 PM, Robert Haas wrote: >> On Wed, Nov 16, 2016 at 3:54 PM, Michael Paquier >> wrote: >>> Indeed I missed this comment block.

Re: [HACKERS] Parallel execution and prepared statements

2016-11-17 Thread Tobias Bussmann
> Yeah, we could do something like this, perhaps not in exactly this > way, but I'm not sure it's a good idea to just execute the parallel > plan without workers. sure, executing parallel plans w/o workers seems a bit of a hack. But: - we already do it this way in some other situations - the

Re: [HACKERS] A bug in UCS_to_most.pl

2016-11-17 Thread Kyotaro HORIGUCHI
At Tue, 15 Nov 2016 09:44:54 -0500, Robert Haas wrote in > On Tue, Nov 8, 2016 at 3:56 AM, Kyotaro HORIGUCHI > wrote: > > I was surprised to find that > >

Re: [HACKERS] [PATCH] Generic type subscription

2016-11-17 Thread Dmitry Dolgov
> On 15 November 2016 at 15:03, Aleksander Alekseev < a.aleks...@postgrespro.ru> wrote: > Hello. > > I took a look on the latest -v4 patch. I would like to note that this > patch breaks a backward compatibility. For instance sr_plan extension[1] > stop to compile with errors Thank you for the

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

2016-11-17 Thread Mithun Cy
On Thu, Nov 17, 2016 at 8:27 AM, Robert Haas wrote: >but SELECT pg_is_in_recovery() and SHOW transaction_read_only >exist in older versions so if we pick either of those methods then it >will just work. I am adding next version of the patch it have following fixes.

Re: [HACKERS] pg_hba_file_settings view patch

2016-11-17 Thread Ashutosh Bapat
On Wed, Nov 16, 2016 at 4:40 PM, Ashutosh Bapat wrote: > make check run with this patch shows server crashes. regression.out > attached. I have run make check after a clean build, tried building it > after running configure, but the problem is always reproducible.

Re: [HACKERS] proposal: psql \setfileref

2016-11-17 Thread Pavel Stehule
Hi a independent implementation of parametrized queries can looks like attached patch: this code is simple without any unexpected behave. parameters are used when user doesn't require escaping and when PARAMETRIZED_QUERIES variable is on Regards Pavel diff --git a/src/bin/psql/common.c

Re: [HACKERS] WIP: About CMake v2

2016-11-17 Thread Yury Zhuravlev
Michael Paquier wrote: src/include/port/win32.h:#define putenv(x) pgwin32_putenv(x) and my MSVC2015 drop down here because pgwin32_putenv has wrong signature. I hope it is not true now. -- Yury Zhuravlev Postgres Professional: http://www.postgrespro.com The Russian Postgres Company -- Sent