Re: [HACKERS] parallel.sgml

2016-10-13 Thread Tom Lane
Tatsuo Ishii writes: >> While reading parallel.sgml, I met with following sentence. >> >> If this occurs, the leader will execute the portion of the plan >> between below the Gather node entirely by itself, >> almost as if the Gather node were not present. >> >> Maybe "the

[HACKERS] signal handling in plpython

2016-10-13 Thread Mario De Frutos Dieguez
Hello everyone :). First of all, I want to introduce me to this list. My name is Mario de Frutos and I work at CARTO :) I come here asking for some advice/help because we're facing some unexpected behavior when we want to interrupt functions doing CPU intensive operations in plpython. Our

[HACKERS] make coverage-html on OS X

2016-10-13 Thread Jim Nasby
I've been trying to get $SUBJECT working, but all my lcov.info files are empty. I'm also getting warnings about no .da files. I've slowly stripped away my normal build environment; I'm now using baseline gcc (no ccache) with the following ./configure... anyone have any ideas how to debug/fix

Re: [HACKERS] Mention to pg_backup in pg_dump.c

2016-10-13 Thread Tom Lane
Michael Paquier writes: > I just bumped into the following thing in pg_dump.c: > /* Set default options based on progname */ > if (strcmp(progname, "pg_backup") == 0) > format = "c"; > As far as I can see this comes from e8f69be0 dated of 2000. Couldn't

Re: [HACKERS] Pluggable storage

2016-10-13 Thread Alvaro Herrera
I have sent the partial patch I have to Hari Babu Kommi. We expect that he will be able to further this goal some more. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list

Re: [HACKERS] How to inspect tuples during execution of a plan?

2016-10-13 Thread Jim Nasby
On 10/12/16 2:58 AM, Ernst-Georg Schmid wrote: Either of those would do, if you want to write change the executor. > I used the ExeceutorRun_hook and it seems to work. The drawback is, that I have to provide my own implementation of ExecutePlan() which could make it incompatible over versions

Re: [HACKERS] [COMMITTERS] pgsql: Remove spurious word.

2016-10-13 Thread Tatsuo Ishii
Shouldn't this be back patched to REL9_6_STABLE as well? Best regards, -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese:http://www.sraoss.co.jp From: Robert Haas Subject: [COMMITTERS] pgsql: Remove spurious word. Date: Thu, 13 Oct

Re: [HACKERS] Conflicting constraint being merged

2016-10-13 Thread Tom Lane
Amit Langote writes: > Currently, if child table has a non-inherited constraint and a constraint > with the same name is added to the parent, it will fail with an error as > illustrated below: > ... > If we had allowed it to be merged, any children of child itself

Re: [HACKERS] emergency outage requiring database restart

2016-10-13 Thread Tom Lane
Merlin Moncure writes: > Today I had an emergency production outage on a server. > ... > Adding all this up it smells like processes were getting stuck on a spinlock. Maybe. If it happens again, probably the most useful debug data would be stack traces from some of the busy

Re: [HACKERS] btree vacuum and suspended scans can deadlock

2016-10-13 Thread Tom Lane
Robert Haas writes: > On Thu, Oct 13, 2016 at 6:33 AM, Amit Kapila wrote: >> If we agree that above is a problematic case, then some of the options >> to solve it could be (a) Vacuum should not wait for a cleanup lock and >> instead just give up

[HACKERS] emergency outage requiring database restart

2016-10-13 Thread Merlin Moncure
Today I had an emergency production outage on a server. This particular server was running 9.5.2. The symptoms were interesting so I thought I'd report. Here is what I saw: *) User CPU was pegged 100% *) Queries reading data would block and not respond to cancel or terminate *)

Re: [HACKERS] parallel.sgml

2016-10-13 Thread Tatsuo Ishii
>> Can someone, possibly a native English speaker, please confirm this is >> typo or not? I cannot parse the sentence as it is, but this maybe >> because I'm not a English speaker. > > Yes, I think removing "between" is correct. Thanks for the confirmation. Fix pushed to master and 9.6 stable.

Re: [HACKERS] btree vacuum and suspended scans can deadlock

2016-10-13 Thread Robert Haas
On Thu, Oct 13, 2016 at 6:33 AM, Amit Kapila wrote: > If we agree that above is a problematic case, then some of the options > to solve it could be (a) Vacuum should not wait for a cleanup lock and > instead just give up and start again which I think is a bad idea (b) >

Re: [HACKERS] Typo in parallel.sqml

2016-10-13 Thread Tatsuo Ishii
> Indeed. It looks like a bad copy-pasto of two sentences gathered together. Thanks! I will commit/push to master and 9.6 stable branches. Best regards, -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese:http://www.sraoss.co.jp -- Sent via pgsql-hackers

[HACKERS] Typo in parallel.sqml

2016-10-13 Thread Tatsuo Ishii
I think this is a typo. Since I am not an English native speaker, I would appreciate if someone confirm this. diff --git a/doc/src/sgml/parallel.sgml b/doc/src/sgml/parallel.sgml index 7f8e902..02173da 100644 --- a/doc/src/sgml/parallel.sgml +++ b/doc/src/sgml/parallel.sgml @@ -339,7 +339,7 @@

Re: [HACKERS] Mention to pg_backup in pg_dump.c

2016-10-13 Thread Michael Paquier
On Fri, Oct 14, 2016 at 5:08 AM, Tom Lane wrote: > Michael Paquier writes: >> I just bumped into the following thing in pg_dump.c: >> /* Set default options based on progname */ >> if (strcmp(progname, "pg_backup") == 0) >> format =

Re: [HACKERS] Typo in parallel.sqml

2016-10-13 Thread Michael Paquier
On Fri, Oct 14, 2016 at 8:41 AM, Tatsuo Ishii wrote: > diff --git a/doc/src/sgml/parallel.sgml b/doc/src/sgml/parallel.sgml > index 7f8e902..02173da 100644 > --- a/doc/src/sgml/parallel.sgml > +++ b/doc/src/sgml/parallel.sgml > @@ -339,7 +339,7 @@ EXPLAIN SELECT * FROM

Re: [HACKERS] Stats sender and 2pc minor problem

2016-10-13 Thread Tom Lane
Stas Kelvich writes: > Statistics sender logic during usual commit and two-phase commit do not > strictly matches each other and that leads to delta_live_tuples added to > n_live_tup in case of truncate in two phase commit. Yeah, that code says it's supposed to match

Re: [HACKERS] Renaming of pg_xlog and pg_clog

2016-10-13 Thread Peter Eisentraut
On 10/12/16 11:22 AM, Tom Lane wrote: > The main problem we're trying to fix here is people thinking that > something with "log" in the name contains discardable data. Just > relocating the directory without renaming it won't improve that. I think it would help if we moved it to something like

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

2016-10-13 Thread Craig Ringer
On 12 October 2016 at 19:51, Shay Rojansky wrote: > Hi all. I thought I'd share some experience from Npgsql regarding > batching/pipelining - hope this isn't off-topic. Not at all. > Npgsql has supported batching for quite a while, similar to what this patch > proposes - with a

Re: [HACKERS] Change of extension name to new name

2016-10-13 Thread Craig Ringer
On 13 October 2016 at 12:37, Tom Lane wrote: > Haribabu Kommi writes: >> As we are planning to change an extension name from one name to another >> name because of additional features that are added into this extension, > > The usual approach to that

Re: [HACKERS] Change of extension name to new name

2016-10-13 Thread Andres Freund
On October 13, 2016 10:12:26 PM PDT, Craig Ringer wrote: >On 13 October 2016 at 12:37, Tom Lane wrote: >> Haribabu Kommi writes: >>> As we are planning to change an extension name from one name to >another >>> name because

[HACKERS] proposal: session server side variables

2016-10-13 Thread Pavel Stehule
Hi, long time I working on this topic. Session server side variables are one major missing feature in PLpgSQL. Now I hope, I can summarize requests for implementation in Postgres: Requirements == 1. Should be used in any PL (PLpgSQL, PLPython, PLPerl, ..) 2. Should not block a

Re: [HACKERS] btree vacuum and suspended scans can deadlock

2016-10-13 Thread Amit Kapila
On Fri, Oct 14, 2016 at 2:52 AM, Robert Haas wrote: > On Thu, Oct 13, 2016 at 6:33 AM, Amit Kapila wrote: >> If we agree that above is a problematic case, then some of the options >> to solve it could be (a) Vacuum should not wait for a cleanup

[HACKERS] Minor improvement to delete.sgml

2016-10-13 Thread Etsuro Fujita
Hi, I think it's better to mention that an alias is needed for the target table specified in the USING clause of a DELETE statement, to set up a self-join, as the documentation on the from_list parameter of UPDATE does. Please find attached a patch. Best regards, Etsuro Fujita

Re: [HACKERS] make coverage-html on OS X

2016-10-13 Thread Peter Eisentraut
On 10/13/16 4:03 PM, Jim Nasby wrote: > I've slowly stripped away my normal build environment; I'm now using > baseline gcc (no ccache) with the following ./configure... anyone have > any ideas how to debug/fix this? Which gcc are you using? -- Peter Eisentraut

Re: [HACKERS] Re: [COMMITTERS] pgsql: Extend framework from commit 53be0b1ad to report latch waits.

2016-10-13 Thread Peter Eisentraut
On 10/12/16 12:04 PM, Robert Haas wrote: > But it's annoying to push code and have it break the buildfarm when > you already did 'make world' and 'make check-world'. What target > should I be using? I don't know why worker_spi is not tested by check-world. It should clearly do that. -- Peter

Re: [HACKERS] patch: function xmltable

2016-10-13 Thread Pavel Stehule
Hi new update - only doc + + Only XPath query language is supported. PostgreSQL doesn't support XQuery + language. Then the syntax of xmltable doesn't + allow to use XQuery related functionality - the name of xml expression + (clause AS) is not allowed, and only one xml

Re: [HACKERS] Re: [COMMITTERS] pgsql: Extend framework from commit 53be0b1ad to report latch waits.

2016-10-13 Thread Peter Eisentraut
On 10/12/16 7:38 PM, Andres Freund wrote: >> We generally don't build test code during make world. > FWIW, I find that quite annoying. I want to run make world with parallelism so > I can run make world afterwards with as little unnecessary > unparallelized work. And since the latter takes just

Re: [HACKERS] btree vacuum and suspended scans can deadlock

2016-10-13 Thread Amit Kapila
On Fri, Oct 14, 2016 at 3:14 AM, Tom Lane wrote: > Robert Haas writes: >> On Thu, Oct 13, 2016 at 6:33 AM, Amit Kapila wrote: >>> If we agree that above is a problematic case, then some of the options >>> to solve it could be

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

2016-10-13 Thread Jim Nasby
On 10/4/16 11:54 PM, Michael Paquier wrote: + +Much like asynchronous query mode, there is no performance disadvantage to +using batching and pipelining. It somewhat increased client application +complexity and extra caution is required to prevent client/server network +

Re: [HACKERS] Reporting wait events for system processes

2016-10-13 Thread Michael Paquier
On Thu, Oct 13, 2016 at 3:46 PM, Michael Paquier wrote: > I think that it would be fine to name it, say pg_stat_system_activity, > and to define it as a system view fed by a SRF function that scans the > arrays of PGPROC entries for background workers, autovacuum

[HACKERS] Reporting wait events for system processes

2016-10-13 Thread Michael Paquier
Hi all, I have been looking at the possibility to support wait events for system processes, and here are the things that I think need to be done: - System processes do not have PGPROC entries in PROC_HDR. I think that we should add an array for system processes, putting in it walwriterLatch,

Re: [HACKERS] pg_dump, pg_dumpall and data durability

2016-10-13 Thread Michael Paquier
On Thu, Oct 13, 2016 at 2:49 PM, Michael Paquier wrote: > - This is effective for all modes, when the user specifies an output > file. In short that's when fileSpec is not NULL. I have sent the email too early here... In this case the sync is a no-op. It is missing a

[HACKERS] Improve OOM handling in pg_locale.c

2016-10-13 Thread Michael Paquier
Hi all, This is a follow-up of https://www.postgresql.org/message-id/11202.1472597262%40sss.pgh.pa.us where we are looking at improving OOM handling in the code. In short, report an ERROR appropriately instead of crashing. As mentioned in this message, pg_locale.c is trickier to handle because we

Re: [HACKERS] FTS Configuration option

2016-10-13 Thread Artur Zakirov
On 13.10.2016 11:54, Emre Hasegeli wrote: Maybe also better to use -> instead of AND? AND would has another behaviour. I could create the following configuration: => ALTER TEXT SEARCH CONFIGURATION multi_conf ALTER MAPPING FOR asciiword, asciihword, hword_asciipart, word, hword,

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

2016-10-13 Thread Mithun Cy
On Fri, Sep 30, 2016 at 2:14 PM, Victor Wagner wrote: >Ok, some trailing whitespace and mixing of tabs and spaces >which git apply doesn't like really present in the patch. >I'm attached hear version with these issues resolved. There were some more trailing spaces and spaces

Re: [HACKERS] FTS Configuration option

2016-10-13 Thread Emre Hasegeli
> With such syntax we also don't need the TSL_FILTER flag for lexeme. At > the current time unaccent extension set this flag to pass a lexeme to > a next dictionary. This flag is used by the text-search parser. It > looks like a hard coded solution. User can't change this behaviour. Exactly. >

Re: [HACKERS] Aggregate Push Down - Performing aggregation on foreign server

2016-10-13 Thread Prabhat Sahu
On Fri, Sep 30, 2016 at 5:23 PM, Jeevan Chalke < jeevan.cha...@enterprisedb.com> wrote: > In the attached patch I have fixed all other review comments you have > posted. All the comments were excellent and helped me a lot to improve > in various areas. > Hi, I have tested and created few

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

2016-10-13 Thread Victor Wagner
On Thu, 13 Oct 2016 12:30:59 +0530 Mithun Cy wrote: > On Fri, Sep 30, 2016 at 2:14 PM, Victor Wagner > wrote: > Okay but for me consistency is also important. Since we agree to > disagree on some of the comments and others have not expressed any

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2016-10-13 Thread Amit Langote
On 2016/10/13 19:37, Ashutosh Bapat wrote: >> In case we can not reach a foreign server during post-commit phase, >> basically the transaction and following transaction should stop until >> the crashed server revived. > > I have repeatedly given reasons why this is not correct. You and Amit >

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2016-10-13 Thread Masahiko Sawada
On Fri, Oct 7, 2016 at 4:25 PM, Ashutosh Bapat wrote: > On Thu, Oct 6, 2016 at 2:52 PM, Amit Langote > wrote: >> On 2016/10/06 17:45, Ashutosh Bapat wrote: >>> On Thu, Oct 6, 2016 at 1:34 PM, Masahiko Sawada

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2016-10-13 Thread Ashutosh Bapat
>> >> If we are successful in COMMITTING foreign transactions during >> post-commit phase, COMMIT message will be returned after we have >> committed all foreign transactions. But in case we can not reach a >> foreign server, and request times out, we can not revert back our >> decision that we

Re: [HACKERS] pg_dump: Simplify internal archive version handling

2016-10-13 Thread Tom Lane
Peter Eisentraut writes: > I propose the attached patch to clean up some redundancy and confusion > in pg_dump. Looks sane, though I'd suggest coding the access macros with shifts not multiplies/divides. Since these numbers are purely internal and not stored in

Re: [HACKERS] munmap() failure due to sloppy handling of hugepage size

2016-10-13 Thread Tom Lane
Andres Freund writes: > On 2016-10-12 16:33:38 -0400, Tom Lane wrote: >> Also, if you look into /sys then you are going to see multiple >> possible values and it's not clear how to choose the right one. > That's a fair point. It'd probably be good to use the largest we can, >

[HACKERS] btree vacuum and suspended scans can deadlock

2016-10-13 Thread Amit Kapila
During Vacuum, cleanup in btree need to acquire cleanup lock on the block and the non-MVCC scans or scans on unlogged index retain the pin on a buffer during scan of a block. Now, if the scan is suspended (use cursor and then fetch one row) after holding a pin on a buffer in Session-1 and in

[HACKERS] Stats sender and 2pc minor problem

2016-10-13 Thread Stas Kelvich
Hello. Statistics sender logic during usual commit and two-phase commit do not strictly matches each other and that leads to delta_live_tuples added to n_live_tup in case of truncate in two phase commit. That can be see in following example: CREATE TABLE trunc_stats_test5(id serial); INSERT

Re: [HACKERS] Add PGDLLEXPORT to PG_FUNCTION_INFO_V1

2016-10-13 Thread Craig Ringer
On 13 Oct. 2016 05:28, "Tom Lane" wrote: > > I wrote: > > Albe Laurenz writes: > >> Tom Lane wrote: > >>> I'm okay with adding PGDLLEXPORT to the extern, but we should update > >>> that comment to note that it's not necessary with any of our standard

[HACKERS] pg_dump: Simplify internal archive version handling

2016-10-13 Thread Peter Eisentraut
I propose the attached patch to clean up some redundancy and confusion in pg_dump. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services >From 41fce2adb8b3051ba1b29f592d4d7b8e52aeb30a Mon Sep 17 00:00:00 2001 From:

Re: [HACKERS] Proposal: scan key push down to heap [WIP]

2016-10-13 Thread Tom Lane
Dilip Kumar writes: > On Thu, Oct 13, 2016 at 6:05 AM, Robert Haas wrote: >> I seriously doubt that this should EVER be supported for anything >> other than "var op const", and even then only for very simple >> operators. > Yes, with existing key