Re: [HACKERS] [PATCH] Generalized JSON output functions

2015-07-17 Thread Andrew Dunstan
On 07/17/2015 10:11 AM, Andrew Dunstan wrote: On 07/17/2015 08:20 AM, Shulgin, Oleksandr wrote: This patch makes Postgres core more complex Yes, it does. But, that was not the purpose, obviously. :-) while not really solving the problem in Javascript. It still allows for less risk of

Re: [HACKERS] segfault in 9.5alpha - plpgsql function, implicit cast and IMMUTABLE cast function

2015-07-17 Thread Tom Lane
Geoff Winkless pgsqlad...@geoff.dj writes: While doing some testing of 9.5a one of my colleagues (not on list) found a reproducible server segfault. Hm, looks like commit 1345cc67bbb014209714af32b5681b1e11eaf964 is to blame: memory management for the plpgsql cast cache needs to be more

[HACKERS] Re: [COMMITTERS] pgsql: Retain comments on indexes and constraints at ALTER TABLE ... TY

2015-07-17 Thread Michael Paquier
On Fri, Jul 17, 2015 at 11:16 PM, Kevin Grittner kgri...@ymail.com wrote: Heikki Linnakangas heikki.linnakan...@iki.fi wrote: This fixes bug #13126, reported by Kirill Simonov. It looks like you missed something with the addition of AT_ReAddComment: test_ddl_deparse.c:80:11: warning:

Re: [HACKERS] [PATCH] Generalized JSON output functions

2015-07-17 Thread Shulgin, Oleksandr
On Jul 17, 2015 4:31 PM, Andrew Dunstan and...@dunslane.net wrote: On 07/17/2015 10:11 AM, Andrew Dunstan wrote: On 07/17/2015 08:20 AM, Shulgin, Oleksandr wrote: This patch makes Postgres core more complex Yes, it does. But, that was not the purpose, obviously. :-) while not really

Re: [HACKERS] proposal: multiple psql option -c

2015-07-17 Thread Marc Mamin
On Thu, Jul 16, 2015 at 12:42 PM, Pavel Stehule pavel.steh...@gmail.com wrote: Hi can we support multiple -c option? Why? Because some statements like VACUUM cannot be used together with any other statements with single -c option. The current solution is using echo and pipe op, but it is

Re: [HACKERS] Retrieve the snapshot's LSN

2015-07-17 Thread Robert Haas
On Fri, Jul 17, 2015 at 4:16 AM, Florent Guiliani flor...@guiliani.fr wrote: but such an LSN need not exist. Suppose A writes a commit record at LSN 0/1, and then B writes a commit record at 0/10100, and then B calls ProcArrayEndTransaction(). At this point, B is visible and A is not

Re: [HACKERS] [PATCH] Function to get size of asynchronous notification queue

2015-07-17 Thread Robert Haas
On Fri, Jul 17, 2015 at 4:23 AM, Brendan Jurd dire...@gmail.com wrote: On Thu, 16 Jul 2015 at 08:37 Gurjeet Singh gurj...@singh.im wrote: OK. Please send a new patch with the changes you agree to, and I can mark it ready for committer. Done. Please find attached patch v3. I have changed

Re: [HACKERS] [PATCH] postgres_fdw extension support

2015-07-17 Thread Paul Ramsey
  On July 17, 2015 at 12:49:04 AM, Simon Riggs (si...@2ndquadrant.com(mailto:si...@2ndquadrant.com)) wrote: On 17 July 2015 at 01:23, Michael Paquier wrote: Well, as I see it there’s three broad categories of behavior available: 1- Forward nothing non-built-in (current behavior)

Re: [HACKERS] Retrieve the snapshot's LSN

2015-07-17 Thread Florent Guiliani
On Thu, Jul 16, 2015 at 7:13 PM, Andres Freund and...@anarazel.de wrote: On 2015-07-16 13:08:48 -0400, Robert Haas wrote: On Thu, Jul 16, 2015 at 12:54 PM, Andres Freund and...@anarazel.de wrote: Well, in combination with logical decoding it kinda has one: It should allow you to take a dump

Re: [HACKERS] [PATCH] Generalized JSON output functions

2015-07-17 Thread Shulgin, Oleksandr
On Jul 17, 2015 12:23 AM, Ryan Pedela rped...@datalanche.com wrote: On Thu, Jul 16, 2015 at 11:51 AM, Robert Haas robertmh...@gmail.com wrote: I don't understand these issues in great technical depth, but if somebody is arguing that it's OK for PostgreSQL to be difficult to use for a certain

Re: [HACKERS] segfault in 9.5alpha - plpgsql function, implicit cast and IMMUTABLE cast function

2015-07-17 Thread Michael Paquier
On Fri, Jul 17, 2015 at 7:52 PM, Geoff Winkless pgsqlad...@geoff.dj wrote: While doing some testing of 9.5a one of my colleagues (not on list) found a reproducible server segfault. [...] Hope someone can get something useful from the above. Any questions, please ask. A test case is more than

Re: [HACKERS] [PATCH] postgres_fdw extension support

2015-07-17 Thread Simon Riggs
On 17 July 2015 at 13:51, Paul Ramsey pram...@cleverelephant.ca wrote: There’s no facility to add OPTIONS to an EXTENSION right now, so this capability seems to be very much server-by-server (adding a FDW-specific capability to the EXTENSION mechanism seems like overkill for a niche feature

Re: [HACKERS] [PATCH] Generalized JSON output functions

2015-07-17 Thread Andrew Dunstan
On 07/17/2015 08:20 AM, Shulgin, Oleksandr wrote: This patch makes Postgres core more complex Yes, it does. But, that was not the purpose, obviously. :-) while not really solving the problem in Javascript. It still allows for less risk of silent data corruption on the js side. I have

[HACKERS] Re: [COMMITTERS] pgsql: Retain comments on indexes and constraints at ALTER TABLE ... TY

2015-07-17 Thread Kevin Grittner
Heikki Linnakangas heikki.linnakan...@iki.fi wrote: This fixes bug #13126, reported by Kirill Simonov. It looks like you missed something with the addition of AT_ReAddComment: test_ddl_deparse.c:80:11: warning: enumeration value 'AT_ReAddComment' not handled in switch [-Wswitch]

Re: [HACKERS] [PATCH] postgres_fdw extension support

2015-07-17 Thread Paul Ramsey
On July 17, 2015 at 5:57:42 AM, Simon Riggs (si...@2ndquadrant.com(mailto:si...@2ndquadrant.com)) wrote: Options already exist on CREATE FOREIGN DATA WRAPPER, so it should be easy to support that. I'd rather add it once on the wrapper than be forced to list all the options on every

[HACKERS] GSets: Getting collation related error when GSets has text column

2015-07-17 Thread Jeevan Chalke
Hi, When we have text column in the GROUPING SETS (and with some specific order of columns), we are getting error saying could not determine which collation to use for string comparison Here is the example: postgres=# select sum(ten) from onek group by rollup(four::text), two order by 1; ERROR:

Re: [HACKERS] RFC: replace pg_stat_activity.waiting with something more descriptive

2015-07-17 Thread Alexander Korotkov
On Fri, Jul 17, 2015 at 6:05 AM, Tom Lane t...@sss.pgh.pa.us wrote: Peter Geoghegan p...@heroku.com writes: I've heard that clock_gettime() with CLOCK_REALTIME_COARSE, or with CLOCK_MONOTONIC_COARSE can have significantly lower overhead than gettimeofday(). It can, but it also has *much*

Re: [HACKERS] [PATCH] Generalized JSON output functions

2015-07-17 Thread Alvaro Herrera
Andrew Dunstan wrote: I have already pointed out how this patch is fundamentally broken. You can achieve your aims by a fairly small amount of code inside your logical decoder, and with no core code changes whatsoever. So I'm puzzled why we are even still debating this broken design. I went

Re: [HACKERS] TABLESAMPLE patch is really in pretty sad shape

2015-07-17 Thread Petr Jelinek
On 2015-07-16 17:08, Tom Lane wrote: Petr Jelinek p...@2ndquadrant.com writes: On 2015-07-16 15:59, Tom Lane wrote: I'm not clear on whether sequence AMs would need explicit catalog representation, or could be folded down to just a single SQL function with special signature as I suggested for

Re: [HACKERS] [PATCH] Generalized JSON output functions

2015-07-17 Thread Alvaro Herrera
Shulgin, Oleksandr wrote: On Jul 17, 2015 4:31 PM, Andrew Dunstan and...@dunslane.net wrote: Incidentally, this doesn't look acceptable anyway: ! es-json_cxt.value(es-json_cxt, num, JSONTYPE_NUMERIC, ! NUMERICOID, 1702 /* numeric_out */); We don't hardcode function oids elsewhere.

Re: [HACKERS] Grouping Sets: Fix unrecognized node type bug

2015-07-17 Thread Jeevan Chalke
On Wed, Jul 15, 2015 at 10:21 PM, Andrew Gierth and...@tao11.riddles.org.uk wrote: Jeevan == Jeevan Chalke jeevan.cha...@enterprisedb.com writes: Jeevan Hi, Jeevan It looks like we do support nested GROUPING SETS, I mean Sets Jeevan withing Sets, not other types. However this nesting

Re: [HACKERS] Parallel Seq Scan

2015-07-17 Thread Haribabu Kommi
On Thu, Jul 16, 2015 at 1:10 PM, Amit Kapila amit.kapil...@gmail.com wrote: Thanks, I will fix this in next version of patch. I am posting in this thread as I am not sure, whether it needs a separate thread or not? I gone through the code and found that the newly added funnel node is is

Re: [HACKERS] [PATCH] Function to get size of asynchronous notification queue

2015-07-17 Thread Brendan Jurd
On Thu, 16 Jul 2015 at 08:37 Gurjeet Singh gurj...@singh.im wrote: OK. Please send a new patch with the changes you agree to, and I can mark it ready for committer. Done. Please find attached patch v3. I have changed proportion to fraction, and made other wording improvements per your

Re: [HACKERS] [PATCH] postgres_fdw extension support

2015-07-17 Thread Simon Riggs
On 17 July 2015 at 01:23, Michael Paquier michael.paqu...@gmail.com wrote: Well, as I see it there’s three broad categories of behavior available: 1- Forward nothing non-built-in (current behavior) 2- Use options to forward only specified non-built-in things (either in function chunks

Re: [HACKERS] Retrieve the snapshot's LSN

2015-07-17 Thread Florent Guiliani
On Thu, Jul 16, 2015 at 6:40 PM, Robert Haas robertmh...@gmail.com wrote: I don't think the snapshot's LSN has a well-defined meaning in general. The obvious meaning would be the LSN such that all commits prior to that LSN are visible and all later commits are invisible, I like this

Re: [HACKERS] Support for N synchronous standby servers - take 2

2015-07-17 Thread Beena Emerson
Robert Haas wrote: On Thu, Jul 16, 2015 at 1:32 PM, Simon Riggs lt;simon@gt; wrote: Personally, I think we're going to find that using JSON for this rather than a custom syntax makes the configuration strings two or three times as long for They may well be 2-3 times as long. Why is

Re: [HACKERS] Grouping Sets: Fix unrecognized node type bug

2015-07-17 Thread Kyotaro HORIGUCHI
Hello, this looks to be a kind of thinko. The attached patch fixes it. === According to the comment of transformGroupingSet, it assumes that the given GROUPING SETS node is already flatted out and flatten_grouping_sets() does that. The details of the transformation is described in the comment for

[HACKERS] segfault in 9.5alpha - plpgsql function, implicit cast and IMMUTABLE cast function

2015-07-17 Thread Geoff Winkless
Hi all While doing some testing of 9.5a one of my colleagues (not on list) found a reproducible server segfault. We've broken it down to a minimal script to reproduce below. Reproduced on both machines on which we've installed 9.5 so far (both built from source since we don't have any RHEL7

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2015-07-17 Thread Robert Haas
Overall, you seem to have made some significant progress on the design since the last version of this patch. There's probably a lot left to do, but the design seems more mature now. I haven't read the code, but here are some comments based on the email. On Thu, Jul 9, 2015 at 6:18 AM, Ashutosh

Re: [HACKERS] Retrieve the snapshot's LSN

2015-07-17 Thread Robert Haas
On Fri, Jul 17, 2015 at 8:31 AM, Florent Guiliani flor...@guiliani.fr wrote: A pg_export_snapshot_for_slot(...) would work very well. Let me explain the use case. You have many downstream systems that are replicated with logical decoding. Using a dedicated replication slot for each target is

Re: [HACKERS] option for psql - short list non template database

2015-07-17 Thread Robert Haas
On Thu, Jul 16, 2015 at 12:21 AM, Pavel Stehule pavel.steh...@gmail.com wrote: terrible often I use pattern psql -c select datname from pg_database where not datistemplate and datallowconn postgres What about introduction new long option that does it? psql -At -list --names

Re: [HACKERS] GSets: Getting collation related error when GSets has text column

2015-07-17 Thread Andrew Gierth
Jeevan == Jeevan Chalke jeevan.cha...@enterprisedb.com writes: Jeevan Hi, Jeevan When we have text column in the GROUPING SETS (and with some specific Jeevan order of columns), we are getting error saying Jeevan could not determine which collation to use for string comparison Good catch.

Re: [HACKERS] option for psql - short list non template database

2015-07-17 Thread Pavel Stehule
2015-07-17 18:56 GMT+02:00 Robert Haas robertmh...@gmail.com: On Thu, Jul 16, 2015 at 12:21 AM, Pavel Stehule pavel.steh...@gmail.com wrote: terrible often I use pattern psql -c select datname from pg_database where not datistemplate and datallowconn postgres What about

Re: [HACKERS] [PATCH] Generalized JSON output functions

2015-07-17 Thread Andrew Dunstan
On 07/17/2015 10:30 AM, Alvaro Herrera wrote: Andrew Dunstan wrote: I have already pointed out how this patch is fundamentally broken. You can achieve your aims by a fairly small amount of code inside your logical decoder, and with no core code changes whatsoever. So I'm puzzled why we are

Re: [HACKERS] 9.6 First Commitfest Begins

2015-07-17 Thread Heikki Linnakangas
The third week of the July commitfest is now past us. There are 35 patches left in Needs Review state. Progress has slowed somewhat, which is understandable, as the trivial patches often get weeded out first. But we need to make progress on the bigger patches too to complete this. If you see

Re: [HACKERS] Grouping Sets: Fix unrecognized node type bug

2015-07-17 Thread Andrew Gierth
Kyotaro == Kyotaro HORIGUCHI horiguchi.kyot...@lab.ntt.co.jp writes: Kyotaro Hello, this looks to be a kind of thinko. The attached patch Kyotaro fixes it. No, that's still wrong. Just knowing that there is a List is not enough to tell whether to concat it or append it. Jeevan's original

Re: [HACKERS] Further issues with jsonb semantics, documentation

2015-07-17 Thread Peter Geoghegan
On Fri, Jul 17, 2015 at 11:37 AM, Robert Haas robertmh...@gmail.com wrote: I am on vacation right now, but I might have some time tomorrow to deal with it. If not, it will be Sunday or Monday when I get to it. Is this still pending? Yes. -- Peter Geoghegan -- Sent via pgsql-hackers

Re: [HACKERS] Asynchronous execution on FDW

2015-07-17 Thread Robert Haas
On Fri, Jul 3, 2015 at 4:41 PM, Heikki Linnakangas hlinn...@iki.fi wrote: At a quick glance, I think this has all the same problems as starting the execution at ExecInit phase. The correct way to do this is to kick off the queries in the first IterateForeignScan() call. You said that ExecProc

Re: [HACKERS] Further issues with jsonb semantics, documentation

2015-07-17 Thread Robert Haas
On Thu, Jul 9, 2015 at 10:49 AM, Andrew Dunstan and...@dunslane.net wrote: Where are we on this? This is currently a 9.5 release blocker. I am on vacation right now, but I might have some time tomorrow to deal with it. If not, it will be Sunday or Monday when I get to it. Is this still

[HACKERS] Re: [COMMITTERS] pgsql: Retain comments on indexes and constraints at ALTER TABLE ... TY

2015-07-17 Thread Heikki Linnakangas
On 07/17/2015 05:40 PM, Michael Paquier wrote: On Fri, Jul 17, 2015 at 11:16 PM, Kevin Grittner kgri...@ymail.com wrote: Heikki Linnakangas heikki.linnakan...@iki.fi wrote: This fixes bug #13126, reported by Kirill Simonov. It looks like you missed something with the addition of

Re: [HACKERS] Further issues with jsonb semantics, documentation

2015-07-17 Thread Andrew Dunstan
On 07/17/2015 02:37 PM, Robert Haas wrote: On Thu, Jul 9, 2015 at 10:49 AM, Andrew Dunstan and...@dunslane.net wrote: Where are we on this? This is currently a 9.5 release blocker. I am on vacation right now, but I might have some time tomorrow to deal with it. If not, it will be Sunday or

Re: [HACKERS] pgbench - allow backslash-continuations in custom scripts

2015-07-17 Thread Fabien COELHO
Hello Tom, (although actually, why wouldn't we want to just implement variable substitution exactly like it is in psql? Pgbench variable substitution is performed when the script is run, not while the file is being processed for being split, which is when a lexer would be used. The

[HACKERS] patch: enhanced DROP POLICY tab complete

2015-07-17 Thread Pavel Stehule
Hi I am sending trivial patch, that enforce more precious tab complete for DROP POLICY statement Regards Pavel diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c new file mode 100644 index 0683548..9596af6 *** a/src/bin/psql/tab-complete.c --- b/src/bin/psql/tab-complete.c

Re: [HACKERS] Memory Accounting v11

2015-07-17 Thread Jeff Davis
On Fri, 2015-07-17 at 15:52 +1200, David Rowley wrote: Should we mark the patch as returned with feedback in the commitfest app then? I believe the memory accounting patch has been rejected. Instead, the work will be done in the HashAgg patch. Thank you for the review! Regards, Jeff

Re: [HACKERS] Further issues with jsonb semantics, documentation

2015-07-17 Thread Peter Geoghegan
On Fri, Jul 17, 2015 at 6:20 PM, Andrew Dunstan and...@dunslane.net wrote: OK, I have committed this and updated the open issues list on the wiki. Thanks, Andrew. -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] [PROPOSAL] VACUUM Progress Checker.

2015-07-17 Thread Jim Nasby
On 7/15/15 11:38 PM, Thakur, Sameer wrote: Hello, I am not really willing to show up as the picky guy here, but could it be possible to receive those patches as attached to emails instead of having them referenced by URL? I imagine that you are directly using the nabble interface. Just

[HACKERS] WAL test/verification tool

2015-07-17 Thread Thomas Munro
Hi I have heard rumours of a tool that could verify or compare the effects of applying WAL records for testing/development purposes, but I've been unable to track it down or find out if it was publicly released. Does anyone know the status of that or what it was called? Thanks, -- Thomas

[HACKERS] BRIN index and aborted transaction

2015-07-17 Thread Tatsuo Ishii
Forgive me if this has been already discussed somewhere. When a transaction aborts, it seems a BRIN index leaves summary data which is not valid any more. Is this an expected behavior? I guess the answer is yes, because it does not affect correctness of a query result, but I would like to make

Re: [HACKERS] [PATCH] Function to get size of asynchronous notification queue

2015-07-17 Thread Brendan Jurd
On Fri, 17 Jul 2015 at 23:14 Robert Haas robertmh...@gmail.com wrote: Committed. I changed one remaining use of proportion to fraction, fixed an OID conflict, and reverted some unnecessary whitespace changes. Thanks Robert. Sorry I missed a proportion in my latest version, and thanks for

Re: [HACKERS] dblink: add polymorphic functions.

2015-07-17 Thread Corey Huinker
On Wed, Jul 8, 2015 at 12:21 PM, Joe Conway m...@joeconway.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/08/2015 08:51 AM, Corey Huinker wrote: Questions: Would moving rowtype to the first parameter resolve the parameter ambiguity issue? Not for the existing functions

Re: [HACKERS] WAL test/verification tool

2015-07-17 Thread Alvaro Herrera
Thomas Munro wrote: Hi I have heard rumours of a tool that could verify or compare the effects of applying WAL records for testing/development purposes, but I've been unable to track it down or find out if it was publicly released. Does anyone know the status of that or what it was called?

Re: [HACKERS] pg_resetsysid

2015-07-17 Thread Peter Eisentraut
On 6/14/15 11:29 AM, Petr Jelinek wrote: 0002 - Adds pg_resetsysid utility which changes the system id to newly generated one. 0003 - Adds -s option to pg_resetxlog to change the system id to the one specified - this is separate from the other one as it can be potentially more dangerous.

Re: [HACKERS] Support for N synchronous standby servers - take 2

2015-07-17 Thread Jim Nasby
On 7/16/15 12:40 PM, Robert Haas wrote: They may well be 2-3 times as long. Why is that a negative? In my opinion, brevity makes things easier to read and understand. We also don't support multi-line GUCs, so if your configuration takes 140 characters, you're going to have a very long line in

Re: [HACKERS] Support retrieving value from any sequence

2015-07-17 Thread Jim Nasby
On 7/14/15 12:06 PM, Tom Lane wrote: Thom Brown t...@linux.com writes: On 14 July 2015 at 17:17, Robert Haas robertmh...@gmail.com wrote: Since it's trivial to define this function if you need it, I'm not sure there's a reason to include it in core. It's not always possible to create

Re: [HACKERS] Further issues with jsonb semantics, documentation

2015-07-17 Thread Andrew Dunstan
On 07/17/2015 02:49 PM, Andrew Dunstan wrote: On 07/17/2015 02:37 PM, Robert Haas wrote: On Thu, Jul 9, 2015 at 10:49 AM, Andrew Dunstan and...@dunslane.net wrote: Where are we on this? This is currently a 9.5 release blocker. I am on vacation right now, but I might have some time tomorrow