Re: [HACKERS] INSERT ON CONFLICT and partitioned tables

2017-11-30 Thread Amit Langote
On 2017/12/01 11:01, Amit Langote wrote: > On 2017/12/01 1:02, Robert Haas wrote: >> Second, this would be the first place where the second argument to >> ExecOpenIndices() is passed simply as true. The only other caller >> that doesn't pass constant false is in nodeModifyTable.c and looks >>

Re: Commit fest 2017-11

2017-11-30 Thread Fabien COELHO
Hello Michaël, And the last 21 patches have been classified as well. Here is the final score for this time: Committed: 55. Moved to next CF: 103. Rejected: 1. Returned with Feedback: 47. Total: 206. Thanks to all the contributors for this session! The CF is now closed. Thanks for the CF

Re: [HACKERS] pgbench - allow to store select results into variables

2017-11-30 Thread Fabien COELHO
Hello Michaël, Here is a v14, after yet another rebase, and some comments added to answer your new comments. The last patch sent still applies, but its status of "ready for committer" does not look adapted as this version got no reviews. So I am switching back the patch as "needs review".

Re: Commit fest 2017-11

2017-11-30 Thread Michael Paquier
On Thu, Nov 30, 2017 at 1:51 PM, Michael Paquier wrote: > Remains 22 patches as of now, exactly *one* for each committer. And the last 21 patches have been classified as well. Here is the final score for this time: Committed: 55. Moved to next CF: 103. Rejected: 1.

Re: [HACKERS] pg_basebackup --progress output for batch execution

2017-11-30 Thread Michael Paquier
On Tue, Nov 21, 2017 at 8:24 PM, Martín Marqués wrote: > Thank you very much for reviewing the patch and for your valuable > input (you made me read the Microsoft Visual C specs ;)) + if (!isatty(fileno(stderr))) + fprintf(stderr, "\n"); + else +

Re: [HACKERS] [PATCH] Improve geometric types

2017-11-30 Thread Michael Paquier
On Thu, Nov 30, 2017 at 3:28 AM, Emre Hasegeli wrote: > It would at least be dump-and-restore hazard if we don't let them in. > The new version allows NaNs. > >> This gives a wrong result for NaN-containing objects. > > I removed the NaN aware comparisons from FP macros, and

Re: [HACKERS] postgres_fdw super user checks

2017-11-30 Thread Michael Paquier
On Thu, Nov 30, 2017 at 12:15 PM, Ashutosh Bapat wrote: > On Wed, Nov 29, 2017 at 7:42 PM, Stephen Frost wrote: >> Ashutosh, >> >> * Ashutosh Bapat (ashutosh.ba...@enterprisedb.com) wrote: >>> On Wed, Nov 29, 2017 at 4:56 AM, Stephen Frost

Re: Transform for pl/perl

2017-11-30 Thread Michael Paquier
On Tue, Nov 28, 2017 at 5:14 PM, Aleksander Alekseev wrote: > The new status of this patch is: Ready for Committer Patch moved to CF 2018-01. Perhaps a committer will look at it at some point. -- Michael

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-11-30 Thread Michael Paquier
On Tue, Oct 3, 2017 at 1:20 AM, chenhj wrote: > I had filled the authors field of this patch in commitfest, and will rebase > this patch if needed. Thank you for your help! The documentation of the patch needs a rebase, so I am moving it to next CF with "waiting on author" as

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

2017-11-30 Thread Michael Paquier
On Tue, Nov 28, 2017 at 4:10 AM, Jesper Pedersen wrote: > On 11/27/2017 07:41 AM, Юрий Соколов wrote: >> Oh... there were stupid error in previos file. >> Attached fixed version. > > I can reconfirm my performance findings with this patch; system same as > up-thread.

Re: [HACKERS] GUC for cleanup indexes threshold.

2017-11-30 Thread Michael Paquier
On Thu, Nov 30, 2017 at 12:06 AM, Masahiko Sawada wrote: > On Wed, Nov 29, 2017 at 11:05 PM, Simon Riggs wrote: >> Unless there is disagreement on the above, it seems we should apply >> Yura's patch (an edited version, perhaps). >> > > IIRC the

Re: Use of uninitialized variables in ExecFindPartition() for parent partition without leaves (HEAD only)

2017-11-30 Thread Amit Langote
On 2017/12/01 11:48, Michael Paquier wrote: > On Thu, Nov 30, 2017 at 10:17 AM, Amit Langote > wrote: >> Oops, I messed up taking the diff and mistakenly added noise to the patch. > > Which is that bit: > - * BuildSlotPartitionKeyDescription > + *

Re: [HACKERS] INSERT ON CONFLICT and partitioned tables

2017-11-30 Thread Amit Langote
On 2017/12/01 11:27, Simon Riggs wrote: > On 24 November 2017 at 13:45, Amit Langote > wrote: > >>> Why? There is no caller that needs information. >> >> It is to be used if and when ExecInsert() calls >> ExecCheckIndexConstraints() in the code path to handle ON

Re: [HACKERS] Proposal: Local indexes for partitioned table

2017-11-30 Thread David Rowley
On 1 December 2017 at 01:02, Alvaro Herrera wrote: > we currently (I mean after my > patch) don't mark partitioned-table-level indexes as valid or not valid > depending on whether all its children exist, so trying to use that in > the planner without having a flag could

Re: Doc tweak for huge_pages?

2017-11-30 Thread Thomas Munro
On Fri, Dec 1, 2017 at 5:04 PM, Justin Pryzby wrote: > On Fri, Dec 01, 2017 at 04:01:24PM +1300, Thomas Munro wrote: >> Hi hackers, >> >> The manual implies that only Linux can use huge pages. That is not >> true: FreeBSD, Illumos and probably others support larger page

Re: Protect syscache from bloating with negative cache entries

2017-11-30 Thread Tom Lane
Robert Haas writes: > On Wed, Nov 29, 2017 at 11:17 PM, Tom Lane wrote: >> The thing that makes me uncomfortable about this is that we used to have a >> catcache size limitation mechanism, and ripped it out because it had too >> much overhead (see

Re: [HACKERS] Additional logging for VACUUM and ANALYZE

2017-11-30 Thread Michael Paquier
On Wed, Nov 8, 2017 at 12:54 AM, Fabrízio de Royes Mello wrote: > Great. Changed status to ready for commiter. The patch still applies, but no committer seem to be interested in the topic, so moved to next CF. -- Michael

Re: [HACKERS] Supporting huge pages on Windows

2017-11-30 Thread Michael Paquier
On Fri, Nov 24, 2017 at 9:28 AM, Tsunakawa, Takayuki wrote: > From: Thomas Munro [mailto:thomas.mu...@enterprisedb.com] >> I hope Tsunakawa-san doesn't mind me posting another rebased version of >> his patch. The last version conflicted with the change from SGML

Doc tweak for huge_pages?

2017-11-30 Thread Thomas Munro
Hi hackers, The manual implies that only Linux can use huge pages. That is not true: FreeBSD, Illumos and probably others support larger page sizes using transparent page coalescing algorithms. On my FreeBSD box procstat -v often shows PostgreSQL shared buffers in "S"-flagged memory. I think

Re: [HACKERS] Patch: Add --no-comments to skip COMMENTs with pg_dump

2017-11-30 Thread Michael Paquier
On Wed, Nov 29, 2017 at 5:50 AM, Robert Haas wrote: > On Mon, Aug 7, 2017 at 11:14 AM, Fabrízio de Royes Mello > wrote: >> I also test against all current supported versions (9.2 ... 9.6) and didn't >> find any issue. >> >> Changed status to "ready

Re: [HACKERS] pgbench more operators & functions

2017-11-30 Thread Michael Paquier
On Wed, Oct 25, 2017 at 5:57 PM, Pavel Stehule wrote: > 2017-10-20 18:36 GMT+02:00 Fabien COELHO : > Here is a v13. No code changes, but TAP tests added to maintain pgbench > coverage to green. >> >> >> Here is a v14, which is just a rebase

Re: [HACKERS] pgbench - allow to store select results into variables

2017-11-30 Thread Michael Paquier
On Sat, Nov 4, 2017 at 8:05 PM, Fabien COELHO wrote: >>> Here is a v13, which is just a rebase after the documentation >>> xml-ization. > > Here is a v14, after yet another rebase, and some comments added to answer > your new comments. The last patch sent still applies, but

Re: [HACKERS] pow support for pgbench

2017-11-30 Thread Michael Paquier
On Tue, Nov 7, 2017 at 1:34 AM, Fabien COELHO wrote: > Let's now hope that a committer gets around to consider these patch some > day. Which is not the case yet, so moved to CF 2018-01. Please note that the patch proposed does not apply anymore, so its status is changed to

Re: [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted.

2017-11-30 Thread Michael Paquier
On Wed, Nov 29, 2017 at 7:36 AM, Michael Paquier wrote: > On Wed, Nov 29, 2017 at 6:44 AM, Robert Haas wrote: >> On Tue, Nov 21, 2017 at 4:32 AM, Masahiko Sawada >> wrote: >>> Thank you for comments. Attached updated

Re: [HACKERS] Commits don't block for synchronous replication

2017-11-30 Thread Michael Paquier
On Fri, Nov 24, 2017 at 11:38 PM, Simon Riggs wrote: > On 23 November 2017 at 11:11, Michael Paquier > wrote: > >> This is older than the bug report of this thread. All those >> indications point out that the patch has *not* been committed. So

Re: Use of uninitialized variables in ExecFindPartition() for parent partition without leaves (HEAD only)

2017-11-30 Thread Michael Paquier
On Thu, Nov 30, 2017 at 10:17 AM, Amit Langote wrote: > Oops, I messed up taking the diff and mistakenly added noise to the patch. Which is that bit: - * BuildSlotPartitionKeyDescription + * ExecBuildSlotPartitionKeyDescription > Fixed in the attached. For

Re: [HACKERS] INSERT ON CONFLICT and partitioned tables

2017-11-30 Thread Simon Riggs
On 24 November 2017 at 13:45, Amit Langote wrote: >> Why? There is no caller that needs information. > > It is to be used if and when ExecInsert() calls > ExecCheckIndexConstraints() in the code path to handle ON CONFLICT DO > NOTHING that we're intending to

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

2017-11-30 Thread Michael Paquier
On Wed, Nov 29, 2017 at 7:42 AM, Peter Eisentraut wrote: > On 11/28/17 17:33, Michael Paquier wrote: >> 1) Have a special value in the parameter saslchannelbinding proposed >> in patch 0001. For example by specifying "none" then no channel >> binding is used. > >

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

2017-11-30 Thread Masahiko Sawada
On Fri, Dec 1, 2017 at 3:04 AM, Robert Haas wrote: > On Thu, Nov 30, 2017 at 6:20 AM, Masahiko Sawada > wrote: >>> This code ignores the existence of multiple databases; RELEXTLOCK >>> contains a relid, but no database OID. That's easy enough to

Re: [HACKERS] Refactoring identifier checks to consistently use strcmp

2017-11-30 Thread Michael Paquier
On Fri, Dec 1, 2017 at 4:14 AM, Robert Haas wrote: > I think the changes in DefineView and ATExecSetRelOptions is wrong, > because transformRelOptions() is still using pg_strcasecmp. With the > patch: > > rhaas=# create view v(x) with ("Check_option"="local") as select 1;

Re: Combine function returning NULL unhandled?

2017-11-30 Thread David Rowley
On 24 November 2017 at 14:20, Andres Freund wrote: > Pushed a fix to the relevant branches, including tests of the > trans/combine functions returns NULL cases. Apologies for my silence here. I've been on leave and out of internet range for two weeks. Thank you for making

Re: [HACKERS] GSOC'17 project introduction: Parallel COPY execution with errors handling

2017-11-30 Thread Alvaro Herrera
Alexey Kondratov wrote: > I have rebased my branch and squashed all commits into one, since the > patch is quite small. Everything seems to be working fine now, patch > passes all regression tests. On a *very* quick look, please use an enum to return from NextCopyFrom rather than 'int'. The

Re: Commit fest 2017-11

2017-11-30 Thread Michael Paquier
On Fri, Dec 1, 2017 at 12:44 AM, Andreas Karlsson wrote: > On 11/30/2017 05:51 AM, Michael Paquier wrote:> One thing that could be > improved in my >> >> opinion is that patch authors should try more to move a patch to a >> following commit fest once the end gets close...This

Re: [HACKERS] Custom compression methods

2017-11-30 Thread Alvaro Herrera
Tomas Vondra wrote: > On 11/30/2017 04:20 PM, Ildus Kurbangaliev wrote: > > CREATE COMPRESSION METHOD ts1 FOR tsvector HANDLER > > tsvector_compression_handler; > > Understood. Good to know you've considered it, and I agree it doesn't > need to be there from the start (which makes the patch

Re: using index or check in ALTER TABLE SET NOT NULL

2017-11-30 Thread Sergei Kornilov
Thank you for review! My apologies for my errors. It seems i read developers wiki pages not enough carefully. I will reread wiki, code style and then update patch with all your remarks. > The comment /* T if we added new NOT NULL constraints */ should > probably be changed to /* T if we should

Re: IndexTupleDSize macro seems redundant

2017-11-30 Thread Peter Geoghegan
On Thu, Nov 30, 2017 at 1:48 PM, Robert Haas wrote: > One difference between those two macros is that IndexTupleSize > forcibly casts the argument to IndexTuple, which means that you don't > get any type-checking when you use that one. I suggest that in > addition to

Re: [HACKERS] <> join selectivity estimate question

2017-11-30 Thread Thomas Munro
On Fri, Dec 1, 2017 at 4:05 AM, Robert Haas wrote: > On Wed, Nov 29, 2017 at 11:55 PM, Thomas Munro > wrote: >> Thank you for the original pointer and the commit. Everything here >> seems to make intuitive sense and the accompanying

Re: [HACKERS] Bug in to_timestamp().

2017-11-30 Thread Arthur Zakirov
On Thu, Nov 30, 2017 at 10:39:56AM -0500, Robert Haas wrote: > > So is it now the case that all of the regression test cases in this > patch produce the same results as they would on Oracle? > Yes, exactly. All new cases give the same result as in Oracle, except text of error messages. --

Re: [HACKERS] postgres_fdw bug in 9.6

2017-11-30 Thread Robert Haas
On Wed, Nov 29, 2017 at 5:32 PM, Tom Lane wrote: > AFAICT, [1] just demonstrates that nobody had thought about the scenario > up to that point, not that the subsequently chosen solution was a good > one. But have a look at this:

Re: [HACKERS] Custom compression methods

2017-11-30 Thread Tomas Vondra
On 11/30/2017 04:20 PM, Ildus Kurbangaliev wrote: > On Thu, 30 Nov 2017 00:30:37 +0100 > Tomas Vondra wrote: > > ... > >> I can imagine other interesting use cases - for example values in >> JSONB columns often use the same "schema" (keys, nesting, ...), so >> can

Re: [HACKERS] SQL procedures

2017-11-30 Thread Peter Eisentraut
On 11/29/17 14:17, Andrew Dunstan wrote: > On 11/28/2017 10:03 AM, Peter Eisentraut wrote: >> Here is a new patch that addresses the previous review comments. >> >> If there are no new comments, I think this might be ready to go. > > Looks good to me. Marking ready for committer. committed --

Re: [HACKERS] WIP: Covering + unique indexes.

2017-11-30 Thread Andrey Borodin
Hi, Peter! > 29 нояб. 2017 г., в 8:45, Peter Geoghegan написал(а): > > It looks like amcheck needs to be patched -- a simple oversight. > amcheck is probably calling _bt_compare() without realizing that > internal pages don't have the extra attributes (just leaf pages, > although

Re: [HACKERS] Support to COMMENT ON DATABASE CURRENT_DATABASE

2017-11-30 Thread Robert Haas
On Wed, Nov 29, 2017 at 11:35 PM, Michael Paquier wrote: > On Mon, Nov 27, 2017 at 11:41 AM, Jing Wang wrote: >> This is a patch for current_database working on ALTER ROLE/GRANT/REVOKE >> statements which should be applied after the previous

Re: [HACKERS] [PROPOSAL] Temporal query processing with range types

2017-11-30 Thread Robert Haas
On Tue, Nov 21, 2017 at 4:36 AM, Peter Moser wrote: > Hi hackers, > we like to rethink our approach... > > For simplicity I'll drop ALIGN for the moment and focus solely on NORMALIZE: > > SELECT * FROM (R NORMALIZE S ON R.x = S.y WITH (R.time, S.time)) c; > > Our

Re: [HACKERS] create_unique_path and GEQO

2017-11-30 Thread Robert Haas
On Fri, Mar 24, 2017 at 9:50 AM, Tom Lane wrote: > Yeah. I think the code in mark_dummy_rel is newer and better-thought-out > than what's in create_unique_path. It probably makes sense to change over. I did a bit of archaeology here. create_unique_path() first appears in

Re: ASCII Null control character validation

2017-11-30 Thread Tom Lane
Alexey Chernyshov writes: > I found in src/backend/utils/mb/wchar.c: pg_verify_mbstr_len() that it > reports ASCII Null character (\000) as invalid. As for me, it should > pass validation. This is intentional and we're not going to change it. There is too much code

Re: [HACKERS] postgres_fdw bug in 9.6

2017-11-30 Thread Tom Lane
Etsuro Fujita writes: > (2017/11/30 7:32), Tom Lane wrote: >> the output of the foreign join cannot change during EPQ, since the remote >> server already locked the rows before returning them. The only thing that >> can change is the output of the local scan on

Re: [HACKERS] UPDATE of partition key

2017-11-30 Thread Amit Khandekar
While addressing Thomas's point about test scenarios not yet covered, I observed the following ... Suppose an UPDATE RLS policy with a WITH CHECK clause is defined on the target table. Now In ExecUpdate(), the corresponding WCO qual gets executed *before* the partition constraint check, as per

Re: [HACKERS] postgres_fdw bug in 9.6

2017-11-30 Thread Etsuro Fujita
(2017/11/30 7:32), Tom Lane wrote: AFAICT, [1] just demonstrates that nobody had thought about the scenario up to that point, not that the subsequently chosen solution was a good one. In that example, LockRows (cost=100.00..101.18 rows=4 width=70) Output: tab.a, tab.b, tab.ctid, foo.*,

Re: [HACKERS] INSERT .. ON CONFLICT DO SELECT [FOR ..]

2017-11-30 Thread Marko Tiikkaja
On Thu, Nov 30, 2017 at 6:39 AM, Peter Geoghegan wrote: > On Wed, Nov 29, 2017 at 8:34 PM, Michael Paquier > wrote: > > The patch does not currently apply. I am noticing as well that Peter > > Geoghegan has registered himself as a reviewer a couple of

Re: [HACKERS] Proposal: Local indexes for partitioned table

2017-11-30 Thread Alvaro Herrera
Michael Paquier wrote: > On Wed, Nov 15, 2017 at 2:49 AM, Alvaro Herrera > wrote: > > Here's the remaining bits, rebased. > > At least patch 3 has conflicts with HEAD. I am moving this patch to > next CF per a lack of reviews, switching status to waiting on author.

Re: [HACKERS] Proposal: Local indexes for partitioned table

2017-11-30 Thread Alvaro Herrera
David Rowley wrote: > I wonder if it should be this patches job to alter the code in > get_relation_info() which causes the indexes not to be loaded for > partitioned tables: > > /* > * Make list of indexes. Ignore indexes on system catalogs if told to. > * Don't bother with indexes for an

Re: [HACKERS] Issues with logical replication

2017-11-30 Thread Simon Riggs
On 30 November 2017 at 11:30, Petr Jelinek wrote: > On 30/11/17 00:47, Andres Freund wrote: >> On 2017-11-30 00:45:44 +0100, Petr Jelinek wrote: >>> I don't understand. I mean sure the SnapBuildWaitSnapshot() can live >>> with it, but the problematic logic happens

Re: [HACKERS] logical decoding of two-phase transactions

2017-11-30 Thread Nikhil Sontakke
Hi, >> So perhaps better approach would be to not return >> HEAPTUPLE_DEAD if the transaction id is newer than the OldestXmin (same >> logic we use for deleted tuples of committed transactions) in the >> HeapTupleSatisfiesVacuum() even for aborted transactions. I also briefly >> checked HOT

Re: es_query_dsa is broken

2017-11-30 Thread Thomas Munro
On Thu, Nov 30, 2017 at 4:01 AM, Robert Haas wrote: >> Better ideas? > > How about this: > > 1. Remove es_query_dsa altogether. > 2. Add a dsa_area * to ExecParallelInitializeDSMContext. > 3. In ExecParallelInitializeDSM, pass the dsa_area * as a separate to > the

Re: [HACKERS] create_unique_path and GEQO

2017-11-30 Thread Ashutosh Bapat
On Thu, Nov 30, 2017 at 9:00 AM, Ashutosh Bapat wrote: > On Thu, Nov 30, 2017 at 8:50 AM, Michael Paquier > wrote: >> On Fri, Mar 24, 2017 at 10:50 PM, Tom Lane wrote: >>> Ashutosh Bapat

ASCII Null control character validation

2017-11-30 Thread Alexey Chernyshov
Hello, hackers! I found in src/backend/utils/mb/wchar.c: pg_verify_mbstr_len() that it reports ASCII Null character (\000) as invalid. As for me, it should pass validation. However, ASCII Null character breaks a line and the end of the line is missed, try: INSERT INTO mytable VALUES