Re: [HACKERS] Behaviour of take over the synchronous replication

2013-08-24 Thread Sawada Masahiko
On Sat, Aug 24, 2013 at 3:14 AM, Josh Berkus j...@agliodbs.com wrote: On 08/23/2013 12:42 AM, Sawada Masahiko wrote: in case (a), those priority is clear. So I think that re-taking over is correct behaviour. OHOT, in case (b), even if AAA and BBB are set same priority, AAA server steals SYNC

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-24 Thread Martijn van Oosterhout
On Fri, Aug 23, 2013 at 06:41:04PM +0530, Amit Kapila wrote: Not with this proposal... If it's fixed then it makes no sense to make it look like it can be modified. This proposal is to have a special include which user can only use for enable/disable which means he can remove

[HACKERS] PL/pgSQL PERFORM with CTE

2013-08-24 Thread Merlin Moncure
On Fri, Aug 23, 2013 at 5:07 PM, Tom Lane t...@sss.pgh.pa.us wrote: Josh Berkus j...@agliodbs.com writes: Currently the only way to return query results to the caller is to use some form of RETURN. It is 100% consistent. I don't find it consistent at all, because what that means is that the

Re: [HACKERS] PL/pgSQL PERFORM with CTE

2013-08-24 Thread Pavel Stehule
2013/8/24 Merlin Moncure mmonc...@gmail.com On Fri, Aug 23, 2013 at 5:07 PM, Tom Lane t...@sss.pgh.pa.us wrote: Josh Berkus j...@agliodbs.com writes: Currently the only way to return query results to the caller is to use some form of RETURN. It is 100% consistent. I don't find it

Re: [HACKERS] Patch for fail-back without fresh backup

2013-08-24 Thread Peter Eisentraut
On Thu, 2013-07-11 at 23:42 +0900, Sawada Masahiko wrote: please find the attached patch. Please fix these compiler warnings: xlog.c:3117:2: warning: implicit declaration of function ‘SyncRepWaitForLSN’ [-Wimplicit-function-declaration] syncrep.c:414:6: warning: variable ‘numdataflush’ set but

Re: [HACKERS] [GENERAL] currval and DISCARD ALL

2013-08-24 Thread Peter Eisentraut
On Fri, 2013-04-19 at 11:58 -0300, Fabrízio de Royes Mello wrote: Ohh sorry... you're all right... I completely forgot to finish the ReleaseSequenceCaches to transverse 'seqtab' linked list and free each node. The attached patch have this correct code. Please fix this compiler warning:

Re: [HACKERS] Re: Proposal/design feedback needed: WITHIN GROUP (sql standard ordered set aggregate functions)

2013-08-24 Thread Peter Eisentraut
On Fri, 2013-07-19 at 21:29 +0530, Atri Sharma wrote: Hi all, This is our current work-in-progress patch for WITHIN GROUP. Please fix these compiler warnings: parse_agg.c: In function ‘check_ungrouped_columns_walker’: parse_agg.c:848:3: warning: passing argument 1 of

Re: [HACKERS] Backup throttling

2013-08-24 Thread Peter Eisentraut
On Wed, 2013-07-24 at 09:20 +0200, Antonin Houska wrote: the purpose of this patch is to limit impact of pg_backup on running server. Feedback is appreciated. Please replace the tabs in the SGML files with spaces. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

Re: [HACKERS] pgbench progress report improvements

2013-08-24 Thread Peter Eisentraut
On Tue, 2013-08-06 at 10:47 +0200, Fabien wrote: Here is a patch submission for reference to the next commitfest. Please replace the tabs in the SGML files with spaces. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] UNNEST with multiple args, and TABLE with multiple funcs

2013-08-24 Thread Peter Eisentraut
On Tue, 2013-08-13 at 13:54 +, Andrew Gierth wrote: Summary: This patch implements a method for expanding multiple SRFs in parallel that does not have the surprising LCM behaviour of SRFs-in-select-list. (Functions returning fewer rows are padded with nulls instead.) Fails to build in

Re: [HACKERS] Detail part for still waiting for lock log message

2013-08-24 Thread Peter Eisentraut
On Tue, 2013-08-20 at 19:21 +0300, Tarvi Pillessaar wrote: About patch: Patch is tested against 9.2.4. I was not sure that i should check if the lock holder's proclock was found (as lock holder's proclock should be always there), check is there to be on the safe side, but maybe it's

Re: [HACKERS] Re: Request for Patch Feedback: Lag Lead Window Functions Can Ignore Nulls

2013-08-24 Thread Peter Eisentraut
On Wed, 2013-08-21 at 22:34 -0400, Nicholas White wrote: but needs a rebase. See attached - thanks! Please fix these compiler warnings: windowfuncs.c: In function ‘leadlag_common’: windowfuncs.c:366:3: warning: passing argument 1 of ‘bms_initialize’ from incompatible pointer type [enabled

Re: [HACKERS] Performance problem in PLPgSQL

2013-08-24 Thread Marc Cousin
On 23/08/2013 23:55, Tom Lane wrote: Pavel Stehule pavel.steh...@gmail.com writes: please, can you send a self explained test this issue should be fixed, and we need a examples. We already had a perfectly good example at the beginning of this thread. What's missing is a decision on how we

Re: [HACKERS] PL/pgSQL PERFORM with CTE

2013-08-24 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: Oracle has a special function for returning sets from procedures - see a new functionality Implicit Result Sets http://tkyte.blogspot.cz/2013/07/12c-implicit-result-sets.html That article is worth reading, because Tom K. points out exactly why

Re: [HACKERS] Performance problem in PLPgSQL

2013-08-24 Thread Tom Lane
Marc Cousin cousinm...@gmail.com writes: On 23/08/2013 23:55, Tom Lane wrote: My previous suggestion was to estimate planning cost as 10 * (length(plan-rangetable) + 1) but on reflection it ought to be scaled by one of the cpu cost constants, so perhaps 1000 * cpu_operator_cost *

[HACKERS] Call for translations

2013-08-24 Thread Peter Eisentraut
In anticipation of the release of PostgreSQL 9.3, it is once again time to update the message translations. We are now in a string freeze, which has traditionally been associated with the first release candidate, so it's a good time to do this work now. If you want to help, see

Re: [HACKERS] pgbench progress report improvements

2013-08-24 Thread Fabien COELHO
Here is a patch submission for reference to the next commitfest. Please replace the tabs in the SGML files with spaces. Attached a v2 with tabs replaced by spaces. -- Fabien.diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c index ad8e272..a90b188 100644 ---

[HACKERS] Unpacking scalar JSON values

2013-08-24 Thread Daniel Farina
Per report of Armin Ronacher, it's not clear how to take a scalar JSON string and unquote it into a regular Postgres text value, given what I can see here: http://www.postgresql.org/docs/9.3/static/functions-json.html Example: SELECT 'a json string'::json; (Although this some problem could play

Re: [HACKERS] Unpacking scalar JSON values

2013-08-24 Thread Hannu Krosing
On 08/24/2013 11:36 PM, Daniel Farina wrote: Per report of Armin Ronacher, it's not clear how to take a scalar JSON string and unquote it into a regular Postgres text value, given what I can see here: http://www.postgresql.org/docs/9.3/static/functions-json.html Example: SELECT 'a json

Re: [HACKERS] Re: Request for Patch Feedback: Lag Lead Window Functions Can Ignore Nulls

2013-08-24 Thread Nicholas White
Please fix these compiler warnings Fixed - see attached. Thanks - lead-lag-ignore-nulls.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Parallel pg_basebackup

2013-08-24 Thread Emanuel Calvo
That looks promising! Thanks Peter! 2013/8/24 Peter Eisentraut pete...@gmx.net On Fri, 2013-08-23 at 10:51 -0300, Emanuel Calvo wrote: I was wondering if there is a proposal for parallelize pg_basebackup There isn't one, but after some talk behind the scenes, I think we should definitely

Re: [HACKERS] Unpacking scalar JSON values

2013-08-24 Thread Daniel Farina
On Sat, Aug 24, 2013 at 3:09 PM, Hannu Krosing ha...@2ndquadrant.com wrote: On 08/24/2013 11:36 PM, Daniel Farina wrote: Per report of Armin Ronacher, it's not clear how to take a scalar JSON string and unquote it into a regular Postgres text value, given what I can see here:

Re: [HACKERS] Unpacking scalar JSON values

2013-08-24 Thread Daniel Farina
On Sat, Aug 24, 2013 at 6:04 PM, Daniel Farina dan...@fdr.io wrote: But there's no good way I can find from the documentation to do it with a scalar: select ('va\lue'::json)::text; Triggered send by accident: select ('va\lue'::json)::text; text --- va\lue (1 row) the JSON escaping

[HACKERS] bitset counting as a user defined function in postgresql 9.2?

2013-08-24 Thread Kanarupan Kularatnarajah
As an initial attempt to try hands-on with postgresql, I've learned on user created functions and some other internals of postgresql. Few materials on postgresql indicate that the aggregate functions are slow due to some internal reasons (index covering, null etc). I'm looking forward to

[HACKERS] What is the algorithm used for counting the set bit (number of ones) of a bitmap/bitarray/betset in postgresql?

2013-08-24 Thread Kanarupan Kularatnarajah
I've come across lookup tables, Hamming weights and Brain Kernighan's Algo. Are they used (combined or separately) in bitmap counting? Where can I find the coding and please explain the flow a count function (for a bit counting) via coding rather than the high level architectural diagrams (which

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-24 Thread Amit Kapila
On Sat, Aug 24, 2013 at 6:08 PM, Martijn van Oosterhout klep...@svana.org wrote: On Fri, Aug 23, 2013 at 06:41:04PM +0530, Amit Kapila wrote: Not with this proposal... If it's fixed then it makes no sense to make it look like it can be modified. This proposal is to have a special