Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index

2017-11-26 Thread Alexander Korotkov
Hi, Shubham! On Wed, Nov 1, 2017 at 12:10 AM, Shubham Barai wrote: > On 9 October 2017 at 18:57, Alexander Korotkov > wrote: > >> Now, ITSM that predicate locks and conflict checks are placed right for >> now. >> However, it would be good to add couple comments to gistdoinsert() whose >> would

Re: [HACKERS] [PATCH] Pageinspect - add functions on GIN and GiST indexes from gevel

2017-11-26 Thread Michael Paquier
On Thu, Nov 2, 2017 at 3:47 AM, Peter Eisentraut wrote: > So to summarize, I think there is interest in this functionality, but > the patch needs some work. This patch has been waiting for input from its author for three weeks, so I am marking it as returned with feedback. -- Michael

Re: [HACKERS] Is it time to kill support for very old servers?

2017-11-26 Thread Michael Paquier
On Fri, Nov 3, 2017 at 9:30 PM, Michael Paquier wrote: > On Mon, Oct 16, 2017 at 10:08 PM, Andres Freund wrote: >> On 2017-10-16 16:59:59 -0400, Peter Eisentraut wrote: >>> On 9/20/17 04:32, Andres Freund wrote: >>> > Here's what I roughly was thinking of. I don't quite like the name, and >>> >

Re: [HACKERS] Fix bloom WAL tap test

2017-11-26 Thread Michael Paquier
On Mon, Nov 13, 2017 at 7:13 PM, Alexander Korotkov wrote: > On Fri, Nov 10, 2017 at 9:12 PM, Tom Lane wrote: >> I wrote: >> > Is there anything we can do to cut the runtime of the TAP test to >> > the point where running it by default wouldn't be so painful? >> >> As an experiment, I tried simpl

Re: [HACKERS] Crash on promotion when recovery.conf is renamed

2017-11-26 Thread Michael Paquier
On Mon, Oct 2, 2017 at 3:29 PM, Michael Paquier wrote: > On Mon, Oct 2, 2017 at 8:13 AM, Daniel Gustafsson wrote: >> I’ve moved this to the next CF, but since this no longer applies cleanly I’ve >> reset it to Waiting for author. > > Thanks Daniel for the reminder. Attached are rebased patches. T

Re: [HACKERS] More stats about skipped vacuums

2017-11-26 Thread Kyotaro HORIGUCHI
At Mon, 27 Nov 2017 10:03:25 +0900, Michael Paquier wrote in > On Mon, Nov 27, 2017 at 5:19 AM, Tom Lane wrote: > > Robert Haas writes: > >> On Sat, Nov 25, 2017 at 12:09 PM, Tom Lane wrote: > >>> Mumble. It's a property I'm pretty hesitant to give up, especially > >>> since the stats views

[PATCH] Atomic pgrename on Windows

2017-11-26 Thread Alexander Korotkov
Hi! It's assumed in PostgreSQL codebase that pgrename atomically replaces target file with source file even if target file is open and being read by another process. And this assumption is true on Linux, but it's false on Windows. MoveFileEx() triggers an error when target file is open (and acco

Re: [HACKERS] [PATCH] Vacuum: Update FSM more frequently

2017-11-26 Thread Jing Wang
A few general comments. + FreeSpaceMapVacuum(onerel, 64); Just want to know why '64' is used here? It's better to give a description. +else + { + newslot = fsm_get_avail(page, 0); + } Since there is only one line in the else the bracket will not be needed. And there in one more

Re: [HACKERS] GnuTLS support

2017-11-26 Thread Michael Paquier
On Mon, Nov 27, 2017 at 10:28 AM, Andreas Karlsson wrote: > Hm, after reading more of our MSVC code it seems like building with MSVC > does not really use switch, people rather have to create a config.pl. Is > that correct? The MSVC scripts also seems to only support uuid-ossp which it > just call

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-11-26 Thread Etsuro Fujita
(2017/11/27 7:56), Tom Lane wrote: Etsuro Fujita writes: [ fix-rewrite-tlist-v4.patch ] I started reviewing this patch. Great! I did not much like the fact that it effectively moved rewriteTargetListUD to a different file and renamed it. That seems like unnecessary code churn, plus it bre

Re: [HACKERS] pg_stat_wal_write statistics view

2017-11-26 Thread Haribabu Kommi
On Wed, Nov 8, 2017 at 8:46 AM, Robert Haas wrote: > On Tue, Nov 7, 2017 at 4:31 AM, Haribabu Kommi > wrote: > >> Updated patch attached. > > Patch rebased. > > I think the earlier concerns about the performance impact of this are > probably very valid concerns, and I don't see how the new versi

Re: [HACKERS] Support to COMMENT ON DATABASE CURRENT_DATABASE

2017-11-26 Thread Jing Wang
Hi All, This is a patch for current_database working on ALTER ROLE/GRANT/REVOKE statements which should be applied after the previous patch "comment_on_current_database_no_pgdump_v4.4.patch". By using the patch the CURRENT_DATABASE can working in the following SQL statements: ALTER ROLE ... IN D

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2017-11-26 Thread Masahiko Sawada
On Wed, Nov 22, 2017 at 11:32 AM, Masahiko Sawada wrote: > On Wed, Nov 22, 2017 at 5:25 AM, Robert Haas wrote: >> On Mon, Nov 20, 2017 at 5:19 PM, Masahiko Sawada >> wrote: >>> Attached updated version patch. I've moved only relation extension >>> locks out of heavy-weight lock as per discussio

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-11-26 Thread Andreas Karlsson
On 11/13/2017 12:32 PM, Mark Rofail wrote: == The @>> operator I would argue that allocating an array of datums and building an array would have the same complexity I am not sure what you mean here. Just because something has the same complexity does not mean the

Re: [HACKERS] GnuTLS support

2017-11-26 Thread Andreas Karlsson
On 11/27/2017 02:20 AM, Michael Paquier wrote: On Mon, Nov 27, 2017 at 10:05 AM, Andreas Karlsson wrote: The script for the windows version takes the --with-openssl= switch so that cannot just be translated to a single --with-ssl switch. Should to have both --with-openssl and --with-gnutls or -

Typo in config_default.pl comment

2017-11-26 Thread Andreas Karlsson
Hi, There is a --with-tls in the comments in config_default.pl which should be --with-tcl. Andreas diff --git a/src/tools/msvc/config_default.pl b/src/tools/msvc/config_default.pl index 4d69dc2a2e..d7a9fc5039 100644 --- a/src/tools/msvc/config_default.pl +++ b/src/tools/msvc/config_default.pl

Re: [HACKERS] GnuTLS support

2017-11-26 Thread Michael Paquier
On Mon, Nov 27, 2017 at 10:05 AM, Andreas Karlsson wrote: > The script for the windows version takes the > --with-openssl= switch so that cannot just be translated to a single > --with-ssl switch. Should to have both --with-openssl and --with-gnutls or > --with-ssl=(openssl|gnutls) and --with-ssl-

Re: [HACKERS] GnuTLS support

2017-11-26 Thread Andreas Karlsson
On 11/20/2017 02:56 AM, Michael Paquier wrote: On Mon, Nov 20, 2017 at 9:42 AM, Tomas Vondra wrote: If I get it right we ignore gnutls and use openssl (as it's the first checked in #ifdefs). Shouldn't we enforce in configure that only one TLS implementation is enabled? Either by some elaborate

Re: [HACKERS] More stats about skipped vacuums

2017-11-26 Thread Michael Paquier
On Mon, Nov 27, 2017 at 5:19 AM, Tom Lane wrote: > Robert Haas writes: >> On Sat, Nov 25, 2017 at 12:09 PM, Tom Lane wrote: >>> Mumble. It's a property I'm pretty hesitant to give up, especially >>> since the stats views have worked like that since day one. It's >>> inevitable that weakening t

Re: [HACKERS] More stats about skipped vacuums

2017-11-26 Thread Michael Paquier
On Mon, Nov 27, 2017 at 2:49 AM, Tom Lane wrote: > Michael Paquier writes: >> ... Would you think >> that it is acceptable to add the number of index scans that happened >> with the verbose output then? > > I don't have an objection to it, but can't you tell that from VACUUM > VERBOSE already? T

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-11-26 Thread Tom Lane
Etsuro Fujita writes: > [ fix-rewrite-tlist-v4.patch ] I started reviewing this patch. I did not much like the fact that it effectively moved rewriteTargetListUD to a different file and renamed it. That seems like unnecessary code churn, plus it breaks the analogy with rewriteTargetListIU, plus

Re: Memory error in src/backend/replication/logical/origin.c

2017-11-26 Thread Mark Dilger
> On Nov 26, 2017, at 10:28 AM, Tom Lane wrote: > > Mark Dilger writes: >>boolnulls[Natts_pg_replication_origin]; >>memset(&nulls, 0, sizeof(nulls)); > >> around lines 277 through 303. Patch below. > > AFAIK this is not a bug, though I agree that dropping the "&"

Re: [HACKERS] More stats about skipped vacuums

2017-11-26 Thread Tom Lane
Robert Haas writes: > On Sat, Nov 25, 2017 at 12:09 PM, Tom Lane wrote: >> Mumble. It's a property I'm pretty hesitant to give up, especially >> since the stats views have worked like that since day one. It's >> inevitable that weakening that guarantee would break peoples' queries, >> probably

Re: [HACKERS] More stats about skipped vacuums

2017-11-26 Thread Robert Haas
On Sat, Nov 25, 2017 at 12:09 PM, Tom Lane wrote: > Robert Haas writes: >> Of course, the other obvious question is whether we really need a >> consistent snapshot, because that's bound to be pretty expensive even >> if you eliminate the I/O cost. Taking a consistent snapshot across >> all 100,0

Re: Memory error in src/backend/replication/logical/origin.c

2017-11-26 Thread Tom Lane
Mark Dilger writes: > boolnulls[Natts_pg_replication_origin]; > memset(&nulls, 0, sizeof(nulls)); > around lines 277 through 303. Patch below. AFAIK this is not a bug, though I agree that dropping the "&" is probably better style. The reason is that applying "&" to

Memory error in src/backend/replication/logical/origin.c

2017-11-26 Thread Mark Dilger
Hackers, boolnulls[Natts_pg_replication_origin]; ... memset(&nulls, 0, sizeof(nulls)); around lines 277 through 303. Patch below. mark diff --git a/src/backend/replication/logical/origin.c b/src/backend/replication/logical/origin.c index 55382b4b24..88188bd190 10

Re: has_sequence_privilege() never got the memo

2017-11-26 Thread Joe Conway
On 11/23/2017 07:16 AM, Peter Eisentraut wrote: > On 11/22/17 22:58, Tom Lane wrote: >> Joe Conway writes: >>> I just noticed that has_sequence_privilege() never got the memo about >>> "WITH GRANT OPTION". Any objections to the attached going back to all >>> supported versions? >> >> That looks o

Re: [HACKERS] More stats about skipped vacuums

2017-11-26 Thread Tom Lane
Michael Paquier writes: > ... Would you think > that it is acceptable to add the number of index scans that happened > with the verbose output then? I don't have an objection to it, but can't you tell that from VACUUM VERBOSE already? There should be a "INFO: scanned index" line for each scan.

Re: [HACKERS] Fix performance degradation of contended LWLock on NUMA

2017-11-26 Thread Юрий Соколов
2017-11-06 18:07 GMT+03:00 Sokolov Yura : > > On 2017-10-20 11:54, Sokolov Yura wrote: >> >> Hello, >> >> On 2017-10-19 19:46, Andres Freund wrote: >>> >>> On 2017-10-19 14:36:56 +0300, Sokolov Yura wrote: > > + init_local_spin_delay(&delayStatus); > > The way you moved this a

Re: [PATCH] Fix crash in int8_avg_combine().

2017-11-26 Thread Andres Freund
Hi Hadi, On 2017-11-25 22:43:49 -0500, Hadi Moshayedi wrote: > While doing some tests on REL_10_STABLE, I was getting run-time exceptions > at int8_avg_combine() at the following line: > > state1->sumX = state2->sumX; > > After some debugging, I noticed that palloc()’s alignment is 8-bytes, whi

Re: [HACKERS] Cache lookup errors with functions manipulation object addresses

2017-11-26 Thread Michael Paquier
On Fri, Nov 24, 2017 at 9:13 PM, Michael Paquier wrote: > Attached is a rebased patch set. Álvaro, as you have introduced most > of the problems with 4464303 & friends dated of 2015 when you > introduced get_object_address(), could you look at this patch set? Moved to next commit fest. -- Michae

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2017-11-26 Thread Michael Paquier
On Tue, Nov 21, 2017 at 1:36 PM, Michael Paquier wrote: > So attached are rebased patches: > - 0001 to introduce the connection parameter saslchannelbinding, which > allows libpq to enforce the type of channel binding used during an > exchange. > - 0002 to add tls-endpoint as channel binding type,

Re: [HACKERS] More stats about skipped vacuums

2017-11-26 Thread Michael Paquier
On Sun, Nov 26, 2017 at 9:59 AM, Tom Lane wrote: > I'd say so ... that's something the average user will never bother with, > and even if they knew to bother, it's far from obvious what to do with > the information. Besides, I don't think you could just save the number > of scans and nothing else

Re: [HACKERS] [POC] Faster processing at Gather node

2017-11-26 Thread Amit Kapila
On Sat, Nov 25, 2017 at 9:13 PM, Robert Haas wrote: > On Wed, Nov 22, 2017 at 8:36 AM, Amit Kapila wrote: >>> remove-memory-leak-protection-v1.patch removes the memory leak >>> protection that Tom installed upon discovering that the original >>> version of tqueue.c leaked memory like crazy. I th