Re: [HACKERS] ExplainModifyTarget doesn't work as expected

2015-02-06 Thread Etsuro Fujita
Hi Ashutosh, Thank you for the review! On 2015/02/03 15:32, Ashutosh Bapat wrote: I agree that it's a problem, and it looks more severe when there are multiple children postgres=# create table parent (a int check (a 0) no inherit); CREATE TABLE postgres=# create table child1 (a int check (a =

Re: [HACKERS] [POC] FETCH limited by bytes.

2015-02-06 Thread Kyotaro HORIGUCHI
Hello, Redshift has a table, stv_inflight, which serves about the same purpose as pg_stat_activity. Redshift seems to perform better with very high fetch sizes (10,000 is a good start), so the default foreign data wrapper didn't perform so well. I agree with you. I was able to confirm that

Re: [HACKERS] EvalPlanQual behaves oddly for FDW queries involving system columns

2015-02-06 Thread Etsuro Fujita
Hi Ashutosh, On 2015/02/03 16:44, Ashutosh Bapat wrote: I am having some minor problems running this repro [Terminal 2] postgres=# create foreign table ft (a int) server loopback options (table_name 'lbt'); There isn't any table lbt mentioned here. Do you mean t here? Sorry,

Re: [HACKERS] Early Setup of instrumentation information in pg_stat_statements

2015-02-06 Thread Robert Haas
On Thu, Feb 5, 2015 at 10:28 AM, Amit Kapila amit.kapil...@gmail.com wrote: Currently in pg_stat_statements, the setup to track instrumentation/totaltime information is done after ExecutorStart(). Can we do this before ExecutorStart()? In particular, I am referring to below code: static

Re: [HACKERS] Parallel Seq Scan

2015-02-06 Thread Robert Haas
On Fri, Feb 6, 2015 at 12:34 PM, Robert Haas robertmh...@gmail.com wrote: 4. Obviously that went out a bit too soon. Anyway, what I think we should do here is back up a bit and talk about what the problems are that we need to solve here and how each of them should be solved. I think there is

Re: [HACKERS] New CF app deployment

2015-02-06 Thread Magnus Hagander
On Mon, Jan 26, 2015 at 10:16 PM, Robert Haas robertmh...@gmail.com wrote: On Mon, Jan 26, 2015 at 4:07 PM, Magnus Hagander mag...@hagander.net wrote: I assume what was referred to was that the old cf app would show the last 3 (I think it was) comments/patches/whatnot on a patch on the

Re: [HACKERS] New CF app deployment

2015-02-06 Thread Magnus Hagander
On Mon, Jan 26, 2015 at 9:46 PM, Robert Haas robertmh...@gmail.com wrote: On Mon, Jan 26, 2015 at 3:24 PM, Magnus Hagander mag...@hagander.net wrote: Yes, and the agreement after that feedback was to try it out and then figure out what changes were needed? As about half the feedback said

Re: [HACKERS] Simplify sleeping while reading/writing from client

2015-02-06 Thread Heikki Linnakangas
On 02/06/2015 10:38 AM, Michael Paquier wrote: On Thu, Feb 5, 2015 at 6:45 PM, Heikki Linnakangas wrote: Looking again at the code after Andres' interrupt-handling patch series, I got confused by the fact that there are several wait-retry loops in different layers, and reading and writing works

Re: [HACKERS] Simplify sleeping while reading/writing from client

2015-02-06 Thread Michael Paquier
On Fri, Feb 6, 2015 at 1:46 PM, Heikki Linnakangas wrote: It simplifies the code to do all the sleeping and interrupt handling code in the upper level, in secure_[read|write]. Do you see a problem with it? Not directly. Reading the code I got uneasy with the fact that we fact unconditionally

Re: [HACKERS] New CF app deployment

2015-02-06 Thread Magnus Hagander
On Mon, Jan 26, 2015 at 10:29 PM, Robert Haas robertmh...@gmail.com wrote: (While I'm complaining, the links only go to the flat version of the thread, while I happen to prefer the version that shows one message at a time with a message-ID selector to switch messages.) Then you're clicking

Re: [HACKERS] PATCH: Reducing lock strength of trigger and foreign key DDL

2015-02-06 Thread Andreas Karlsson
On 02/06/2015 08:16 AM, Michael Paquier wrote: On Fri, Jan 30, 2015 at 10:26 PM, Andreas Karlsson wrote: On 01/30/2015 07:48 AM, Michael Paquier wrote: Looking at the latest patch, it seems that in AlterTableGetLockLevel@tablecmds.c we ought to put AT_ReAddConstraint, AT_AddConstraintRecurse

Re: [HACKERS] Simplify sleeping while reading/writing from client

2015-02-06 Thread Michael Paquier
On Thu, Feb 5, 2015 at 6:45 PM, Heikki Linnakangas wrote: Looking again at the code after Andres' interrupt-handling patch series, I got confused by the fact that there are several wait-retry loops in different layers, and reading and writing works slightly differently. I propose the

Re: [HACKERS] [REVIEW] Re: Compression of full-page-writes

2015-02-06 Thread Fujii Masao
On Fri, Feb 6, 2015 at 4:15 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Thu, Feb 5, 2015 at 11:06 PM, Syed, Rahila rahila.s...@nttdata.com wrote: /* +* We recheck the actual size even if pglz_compress() report success, +* because it might be satisfied with having saved as

Re: [HACKERS] pg_basebackup may fail to send feedbacks.

2015-02-06 Thread Fujii Masao
On Fri, Feb 6, 2015 at 3:22 PM, Kyotaro HORIGUCHI horiguchi.kyot...@lab.ntt.co.jp wrote: Sorry, I misunderstood that. At Wed, 4 Feb 2015 19:22:39 +0900, Fujii Masao masao.fu...@gmail.com wrote in cahgqgwgudgcmnhzinkd37i+jijdkruecrea1ncrs1mmte3r...@mail.gmail.com On Wed, Feb 4, 2015 at

Re: [HACKERS] Parallel Seq Scan

2015-02-06 Thread Daniel Bausch
Hi David and others! David Fetter da...@fetter.org writes: On Tue, Jan 27, 2015 at 08:02:37AM +0100, Daniel Bausch wrote: Tom Lane t...@sss.pgh.pa.us writes: Wait for first IO, issue second IO request Compute Already have second IO request, issue third ... We'd be a lot less

Re: [HACKERS] [REVIEW] Re: Compression of full-page-writes

2015-02-06 Thread Syed, Rahila
In any case, those things have been introduced by what I did in previous versions... And attached is a new patch. Thank you for feedback. /* allocate scratch buffer used for compression of block images */ + if (compression_scratch == NULL) + compression_scratch =

Re: [HACKERS] Parallel Seq Scan

2015-02-06 Thread Amit Kapila
On Thu, Jan 22, 2015 at 10:30 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Jan 22, 2015 at 6:37 AM, Kouhei Kaigai kai...@ak.jp.nec.com wrote: (Please point out me if my understanding is incorrect.) What happen if dynamic background worker process tries to reference temporary

Re: [HACKERS] ExplainModifyTarget doesn't work as expected

2015-02-06 Thread Ashutosh Bapat
Well let's see what others think. Also, we might want to separate that information on result relations heading probably. On Fri, Feb 6, 2015 at 1:35 PM, Etsuro Fujita fujita.ets...@lab.ntt.co.jp wrote: Hi Ashutosh, Thank you for the review! On 2015/02/03 15:32, Ashutosh Bapat wrote: I

Re: [HACKERS] Simplify sleeping while reading/writing from client

2015-02-06 Thread Andres Freund
On 2015-02-05 16:45:50 +0200, Heikki Linnakangas wrote: Looking again at the code after Andres' interrupt-handling patch series, I got confused by the fact that there are several wait-retry loops in different layers, and reading and writing works slightly differently. They don't really work

Re: [HACKERS] New CF app deployment

2015-02-06 Thread Andres Freund
On 2015-02-06 11:51:50 +0100, Magnus Hagander wrote: So in an attempt to actually move this forward in a constructive way I'm going to ignore a bunch of what happened after this email, and fork the discussion at this point. Sounds good. First of all - assuming we'lI fix this particular

Re: [HACKERS] Patch: add recovery_timeout option to control timeout of restore_command nonzero status code

2015-02-06 Thread Fujii Masao
On Fri, Feb 6, 2015 at 1:23 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Thu, Feb 5, 2015 at 11:58 PM, Michael Paquier wrote: An updated patch is attached. I just noticed that the patch I sent was incorrect: - Parameter name was still wal_availability_check_interval and not

Re: [HACKERS] ExplainModifyTarget doesn't work as expected

2015-02-06 Thread Tom Lane
Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: On 2015/02/03 15:32, Ashutosh Bapat wrote: Instead, can we show all the relations that are being modified e.g Update on child1, child2, child3. That will disambiguate everything. That's an idea, but my concern about that is the cases where

Re: [HACKERS] New CF app deployment

2015-02-06 Thread Robert Haas
On Fri, Feb 6, 2015 at 5:51 AM, Magnus Hagander mag...@hagander.net wrote: So in an attempt to actually move this forward in a constructive way I'm going to ignore a bunch of what happened after this email, and fork the discussion at this point. Thanks, and I probably owe you an apology for

Re: [HACKERS] pg_basebackup, tablespace mapping and path canonicalization

2015-02-06 Thread Robert Haas
On Thu, Feb 5, 2015 at 10:21 PM, Ian Barwick i...@2ndquadrant.com wrote: I stumbled on what appears to be inconsistent handling of double slashes in tablespace paths when using pg_basebackup with the -T/--tablespace-mapping option: ibarwick:postgresql (master)$ mkdir /tmp//foo-old [...]

Re: [HACKERS] [REVIEW] Re: Compression of full-page-writes

2015-02-06 Thread Michael Paquier
On Fri, Feb 6, 2015 at 4:30 PM, Michael Paquier wrote: On Fri, Feb 6, 2015 at 3:03 PM, Fujii Masao wrote: Do we always need extra two bytes for compressed backup block? ISTM that extra bytes are not necessary when the hole length is zero. In this case the length of the original backup block

Re: [HACKERS] New CF app deployment

2015-02-06 Thread Robert Haas
On Fri, Feb 6, 2015 at 5:55 AM, Magnus Hagander mag...@hagander.net wrote: On Mon, Jan 26, 2015 at 10:29 PM, Robert Haas robertmh...@gmail.com wrote: (While I'm complaining, the links only go to the flat version of the thread, while I happen to prefer the version that shows one message at a

Re: [HACKERS] [REVIEW] Re: Compression of full-page-writes

2015-02-06 Thread Michael Paquier
On Fri, Feb 6, 2015 at 3:03 PM, Fujii Masao wrote: Do we always need extra two bytes for compressed backup block? ISTM that extra bytes are not necessary when the hole length is zero. In this case the length of the original backup block (i.e., uncompressed) must be BLCKSZ, so we don't need to

Re: [HACKERS] Possible problem with pgcrypto

2015-02-06 Thread Jan Wieck
On 02/05/2015 02:15 PM, Jan Wieck wrote: On 02/05/2015 01:18 PM, Marko Tiikkaja wrote: pgcrypto bug That doesn't look too good, but I can't reproduce it against 9.3.6 either. Attached is an improved script and the final output from it. I ran it over night and it did not reproduce

Re: [HACKERS] INSERT ... ON CONFLICT {UPDATE | IGNORE} 2.0

2015-02-06 Thread Thom Brown
On 29 January 2015 at 23:38, Peter Geoghegan p...@heroku.com wrote: On Sat, Jan 17, 2015 at 6:48 PM, Peter Geoghegan p...@heroku.com wrote: I continued with this since posting V2.0. Attached version (V2.1) fixes bit-rot caused by the recent changes by Stephen (Fix column-privilege leak in

Re: [HACKERS] RangeType internal use

2015-02-06 Thread Tom Lane
Amit Langote langote_amit...@lab.ntt.co.jp writes: I wonder why I cannot find a way to get a range type for a given (sub-) type. I would like to build a RangeType from Datum's of lower and upper bounds. Much like how construct_array() builds an ArrayType from a Datum array of elements given

Re: [HACKERS] [REVIEW] Re: Compression of full-page-writes

2015-02-06 Thread Michael Paquier
On Fri, Feb 6, 2015 at 6:35 PM, Syed, Rahila wrote: The compression patch can use the latest interface MemoryContextAllocExtended to proceed without compression when sufficient memory is not available for scratch buffer. The attached patch introduces OutOfMem flag which is set on when