Re: [HACKERS] [COMMITTERS] pgsql: Provide much better wait information in pg_stat_activity.

2016-03-11 Thread Joel Jacobson
On Fri, Mar 11, 2016 at 11:14 AM, Robert Haas wrote: > I'm not direly opposed to most of what's on that page, > but I'm not excited about most of it, either. May I ask, what improvements of PL/pgSQL would you personally be most excited about, if you or someone else would

Re: [HACKERS] [COMMITTERS] pgsql: Provide much better wait information in pg_stat_activity.

2016-03-11 Thread Pavel Stehule
2016-03-11 22:08 GMT+01:00 Robert Haas : > On Fri, Mar 11, 2016 at 3:44 PM, Joel Jacobson wrote: > > On Fri, Mar 11, 2016 at 11:14 AM, Robert Haas > wrote: > >> I'm not direly opposed to most of what's on that page, > >> but I'm

Re: [HACKERS] [COMMITTERS] pgsql: Provide much better wait information in pg_stat_activity.

2016-03-11 Thread Pavel Stehule
2016-03-11 22:32 GMT+01:00 Joel Jacobson : > On Sat, Mar 12, 2016 at 4:08 AM, Robert Haas > wrote: > > > > I don't think my experience in this area is as deep as you seem to > > think. I can tell you that most of the requests EnterpriseDB gets for > >

Re: [HACKERS] eXtensible Transaction Manager API (v2)

2016-03-11 Thread Tom Lane
Robert Haas writes: > On Fri, Mar 11, 2016 at 1:11 PM, David Steele wrote: >> Is anyone willing to volunteer a review or make an argument for the >> importance of this patch? > There's been a lot of discussion on another thread about this patch. > The

Re: [HACKERS] amcheck (B-Tree integrity checking tool)

2016-03-11 Thread Peter Geoghegan
On Thu, Mar 10, 2016 at 9:18 AM, Tomas Vondra wrote: > I've looked at this patch today, mostly to educate myself, so this > probably should not count as a full review. Anyway, the patch seems in > excellent shape - it'd be great if all patches (including those

Re: [HACKERS] Performance improvement for joins where outer side is unique

2016-03-11 Thread Tom Lane
So I started re-reading this thread in preparation for looking at the patch, and this bit in your initial message jumped out at me: > In all of our join algorithms in the executor, if the join type is SEMI, > we skip to the next outer row once we find a matching inner row. This is > because we

Re: [HACKERS] Background Processes and reporting

2016-03-11 Thread Vladimir Borodin
> 12 марта 2016 г., в 0:22, Andres Freund написал(а): > > On 2016-03-11 23:53:15 +0300, Vladimir Borodin wrote: >> It was many times stated in threads about waits monitoring [0, 1, 2] >> and supported by different people, but ultimately waits information >> was stored in

Re: [HACKERS] [COMMITTERS] pgsql: Provide much better wait information in pg_stat_activity.

2016-03-11 Thread Pavel Stehule
2016-03-11 23:22 GMT+01:00 Joel Jacobson : > On Sat, Mar 12, 2016 at 5:09 AM, Pavel Stehule > wrote: > >> What we need is more input on proposed changes from other companies > >> who are also heavy users of PL/pgSQL. > >> > >> Only then can we move

Re: [HACKERS] amcheck (B-Tree integrity checking tool)

2016-03-11 Thread Peter Geoghegan
On Fri, Mar 11, 2016 at 8:19 AM, Anastasia Lubennikova wrote: > I do hope that my patch will be accepted in 9.6, so this conflict looks > really bad. I hope so too. I'll have to look into this issue. > I think that error is caused by changes in pages layout. To

Re: [HACKERS] [COMMITTERS] pgsql: Provide much better wait information in pg_stat_activity.

2016-03-11 Thread Jim Nasby
On 3/10/16 8:36 PM, Robert Haas wrote: 1. We make it true only for heavyweight lock waits, and false for other kinds of waits. That's pretty strange. 2. We make it true for all kinds of waits that we now know how to report. That still breaks compatibility. I would absolutely vote for 2 here.

Re: [HACKERS] Background Processes and reporting

2016-03-11 Thread Andres Freund
On 2016-03-12 02:24:33 +0300, Alexander Korotkov wrote: > Idea of individual time measurement of every wait event met criticism > because it might have high overhead [1]. Right. And that's actually one of the point which I meant with "didn't listen to criticism". There've been a lot of examples,

[HACKERS] PREPARE dynamic SQL in plpgsql

2016-03-11 Thread Koichi Suzuki
Hi, Does someone know how to prepare a synamic SQL statement in plpgsql? All the examples, PG documents describe only about preparing static SQL statement. Thank you; -- Koichi Suzuki

Re: [HACKERS] Background Processes and reporting

2016-03-11 Thread Andres Freund
On 2016-03-11 23:53:15 +0300, Vladimir Borodin wrote: > It was many times stated in threads about waits monitoring [0, 1, 2] > and supported by different people, but ultimately waits information > was stored in PgBackendStatus. Only that it isn't. It's stored in PGPROC. This criticism is true of

Re: [HACKERS] [COMMITTERS] pgsql: Provide much better wait information in pg_stat_activity.

2016-03-11 Thread Joel Jacobson
On Sat, Mar 12, 2016 at 4:08 AM, Robert Haas wrote: > > I don't think my experience in this area is as deep as you seem to > think. I can tell you that most of the requests EnterpriseDB gets for > PL/pgsql enhancements involve wanting it to be more like Oracle's > PL/SQL,

Re: [HACKERS] Perl's newSViv() versus 64-bit ints?

2016-03-11 Thread Tom Lane
I wrote: > Anybody know what will happen when passing a uint64 to newSViv()? Oh, and how about Python's PyInt_FromLong()? Or PyList_New()? Or the second argument of PyList_SetItem()? regards, tom lane -- Sent via pgsql-hackers mailing list

Re: [HACKERS] PREPARE dynamic SQL in plpgsql

2016-03-11 Thread David G. Johnston
On Fri, Mar 11, 2016 at 4:45 PM, Koichi Suzuki wrote: > Hi, > > Does someone know how to prepare a synamic SQL statement in plpgsql? > > All the examples, PG documents describe only about preparing static SQL > statement. > > You might want to rephrase the question. From

Re: [HACKERS] amcheck (B-Tree integrity checking tool)

2016-03-11 Thread Peter Geoghegan
On Fri, Mar 11, 2016 at 1:31 PM, Peter Geoghegan wrote: > You could have a race, where > there was a concurrent page deletion of the left sibling of the child > page, then a concurrent insertion into the newly expanded keyspace of > the parent. Therefore, the downlink in the

Re: [HACKERS] amcheck (B-Tree integrity checking tool)

2016-03-11 Thread Peter Geoghegan
On Fri, Mar 11, 2016 at 8:24 AM, Michael Paquier wrote: > You can use for example dd in non-truncate mode to corrupt on-disk > page data, say that for example: > dd if=/dev/random bs=8192 count=1 \ > seek=$BLOCK_ID of=base/$DBOID/$RELFILENODE \ > conv=notrunc

Re: [HACKERS] Relation extension scalability

2016-03-11 Thread Robert Haas
On Thu, Mar 10, 2016 at 8:54 PM, Petr Jelinek wrote: > I am not talking about extension locks, the lock queue can be long because > there is concurrent DDL for example and then once DDL finishes suddenly 100 > connections that tried to insert into table will try to get

Re: [HACKERS] [COMMITTERS] pgsql: Provide much better wait information in pg_stat_activity.

2016-03-11 Thread Pavel Stehule
2016-03-11 22:48 GMT+01:00 Joel Jacobson : > On Sat, Mar 12, 2016 at 4:41 AM, Pavel Stehule > wrote: > > I afraid so you try to look on your use case as global/generic issue. The > > PL/SQL, ADA. PL/pgSQL are verbose languages, and too shortcuts does

Re: [HACKERS] Performance improvement for joins where outer side is unique

2016-03-11 Thread Tom Lane
I wrote: > I wondered why, instead of inventing an extra semantics-modifying flag, > we couldn't just change the jointype to *be* JOIN_SEMI when we've > discovered that the inner side is unique. BTW, to clarify: I'm not imagining that we'd make this change in the query jointree, as for example

Re: [HACKERS] amcheck (B-Tree integrity checking tool)

2016-03-11 Thread Jim Nasby
On 3/11/16 3:31 PM, Peter Geoghegan wrote: Can we come up with names that more clearly identify the difference >between those two functions? I mean,_parent_ does not make it >particularly obvious that the second function acquires exclusive lock >and performs more thorough checks. Dunno about

[HACKERS] Perl's newSViv() versus 64-bit ints?

2016-03-11 Thread Tom Lane
Anybody know what will happen when passing a uint64 to newSViv()? regards, tom lane -- 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] [COMMITTERS] pgsql: Provide much better wait information in pg_stat_activity.

2016-03-11 Thread Robert Haas
On Fri, Mar 11, 2016 at 3:44 PM, Joel Jacobson wrote: > On Fri, Mar 11, 2016 at 11:14 AM, Robert Haas wrote: >> I'm not direly opposed to most of what's on that page, >> but I'm not excited about most of it, either. > > May I ask, what improvements of

Re: [HACKERS] Background Processes and reporting

2016-03-11 Thread Andres Freund
On 2016-03-12 01:05:43 +0300, Vladimir Borodin wrote: > > 12 марта 2016 г., в 0:22, Andres Freund написал(а): > > Only that it isn't. It's stored in PGPROC. > > Sorry, I missed that. So monitoring of wait events for auxiliary processes > still could be implemented? It's

Re: [HACKERS] pl/pgSQL, get diagnostics and big data

2016-03-11 Thread Tom Lane
"Andreas 'ads' Scherbaum" writes: > On 09.02.2016 20:32, Christian Ullrich wrote: >> To fix this, I think it will be enough to change the format strings to >> use "%zu" instead of "%lu". > Attached is a new version of the patch, with %lu replaced by %zu. Nonono ... that

Re: [HACKERS] WIP: Upper planner pathification

2016-03-11 Thread Andres Freund
On 2016-03-10 23:38:14 -0500, Tom Lane wrote: > > Would you rather add back the exports or should I? > > I'll do it ... just send me the list. After exporting make_agg, make_limit, make_sort_from_sortclauses and making some trivial adjustments due to the pull_var_clause changes change, Citus'

Re: [HACKERS] Proposal: BSD Authentication support

2016-03-11 Thread Thomas Munro
On Sat, Mar 12, 2016 at 5:14 AM, David Steele wrote: > On 1/14/16 11:22 PM, Robert Haas wrote: >> On Tue, Jan 12, 2016 at 2:27 AM, Marisa Emerson wrote: >>> I've attached the latest version of this patch. I've fixed up an issue with >>> the configuration

Re: [HACKERS] [COMMITTERS] pgsql: Provide much better wait information in pg_stat_activity.

2016-03-11 Thread Joel Jacobson
On Sat, Mar 12, 2016 at 4:48 AM, Joel Jacobson wrote: > neither you nor me have nothing to add. Correction: neither you nor me have anything to add. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] [COMMITTERS] pgsql: Provide much better wait information in pg_stat_activity.

2016-03-11 Thread Joel Jacobson
On Sat, Mar 12, 2016 at 4:41 AM, Pavel Stehule wrote: > I afraid so you try to look on your use case as global/generic issue. The > PL/SQL, ADA. PL/pgSQL are verbose languages, and too shortcuts does the > languages dirty. In this point we have different opinion. > > I

Re: [HACKERS] PREPARE dynamic SQL in plpgsql

2016-03-11 Thread David G. Johnston
On Fri, Mar 11, 2016 at 4:45 PM, Koichi Suzuki wrote: > Hi, > > Does someone know how to prepare a synamic SQL statement in plpgsql? > > All the examples, PG documents describe only about preparing static SQL > statement. > > This is not an appropriate question for the

Re: [HACKERS] Relation extension scalability

2016-03-11 Thread Petr Jelinek
On 11/03/16 22:29, Robert Haas wrote: On Thu, Mar 10, 2016 at 8:54 PM, Petr Jelinek wrote: I am not talking about extension locks, the lock queue can be long because there is concurrent DDL for example and then once DDL finishes suddenly 100 connections that tried to

Re: [HACKERS] Background Processes and reporting

2016-03-11 Thread Alexander Korotkov
On Sat, Mar 12, 2016 at 12:22 AM, Andres Freund wrote: > On 2016-03-11 23:53:15 +0300, Vladimir Borodin wrote: > > It was many times stated in threads about waits monitoring [0, 1, 2] > > and supported by different people, but ultimately waits information > > was stored in

Re: [HACKERS] Proposal: RETURNING primary_key()

2016-03-11 Thread Craig Ringer
On 11 March 2016 at 16:00, Vladimir Sitnikov wrote: > Igal, thanks for the analysis. > > Craig>Part of the question for Pg is what exactly we should and should > not be returning. > > I think the following might be a good starting point: return set of > columns that

Re: [HACKERS] Logical decoding slots can go backwards when used from SQL, docs are wrong

2016-03-11 Thread Simon Riggs
On 11 March 2016 at 08:19, Craig Ringer wrote: > Hi all > > I think I found a couple of logical decoding issues while writing tests > for failover slots. > > Despite the docs' claim that a logical slot will replay data "exactly > once", a slot's confirmed_lsn can go

Re: [HACKERS] The plan for FDW-based sharding

2016-03-11 Thread Oleg Bartunov
On Fri, Mar 11, 2016 at 9:09 AM, Bruce Momjian wrote: > > > > 3. I have tried to encourage others to get involved, with limited > success. I do think the FDW is perhaps the only reasonable way to get > _built-in_ sharding. The external sharding solutions are certainly >

Re: [HACKERS] Explain [Analyze] produces parallel scan for select Into table statements.

2016-03-11 Thread Mithun Cy
On Thu, Mar 10, 2016 at 9:39 PM, Robert Haas wrote: >I guess there must not be an occurrence of this pattern in the >regression tests, or previous force_parallel_mode testing would have >found this problem. Perhaps this patch should add one? I have added the test to

Re: [HACKERS] Proposal: RETURNING primary_key()

2016-03-11 Thread Vladimir Sitnikov
Igal, thanks for the analysis. Craig>Part of the question for Pg is what exactly we should and should not be returning. I think the following might be a good starting point: return set of columns that would identify the inserted row(s). E.g. columns of any primary key would do. Columns of any

Re: [HACKERS] The plan for FDW-based sharding

2016-03-11 Thread Bruce Momjian
I have read the recent comments on this thread with great interest. I am glad people have expressed their concerns, rather than remain silent. Now that the responses have decreased, I can reply. I saw several concerns: 1. My motivation for starting this thread was to decrease interest in

[HACKERS] Logical decoding slots can go backwards when used from SQL, docs are wrong

2016-03-11 Thread Craig Ringer
Hi all I think I found a couple of logical decoding issues while writing tests for failover slots. Despite the docs' claim that a logical slot will replay data "exactly once", a slot's confirmed_lsn can go backwards and the SQL functions can replay the same data more than once.We don't mark a

Re: [HACKERS] The plan for FDW-based sharding

2016-03-11 Thread Bruce Momjian
On Fri, Mar 11, 2016 at 04:30:13PM +0800, Craig Ringer wrote: > ... eventually. > > Sometimes the bug reports start. Occasionally you get a "thanks, this looks > interesting/handy". But usually just bug reports or complaints that whatever > you built isn't good enough to meet some random person's

Re: [HACKERS] WIP: Detecting SSI conflicts before reporting constraint violations

2016-03-11 Thread Thomas Munro
On Fri, Mar 11, 2016 at 6:31 PM, Thomas Munro wrote: > This patch introduces a drop-in replacement > check_unique_tuple_still_live to call instead of heap_hot_search. The > replacement function also calls heap_hot_search_buffer, but while it > has the buffer it

Re: [HACKERS] Endless loop calling PL/Python set returning functions

2016-03-11 Thread Alexey Grishchenko
Alexey Grishchenko wrote: > Tom Lane wrote: > >> Alexey Grishchenko writes: >> > No, my fix handles this well. >> > In fact, with the first function call you allocate global variables >> > representing Python function input

Re: [HACKERS] auto_explain sample rate

2016-03-11 Thread Magnus Hagander
On Thu, Mar 10, 2016 at 10:07 PM, Petr Jelinek wrote: > On 10/03/16 20:59, Julien Rouhaud wrote: > >> On 10/03/2016 04:37, Petr Jelinek wrote: >> >>> On 17/02/16 01:17, Julien Rouhaud wrote: >>> Agreed, it's too obscure. Attached v4 fixes as you said.

Re: [HACKERS] Logical decoding slots can go backwards when used from SQL, docs are wrong

2016-03-11 Thread Craig Ringer
On 11 March 2016 at 17:00, Simon Riggs wrote: > > >> Also, pg_logical_slot_get_changes and its _peek_ variant should have a >> param specifying the starting LSN to read and return. If this is lower than >> the restart_lsn but non-null it should ERROR; if it's greater than

Re: [HACKERS] WAL logging problem in 9.4.3?

2016-03-11 Thread Kyotaro HORIGUCHI
Hello, I considered on the original issue. At Fri, 19 Feb 2016 22:27:00 +0900, Michael Paquier wrote in > > Worth noting that this patch does not address the problem with index > > relations when a

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-03-11 Thread Shulgin, Oleksandr
On Thu, Mar 10, 2016 at 9:05 PM, Tom Lane wrote: > Gilles Darold writes: > > Then, should I have to use an alternate file to store the information or > > implement a bidirectional communication with the syslogger? > > I'd just define a new

Re: [HACKERS] Refectoring of receivelog.c

2016-03-11 Thread Magnus Hagander
On Fri, Mar 11, 2016 at 9:40 AM, Daniel Gustafsson wrote: > > On 15 Feb 2016, at 14:46, Magnus Hagander wrote: > > > > On Mon, Feb 15, 2016 at 7:15 AM, Craig Ringer > wrote: > > On 15 February 2016 at

Re: [HACKERS] Refectoring of receivelog.c

2016-03-11 Thread Daniel Gustafsson
> On 15 Feb 2016, at 14:46, Magnus Hagander wrote: > > On Mon, Feb 15, 2016 at 7:15 AM, Craig Ringer > wrote: > On 15 February 2016 at 04:48, Magnus Hagander > wrote:

Re: [HACKERS] amcheck (B-Tree integrity checking tool)

2016-03-11 Thread Peter Geoghegan
On Fri, Mar 11, 2016 at 4:30 PM, Jim Nasby wrote: > Right, but you still have the option to enable them if you don't want to > swamp your IO system. That's why CIC obeys it too. If I was running a > consistency check on a production system I'd certainly want the option

[HACKERS] Re: [COMMITTERS] pgsql: Only try to push down foreign joins if the user mapping OIDs mat

2016-03-11 Thread Andres Freund
Hi, On 2016-01-28 19:09:01 +, Robert Haas wrote: > Only try to push down foreign joins if the user mapping OIDs match. > > Previously, the foreign join pushdown infrastructure left the question > of security entirely up to individual FDWs, but it would be easy for > a foreign data wrapper to

Re: [HACKERS] [COMMITTERS] pgsql: Provide much better wait information in pg_stat_activity.

2016-03-11 Thread Joel Jacobson
On Sat, Mar 12, 2016 at 6:31 AM, Jim Nasby wrote: > On 3/10/16 8:36 PM, Robert Haas wrote: >> >> 1. We make it true only for heavyweight lock waits, and false for >> other kinds of waits. That's pretty strange. >> 2. We make it true for all kinds of waits that we now

Re: [HACKERS] Relation extension scalability

2016-03-11 Thread Jim Nasby
On 3/11/16 5:14 PM, Petr Jelinek wrote: I don't really understand this part about concurrent DDL. If there were concurrent DDL going on, presumably other backends would be blocked on the relation lock, not the relation extension lock - and it doesn't seem likely that you'd often have a huge

Re: [HACKERS] 2016-03 Commitfest

2016-03-11 Thread David Steele
We're are now one third of the way through the 2016-03 Commitfest. There are still some patches left that need review but have no reviewer (https://commitfest.postgresql.org/9/?reviewer=-2) though a lot have been picked up in the last week. Needs review: 56 Needs *reviewer*: 15 (was 58 last

Re: [HACKERS] amcheck (B-Tree integrity checking tool)

2016-03-11 Thread Jim Nasby
On 3/11/16 6:17 PM, Peter Geoghegan wrote: Not sure about the cost delay thing. Delays are disabled by default for manually issued VACUUM, so have doubts that that's useful. Right, but you still have the option to enable them if you don't want to swamp your IO system. That's why CIC obeys it

Re: [HACKERS] Relation extension scalability

2016-03-11 Thread Petr Jelinek
On 12/03/16 01:01, Jim Nasby wrote: On 3/11/16 5:14 PM, Petr Jelinek wrote: I don't really understand this part about concurrent DDL. If there were concurrent DDL going on, presumably other backends would be blocked on the relation lock, not the relation extension lock - and it doesn't seem

Re: [HACKERS] Relation extension scalability

2016-03-11 Thread Petr Jelinek
On 12/03/16 03:46, Dilip Kumar wrote: On Sat, Mar 12, 2016 at 5:31 AM, Jim Nasby > wrote: FWIW, this is definitely a real possibility in any shop that has very high downtime costs and high transaction rates. I also think

Re: [HACKERS] pl/pgSQL, get diagnostics and big data

2016-03-11 Thread Petr Jelinek
On 12/03/16 04:30, Tom Lane wrote: 1. I found two places (marked XXX in this patch) that are using strtoul() to parse a tuple count back out of a command tag. That won't do anymore. pg_stat_statements has a messy hack for the same problem (look for HAVE_STRTOULL), which is probably what we

Re: [HACKERS] amcheck (B-Tree integrity checking tool)

2016-03-11 Thread Peter Geoghegan
On Fri, Mar 11, 2016 at 4:17 PM, Peter Geoghegan wrote: > If you want the tool to limp on when it finds an error, that can be > done by changing the constant for the CORRUPTION macro in amcheck.c. > But having that be dynamically configurable is not really compatible > with the

Re: [HACKERS] Is there a way around function search_path killing SQL function inlining? - and backup / restore issue

2016-03-11 Thread Jim Nasby
On 3/10/16 3:29 PM, Regina Obe wrote: Take for example, I have tiger geocoder which relies on fuzzystrmatch. I have no idea where someone installs fuzzystrmatch so I can't schema qualify those calls. I use that dependent function to use to build an index on tables. This is something I've

Re: [HACKERS] amcheck (B-Tree integrity checking tool)

2016-03-11 Thread Peter Geoghegan
On Fri, Mar 11, 2016 at 3:50 PM, Jim Nasby wrote: > I also agree that the nmodule name isn't very clear. If this is meant to be > the start of a generic consistency checker, lets call it that. Otherwise, it > should be marked as being specific to btrees, because

Re: [HACKERS] amcheck (B-Tree integrity checking tool)

2016-03-11 Thread Tomas Vondra
On Fri, 2016-03-11 at 16:40 -0800, Peter Geoghegan wrote: > On Fri, Mar 11, 2016 at 4:17 PM, Peter Geoghegan > wrote: > > > > If you want the tool to limp on when it finds an error, that can be > > done by changing the constant for the CORRUPTION macro in > > amcheck.c. > > But

Re: [HACKERS] Proposal: BSD Authentication support

2016-03-11 Thread Peter Eisentraut
On 3/11/16 4:38 PM, Thomas Munro wrote: > It looks like this needs review from an OpenBSD user specifically. > FreeBSD and NetBSD use PAM instead of BSD auth. FreeBSD has man pages for this stuff, so maybe they also have it now. -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Proposal: BSD Authentication support

2016-03-11 Thread Peter Eisentraut
On 1/7/16 9:40 PM, Marisa Emerson wrote: > There's a port for PAM, but we would prefer to use BSD Auth as its quite > a lot cleaner and is standard on OpenBSD. > > I've attached an updated patch that includes documentation. It has been > tested against OpenBSD 5.8. I'll add this thread to the

Re: [HACKERS] pl/pgSQL, get diagnostics and big data

2016-03-11 Thread Tom Lane
I wrote: > I'll take it from here, unless I find bigger issues. Hmm ... so the more I pulled on this string, the more stuff I found. The attached updated patch fixes several additional significant areas: * call_cntr and max_calls in FuncCallContext are now uint64 * Result widths for

Re: [HACKERS] Perl's newSViv() versus 64-bit ints?

2016-03-11 Thread Andrew Dunstan
On 03/11/2016 06:49 PM, Tom Lane wrote: Anybody know what will happen when passing a uint64 to newSViv()? A perl IV is guaranteed large enough to hold a pointer, if that's any help. But for an unsigned value you might be better off calling newSVuv() cheers

Re: [HACKERS] Relation extension scalability

2016-03-11 Thread Dilip Kumar
On Sat, Mar 12, 2016 at 5:31 AM, Jim Nasby wrote: > FWIW, this is definitely a real possibility in any shop that has very high > downtime costs and high transaction rates. > > I also think some kind of clamp is a good idea. It's not that uncommon to > run

Re: [HACKERS] Relation extension scalability

2016-03-11 Thread Amit Kapila
On Sat, Mar 12, 2016 at 8:16 AM, Dilip Kumar wrote: > > > On Sat, Mar 12, 2016 at 5:31 AM, Jim Nasby wrote: >> >> FWIW, this is definitely a real possibility in any shop that has very high downtime costs and high transaction rates. >> >> I also

Re: [HACKERS] Parallel Aggregate

2016-03-11 Thread David Rowley
On 11 March 2016 at 03:39, David Rowley wrote: > A couple of things which I'm not 100% happy with. > > 1. make_partialgroup_input_target() doing lookups to the syscache. > Perhaps this job can be offloaded to a new function in a more suitable > location. Ideally the

Re: [HACKERS] WIP: Detecting SSI conflicts before reporting constraint violations

2016-03-11 Thread Kevin Grittner
On Thu, Mar 10, 2016 at 1:50 PM, Simon Riggs wrote: > On 3 February 2016 at 23:12, Thomas Munro > wrote: > >> It quacks suspiciously like a bug. > > Agreed > > What's more important is that is very publicly a bug in the eyes > of others and

Re: [HACKERS] Refactoring speculative insertion with unique indexes a little

2016-03-11 Thread Robert Haas
On Mon, Jan 18, 2016 at 3:14 PM, Peter Geoghegan wrote: > On Mon, Jan 18, 2016 at 11:56 AM, Alvaro Herrera > wrote: >>> That's because I believe this is quite broken, as already pointed out. >> >> I think I like your approach better. > > That makes

[HACKERS] Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Windows service is not starting so there’s message in log: FATAL: "could not create shared memory segment “Global/PostgreSQL.851401618”: Permission

2016-03-11 Thread Haribabu Kommi
On Fri, Mar 11, 2016 at 11:15 PM, Amit Kapila wrote: > On Fri, Mar 11, 2016 at 5:21 PM, Haribabu Kommi > wrote: >> >> On Fri, Mar 11, 2016 at 12:00 AM, Amit Kapila >> wrote: >> > >> > Okay, so one probable theory for

Re: [HACKERS] Sanity checking for ./configure options?

2016-03-11 Thread Robert Haas
On Sat, Feb 27, 2016 at 3:15 PM, Jim Nasby wrote: > On 2/26/16 9:29 PM, Peter Eisentraut wrote: >> To make this really robust, you might need to do pattern matching on the >> value. > > Yeah, and I don't see any reasonable way to do that... we don't require sed > or the

Re: [HACKERS] dblink: add polymorphic functions.

2016-03-11 Thread Robert Haas
On Thu, Jan 28, 2016 at 6:12 AM, Alvaro Herrera wrote: > Joe Conway wrote: > >> Ok, back to the drawing board. Thanks for the feedback. > > Closing this one as returned-with-feedback. Please do resubmit for > CF 2016-03. Joe, it looks like you reactivated this patch

Re: [HACKERS] Logical decoding slots can go backwards when used from SQL, docs are wrong

2016-03-11 Thread Alvaro Herrera
Craig Ringer wrote: > Hi all > > I think I found a couple of logical decoding issues while writing tests for > failover slots. > > Despite the docs' claim that a logical slot will replay data "exactly > once", a slot's confirmed_lsn can go backwards and the SQL functions can > replay the same

[HACKERS] Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Windows service is not starting so there’s message in log: FATAL: "could not create shared memory segment “Global/PostgreSQL.851401618”: Permission

2016-03-11 Thread Amit Kapila
On Fri, Mar 11, 2016 at 5:21 PM, Haribabu Kommi wrote: > > On Fri, Mar 11, 2016 at 12:00 AM, Amit Kapila wrote: > > > > Okay, so one probable theory for such an error could be that when there is > > already an object with same name exists, this

Re: [HACKERS] WIP: Detecting SSI conflicts before reporting constraint violations

2016-03-11 Thread Kevin Grittner
On Thu, Mar 10, 2016 at 11:31 PM, Thomas Munro wrote: > Here's a much simpler version with more comments > It handles the same set of isolation test specs. I'm impressed that you found a one-line patch that seems to get us 90% of the way to a new guarantee; but I

Re: [HACKERS] \x auto and EXPLAIN

2016-03-11 Thread Robert Haas
On Sun, Jan 3, 2016 at 4:36 AM, Andreas Karlsson wrote: > psql's "\x auto" is a nice feature, but it is made much less useful in my > opinion due to the expanded output format making query plans unreadable (and > query plans often end up using expanded display due to their

Re: [HACKERS] Tsvector editing functions

2016-03-11 Thread Stas Kelvich
> On 10 Mar 2016, at 20:29, Teodor Sigaev wrote: > > I would like to suggest rename both functions to array_to_tsvector and > tsvector_to_array to have consistent name. Later we could add > to_tsvector([regconfig, ], text[]) with morphological processing. > > Thoughts? >

Re: [HACKERS] dblink: add polymorphic functions.

2016-03-11 Thread Joe Conway
On 03/11/2016 08:31 AM, Robert Haas wrote: > On Thu, Jan 28, 2016 at 6:12 AM, Alvaro Herrera > wrote: >> Joe Conway wrote: >> >>> Ok, back to the drawing board. Thanks for the feedback. >> >> Closing this one as returned-with-feedback. Please do resubmit for >> CF

Re: [HACKERS] [patch] Proposal for \crosstabview in psql

2016-03-11 Thread Robert Haas
On Thu, Feb 18, 2016 at 9:23 AM, Daniel Verite wrote: > Dean Rasheed wrote: > >> If I want to sort the rows coming out of a query, my first thought >> is always going to be to add/adjust the query's ORDER BY clause, not >> use some weird +/- psql syntax. > > About

Re: [HACKERS] The plan for FDW-based sharding

2016-03-11 Thread Bruce Momjian
On Fri, Mar 11, 2016 at 10:19:16AM +0100, Oleg Bartunov wrote: > Our XTM is the yet another example of infrastructure we need to work on > clustering. Should we wait other smart guy starts thinking on distributed > transactions ?  We described in https://wiki.postgresql.org/wiki/DTM our  API, >

Re: [HACKERS] proposal: get oldest LSN - function

2016-03-11 Thread Kartyshov Ivan
On 11.03.2016 16:33, Kartyshov Ivan wrote: On 28.02.2016 11:36, Michael Paquier wrote: On Sun, Feb 28, 2016 at 4:40 PM, Kartyshov Ivan wrote: It will not satisfy our purposes and our administrators for three reasons. 1) DBA set me task to get the oldest number that present in WAL, not

Re: [HACKERS] snapshot too old, configured by time

2016-03-11 Thread Robert Haas
On Thu, Mar 3, 2016 at 2:40 PM, Kevin Grittner wrote: > Thanks for the tips. Attached is a minimal set of isolation tests. > I can expand on it if needed, but wanted: > > (1) to confirm that this is the right way to do this, and > > (2) how long people were willing to tolerate

Re: [HACKERS] POC: Cache data in GetSnapshotData()

2016-03-11 Thread Mithun Cy
Thanks Amit, I did a quick pgbench write tests for unlogged tables at 88 clients as it had the peak performance from previous test. There is big jump in TPS due to clog changes. clients BASE ONLY CLOG CHANGES % Increase ONLY SAVE SNAPSHOT % Increase CLOG CHANGES + SAVE SNAPSHOT % Increase 88

Re: [HACKERS] Improve error handling in pltcl

2016-03-11 Thread Robert Haas
On Thu, Mar 3, 2016 at 9:51 AM, Pavel Stehule wrote: > I am testing behave, and some results looks strange Jim, this is waiting for you to respond to Pavel's review. If that doesn't happen soon, this should be marked Returned with Feedback and you can, if you wish,

Re: [HACKERS] proposal: get oldest LSN - function

2016-03-11 Thread Kartyshov Ivan
On 28.02.2016 11:36, Michael Paquier wrote: On Sun, Feb 28, 2016 at 4:40 PM, Kartyshov Ivan wrote: It will not satisfy our purposes and our administrators for three reasons. 1) DBA set me task to get the oldest number that present in WAL, not last Yeah I got that. 2) Surely we can choose

Re: [HACKERS] [PATH] Correct negative/zero year in to_date/to_timestamp

2016-03-11 Thread Robert Haas
On Sun, Feb 28, 2016 at 9:38 PM, Vitaly Burovoy wrote: >> However, I'm not sure we ought to tinker with the behavior in this >> area. If -MM-DD is going to accept things that are not of the >> format -MM-DD, and I'd argue that -1-06-01 is not in that format, > >

Re: [HACKERS] dblink: add polymorphic functions.

2016-03-11 Thread Robert Haas
On Fri, Mar 11, 2016 at 8:44 AM, Joe Conway wrote: > On 03/11/2016 08:31 AM, Robert Haas wrote: >> On Thu, Jan 28, 2016 at 6:12 AM, Alvaro Herrera >> wrote: >>> Joe Conway wrote: >>> Ok, back to the drawing board. Thanks for the feedback. >>>

Re: [HACKERS] auto_explain sample rate

2016-03-11 Thread Julien Rouhaud
On 11/03/2016 11:45, Magnus Hagander wrote: > > Coming back to the previous discussions about random() - AFAICT this > patch will introduce the random() call always (in explain_ExecutorStart): > > +if (auto_explain_log_min_duration >= 0 && nesting_level == 0) > +current_query_sampled = (random()

Re: [HACKERS] BUG #13854: SSPI authentication failure: wrong realm name used

2016-03-11 Thread Magnus Hagander
On Fri, Jan 15, 2016 at 9:46 PM, Christian Ullrich wrote: > * Christian Ullrich wrote: > > * Christian Ullrich wrote: >> >> * Christian Ullrich wrote: >>> >>> > According to the release notes, the default for the "include_realm" >>> > option in SSPI authentication was

Re: [HACKERS] BUG #13854: SSPI authentication failure: wrong realm name used

2016-03-11 Thread Christian Ullrich
* From: Magnus Hagander [mailto:mag...@hagander.net] > I took a quick look at this one, and have some initial thoughts. > > I don't like the name "real_realm" as a parameter name. I'm wondering if > it might be better to reverse the meaning, and call it sspi_netbios_realm > (and then change the

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-03-11 Thread Gilles Darold
Le 11/03/2016 10:49, Shulgin, Oleksandr a écrit : > On Thu, Mar 10, 2016 at 9:05 PM, Tom Lane > wrote: > > Gilles Darold > writes: > > Then, should I have to use an alternate

[HACKERS] [PATCH] Use MemoryContextAlloc() in the MemoryContextAllocZero() and MemoryContextAllocZeroAligned()

2016-03-11 Thread Alexander Kuleshov
Hello all, Attached patch simplifies the MemoryContextAllocZero() and MemoryContextAllocZeroAligned(). The MemoryContextAllocZero() and MemoryContextAllocZeroAligned() functions does almost the same that MemoryContextAlloc() does. Additionally these functions fills allocated memory context with

Re: [HACKERS] Perl's newSViv() versus 64-bit ints?

2016-03-11 Thread Salvador Fandiño
On 03/12/2016 12:49 AM, Tom Lane wrote: Anybody know what will happen when passing a uint64 to newSViv()? On 64 bit platforms, it is just interpreted as a signed integer, any number with the upper bit set will become negative. Perl provides newSVuv for unsigned numbers. On 32bit platforms

Re: [HACKERS] eXtensible Transaction Manager API (v2)

2016-03-11 Thread Konstantin Knizhnik
On 03/11/2016 11:35 PM, Tom Lane wrote: Robert Haas writes: On Fri, Mar 11, 2016 at 1:11 PM, David Steele wrote: Is anyone willing to volunteer a review or make an argument for the importance of this patch? There's been a lot of discussion on

Re: [HACKERS] Relation extension scalability

2016-03-11 Thread Dilip Kumar
On Sat, Mar 12, 2016 at 8:37 AM, Amit Kapila wrote: > Can you post the numbers for 1, 5, 10, 15, 25 or whatever other multiplier > you have tried, so that it is clear that 20 is best? I had Tried with 1, 10, 20 and 50. 1. With base code it was almost the same as base

Re: [HACKERS] [COMMITTERS] pgsql: Provide much better wait information in pg_stat_activity.

2016-03-11 Thread Amit Kapila
On Sat, Mar 12, 2016 at 5:01 AM, Jim Nasby wrote: > > On 3/10/16 8:36 PM, Robert Haas wrote: >> >> 1. We make it true only for heavyweight lock waits, and false for >> other kinds of waits. That's pretty strange. >> 2. We make it true for all kinds of waits that we now

Re: [HACKERS] Explain [Analyze] produces parallel scan for select Into table statements.

2016-03-11 Thread Amit Kapila
On Fri, Mar 11, 2016 at 3:34 PM, Mithun Cy wrote: > > On Thu, Mar 10, 2016 at 9:39 PM, Robert Haas wrote: > >I guess there must not be an occurrence of this pattern in the > >regression tests, or previous force_parallel_mode testing would have >

Re: [HACKERS] raw output from copy

2016-03-11 Thread Pavel Stehule
Hi 2016-03-09 18:41 GMT+01:00 Corey Huinker : > >>> The regression tests seem to adequately cover all new functionality, >>> though I wonder if we should add some cases that highlight situations where >>> BINARY mode is insufficient. >>> >>> > One thing I tried to test

  1   2   >