Re: [HACKERS] [POC] hash partitioning

2017-10-29 Thread Robert Haas
On Tue, Oct 24, 2017 at 1:21 PM, amul sul wrote: > Updated patch attached. This patch needs a rebase. It appears that satisfies_hash_func is declared incorrectly in pg_proc.h. ProcedureCreate seems to think that provariadic should be ANYOID if the type of the last element is

Re: [HACKERS] Index only scan for cube and seg

2017-10-29 Thread Andrey Borodin
Hi! > 29 окт. 2017 г., в 2:24, Alexander Korotkov > написал(а): > > As I can see, cube GiST code always uses DatumGetNDBOX() macro to transform > Datum to (NDBOX *). > > #define DatumGetNDBOX(x) ((NDBOX *) PG_DETOAST_DATUM(x)) > > Thus, it should be safe to

Re: [HACKERS] WIP: Restricting pg_rewind to data/wal dirs

2017-10-29 Thread Robert Haas
On Sat, Oct 28, 2017 at 4:52 PM, Chris Travers wrote: > There are still some cleanup bits needed here but I wanted to get feedback > on my general direction. > > I hope to submit for commit fest soon if the general feedback is good. I think you should submit to the

Re: [HACKERS] Implementing pg_receivewal --no-sync

2017-10-29 Thread Robert Haas
On Sun, Oct 29, 2017 at 3:42 AM, Michael Paquier wrote: > Okay. Here is an updated patch incorporating those comments. Committed with a little wordsmithing on the documentation. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL

Re: [HACKERS] Parallel worker error

2017-10-29 Thread Robert Haas
On Sun, Oct 29, 2017 at 12:02 PM, Amit Kapila wrote: > This patch no longer applies, so attached rebased patches. I have > also created patches for v10 as we might want to backpatch the fix. > Added the patch in CF (https://commitfest.postgresql.org/15/1342/) Thanks. I

Re: [HACKERS] [PATCH] Tests for reloptions

2017-10-29 Thread Nikolay Shaplov
В письме от 19 октября 2017 14:20:52 Вы написали: > Yeah, it would perhaps be good idea to ensure we don't break things that > are documented to work. If the tests don't take too long, I'm not > opposed to testing every single option. As you say, code coverage is > important but it's not the

Re: [HACKERS] Implementing pg_receivewal --no-sync

2017-10-29 Thread Michael Paquier
On Sun, Oct 29, 2017 at 12:31 AM, Robert Haas wrote: > On Sun, Oct 29, 2017 at 3:42 AM, Michael Paquier > wrote: >> Okay. Here is an updated patch incorporating those comments. > > Committed with a little wordsmithing on the documentation.

Re: [HACKERS] taking stdbool.h into use

2017-10-29 Thread Michael Paquier
On Thu, Oct 26, 2017 at 9:25 AM, Peter Eisentraut wrote: > Here is an updated patch set. This is just a rebase of the previous > set, no substantial changes. Based on the discussion so far, I'm > proposing that 0001 through 0007 could be ready to commit after

Re: [HACKERS] Parallel worker error

2017-10-29 Thread Amit Kapila
On Sat, Sep 9, 2017 at 7:56 AM, Amit Kapila wrote: > On Fri, Sep 8, 2017 at 3:13 PM, Robert Haas wrote: >> On Fri, Sep 8, 2017 at 1:17 AM, Amit Kapila wrote: >>> You are right. I have changed the ordering and passed

Re: [HACKERS] MERGE SQL Statement for PG11

2017-10-29 Thread Simon Riggs
On 28 October 2017 at 22:04, Peter Geoghegan wrote: > On Sat, Oct 28, 2017 at 12:49 PM, Simon Riggs wrote: >> Nothing I am proposing blocks later work. > > Actually, many things will block future work if you go down that road. > You didn't respond to the

Re: [HACKERS] proposal: schema variables

2017-10-29 Thread Chris Travers
On Sat, Oct 28, 2017 at 4:56 PM, Pavel Stehule wrote: > >> > The creating database objects and necessary infrastructure is the most > simple task of this project. I'll be more happy if there are zero > intersection because variables and GUC are designed for different

Re: [HACKERS] Parallel worker error

2017-10-29 Thread Robert Haas
On Mon, Oct 30, 2017 at 8:25 AM, Amit Kapila wrote: > Thanks. I have closed this entry in CF app, however, I am not sure > what is the best way to deal with the entry present in PostgreSQL 10 > Open Items page[1]. The entry for this bug seems to be present in > Older

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

2017-10-29 Thread Craig Ringer
On 28 October 2017 at 03:53, Sokolov Yura wrote: > On 2017-10-26 22:01, Sokolov Yura wrote: > Small improvement compared to v7: > - twophase_gid is written with alignment padding in the XactLogCommitRecord > and XactLogAbortRecord. I think Nikhils has done some

Re: [HACKERS] Typos in src/backend/optimizer/README

2017-10-29 Thread Etsuro Fujita
On 2017/10/28 18:15, Robert Haas wrote: On Fri, Oct 27, 2017 at 9:34 AM, Etsuro Fujita wrote: This sentence in the section of Partition-wise joins in src/backend/optimizer/README should be fixed: "This technique of breaking down a join between partition tables into

Re: [HACKERS] Parallel safety for extern params

2017-10-29 Thread Amit Kapila
On Sun, Oct 29, 2017 at 9:55 PM, Robert Haas wrote: > On Sat, Oct 28, 2017 at 8:02 PM, Amit Kapila wrote: >> I think we need to make changes in exec_simple_recheck_plan to make >> the behavior similar to HEAD. With the attached patch, all tests >>

Re: [HACKERS] Reading timeline from pg_control on replication slave

2017-10-29 Thread Craig Ringer
On 28 October 2017 at 06:09, Michael Paquier wrote: > On Fri, Oct 27, 2017 at 1:04 AM, Andrey Borodin wrote: >> I'm working on backups from replication salve in WAL-G [0] >> Backups used to use result of pg_walfile_name(pg_start_backup(...)). Call

[HACKERS] Comment typo

2017-10-29 Thread Etsuro Fujita
Here is a patch to fix a typo in a comment in partition.c: s/specificiation/specification/. Best regards, Etsuro Fujita diff --git a/src/backend/catalog/partition.c b/src/backend/catalog/partition.c index 07fdf66..e234167 100644 --- a/src/backend/catalog/partition.c +++

Re: [HACKERS] Parallel worker error

2017-10-29 Thread Amit Kapila
On Sun, Oct 29, 2017 at 1:15 PM, Robert Haas wrote: > On Sun, Oct 29, 2017 at 12:02 PM, Amit Kapila wrote: >> This patch no longer applies, so attached rebased patches. I have >> also created patches for v10 as we might want to backpatch the fix.

Re: [HACKERS] parallelize queries containing initplans

2017-10-29 Thread Amit Kapila
On Wed, Oct 11, 2017 at 9:24 PM, Robert Haas wrote: > On Mon, Oct 9, 2017 at 5:56 AM, Amit Kapila wrote: >> How about always returning false for PARAM_EXTERN? > > Yeah, I think that's what we should do. Let's do that first as a > separate patch,

Re: [HACKERS] parallelize queries containing initplans

2017-10-29 Thread Amit Kapila
On Wed, Oct 18, 2017 at 2:06 PM, tushar wrote: > On 10/11/2017 12:42 PM, tushar wrote: >> >> On 10/09/2017 03:26 PM, Amit Kapila wrote: >>> >>> I have reverted the check >>> in the attached patch. >> >> >> I have applied this patch against PG HEAD and run sqlsmith

Re: [HACKERS] parallelize queries containing initplans

2017-10-29 Thread Robert Haas
On Mon, Oct 30, 2017 at 9:00 AM, Amit Kapila wrote: > Now that the PARAM_EXTERN issue is fixed, I have rebased this patch. > This patch had been switched to Ready For Committer in last CF, then > Robert had comments which I have addressed, so I think the status > should

Re: [HACKERS] Removing [Merge]Append nodes which contain a single subpath

2017-10-29 Thread Ashutosh Bapat
On Fri, Oct 27, 2017 at 12:49 AM, David Rowley wrote: > On 27 October 2017 at 01:44, Ashutosh Bapat > wrote: >> I think Antonin has a point. The join processing may deem some base >> relations dummy (See

Re: [HACKERS] MERGE SQL Statement for PG11

2017-10-29 Thread Peter Geoghegan
On Sun, Oct 29, 2017 at 4:48 AM, Simon Riggs wrote: > I have no objection to you writing a better version than me and if my > work inspires you to complete that in a reasonable timescale then we > all win. My whole point is that the way that you seem determined to go on

[HACKERS] PANIC: invalid index offnum: 186 when processing BRIN indexes in VACUUM

2017-10-29 Thread Tomas Vondra
Hi, while doing some weekend hacking & testing on the BRIN patches I posted recently, I ran into PANICs in VACUUM, when it summarizes data inserted concurrently (in another session): PANIC: invalid index offnum: 186 Initially I thought it's a bug in my patches, but apparently it's not and

Re: [HACKERS] Parallel safety for extern params

2017-10-29 Thread Robert Haas
On Sat, Oct 28, 2017 at 8:02 PM, Amit Kapila wrote: > I think we need to make changes in exec_simple_recheck_plan to make > the behavior similar to HEAD. With the attached patch, all tests > passed with force_parallel_mode. Committed to REL_10_STABLE. -- Robert Haas

Re: [HACKERS] Parallel Hash take II

2017-10-29 Thread Thomas Munro
On Fri, Oct 27, 2017 at 12:24 AM, Rushabh Lathia wrote: > While re-basing the parallel-B-tree-index-build patch on top v22 patch > sets, found cosmetic review: Thanks! > 1) BufFileSetEstimate is removed but it's still into buffile.h > > +extern size_t

Re: [HACKERS] Jsonb transform for pl/python

2017-10-29 Thread David Fetter
On Wed, Oct 25, 2017 at 02:51:00PM +0300, Anthony Bykov wrote: > Hi. > I've implemented jsonb transform > (https://www.postgresql.org/docs/9.5/static/sql-createtransform.html) > for pl/python. > > 1. '{"1":1}'::jsonb is transformed into dict {"1"=>1}, while > '["1",2]'::jsonb is transformed into

[HACKERS] Re: PANIC: invalid index offnum: 186 when processing BRIN indexes in VACUUM

2017-10-29 Thread Tomas Vondra
FWIW I can reproduce this on REL_10_STABLE, but not on REL9_6_STABLE. So it seems to be due to something that changed in the last release. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-10-29 Thread Andreas Karlsson
Sorry for the very late review. I like this feature and have needed it myself in the past, and the current syntax seems pretty good. One could argue for if the syntax could be generalized to support other things like json and hstore, but I do not think it would be fair to block this patch due

Re: [HACKERS] git down

2017-10-29 Thread Andreas Karlsson
On 10/27/2017 10:51 PM, Erik Rijkers wrote: git.postgresql.org is down/unreachable ( git://git.postgresql.org/git/postgresql.git ) Yes, I noticed this too, but https://git.postgresql.org/git/postgresql.git still works fine. I guess it makes sense to remove unencrypted access, but in that