Re: [HACKERS] tuplesort memory usage: grow_memtuples

2012-10-13 Thread Jeff Janes
On Thu, Aug 16, 2012 at 4:26 PM, Peter Geoghegan wrote: > On 27 July 2012 16:39, Jeff Janes wrote: >>> Can you suggest a benchmark that will usefully exercise this patch? >> >> I think the given sizes below work on most 64 bit machines. > > My apologies for not getting around to taking a look at

Re: [HACKERS] pg_stat_lwlocks view - lwlocks statistics, round 2

2012-10-13 Thread Fujii Masao
On Sun, Oct 14, 2012 at 10:46 AM, Satoshi Nagayasu wrote: > HEAD > > number of transactions actually processed: 3439971 > tps = 57331.891602 (including connections establishing) > tps = 57340.932324 (excluding connections establishing) > pg_stat_lwlocks patch (reporting disabled) > =

Re: [HACKERS] Successor of MD5 authentication, let's use SCRAM

2012-10-13 Thread Daniel Farina
On Sat, Oct 13, 2012 at 7:00 AM, Andrew Dunstan wrote: > Does Debian they create a self-signed certificate? If so, count me as > unimpressed. I'd argue that's worse than doing nothing. Here's what the docs > say (rightly) about such certificates: Debian will give you a self signed certificate by

Re: [HACKERS] Successor of MD5 authentication, let's use SCRAM

2012-10-13 Thread Greg Stark
On Wed, Oct 10, 2012 at 11:41 AM, Heikki Linnakangas wrote: > 1. Salt length. Greg Stark calculated the odds of salt collisions here: > http://archives.postgresql.org/pgsql-hackers/2004-08/msg01540.php. It's not > too bad as it is, and as Greg pointed out, if you can eavesdrop it's likely > you ca

Re: [HACKERS] pg_stat_lwlocks view - lwlocks statistics, round 2

2012-10-13 Thread Satoshi Nagayasu
Thanks for the review. 2012/10/14 8:55, Michael Paquier wrote: On Sun, Oct 14, 2012 at 6:00 AM, Fujii Masao mailto:masao.fu...@gmail.com>> wrote: On Sun, Oct 14, 2012 at 3:34 AM, Fujii Masao mailto:masao.fu...@gmail.com>> wrote: > On Sat, Oct 13, 2012 at 11:34 PM, Satoshi Nagayasu

Re: [HACKERS] pg_stat_lwlocks view - lwlocks statistics, round 2

2012-10-13 Thread Michael Paquier
On Sun, Oct 14, 2012 at 6:00 AM, Fujii Masao wrote: > On Sun, Oct 14, 2012 at 3:34 AM, Fujii Masao > wrote: > > On Sat, Oct 13, 2012 at 11:34 PM, Satoshi Nagayasu > wrote: > >> Hi, > >> > >> 2012/10/13 23:05, Satoshi Nagayasu wrote: > >>> Hi all, > >>> > >>> I have fixed my previous patch for p

Re: [HACKERS] proposal - assign result of query to psql variable

2012-10-13 Thread Erik Rijkers
On Sat, October 13, 2012 19:26, Pavel Stehule wrote: > 2012/10/13 Shigeru HANADA : >> After you determine whether it's ok or unnecessary, I'll mark this patch as >> "Ready for committer". >> > I found this behaviour which I think must count as a bug. \gset doesn't allow more \\-separated lines beh

[HACKERS] [WIP] pg_ping utility

2012-10-13 Thread Phil Sorber
Based on a previous thread (http://archives.postgresql.org/pgsql-hackers/2012-10/msg00131.php) I have put together a first attempt of a pg_ping utility. I am attaching two patches. One for the executable and one for the docs. I would also like to make a regression tests and translations, but wante

Re: [HACKERS] pg_stat_lwlocks view - lwlocks statistics, round 2

2012-10-13 Thread Fujii Masao
On Sun, Oct 14, 2012 at 3:34 AM, Fujii Masao wrote: > On Sat, Oct 13, 2012 at 11:34 PM, Satoshi Nagayasu wrote: >> Hi, >> >> 2012/10/13 23:05, Satoshi Nagayasu wrote: >>> Hi all, >>> >>> I have fixed my previous patch for pg_stat_lwlocks view, and >>> as Josh commented, it now supports local and

Re: [HACKERS] Optimizer regression

2012-10-13 Thread Jim Nasby
On 10/13/12 3:15 PM, Jim Nasby wrote: FWIW, it's definitely an issue of not being able to push down past the GROUP BY: I take that back... GROUP BY doesn't matter. It's an issue of having the EXISTS in the inner query. I realize the examples have gotten a bit silly, but this seems to break it

Re: [HACKERS] Optimizer regression

2012-10-13 Thread Tom Lane
Jim Nasby writes: > FWIW, it's definitely an issue of not being able to push down past the GROUP > BY: I think it's not that so much as the EXISTS inside a LEFT JOIN. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make chang

Re: [HACKERS] Potential autovacuum optimization: new tables

2012-10-13 Thread Joshua Berkus
> Ah. Okay, maybe we can agree that that wasn't a good idea. Oh, I'd say there's no question it was a mistake. We just didn't have the data at the time to realize it. > I don't really see that we need to bend over backwards to exactly > match > some data points that you made up out of thin ai

Re: [HACKERS] Deprecating RULES

2012-10-13 Thread Joshua Berkus
Simon, > I think its sad we can't even attempt a technical conversation > without > you making snide ad hominem attacks that aren't even close to being > true on a personal level, nor accurate in a technical sense. I would prefer it if you actually addressed my substantive arguments, which, so f

Re: [HACKERS] Optimizer regression

2012-10-13 Thread Jim Nasby
On 10/13/12 2:45 PM, Tom Lane wrote: Jim Nasby writes: Just upgraded to 8.4 (I know, I know…) and ran across this. Unfortunately I have no way to test this on 9.x, so I don't know if it's been fixed or not. I'm hoping that someone *cough*Tom*cough* would quickly recognize whether this push i

Re: [HACKERS] Potential autovacuum optimization: new tables

2012-10-13 Thread Tom Lane
Joshua Berkus writes: > I've been going over the notes and email archives from the period > where Matt O'Connor and I arrived at the current settings. All of our > testing was devoted to autovacuum, not autoanalyze. > Our mistake was assuming that the same formula which worked well for > vacuum w

Re: [HACKERS] Potential autovacuum optimization: new tables

2012-10-13 Thread Jeff Janes
On Sat, Oct 13, 2012 at 12:49 PM, Joshua Berkus wrote: > > So, problem #1 is coming up with a mathematical formula. My initial target > values are in terms of # of rows in the table vs. # of writes before analyze > is triggered: > > 1 : 3 > 10 : 5 > 100 : 10 > 1000 : 100 > 10 : 2000 > 1

Re: [HACKERS] Optimizer regression

2012-10-13 Thread Jim Nasby
On 10/13/12 2:45 PM, Tom Lane wrote: BTW, your workaround looks wrong --- you need to constrain the outside of the left join not the inside, no? Ugh, yes, you're correct. :( -- Jim C. Nasby, Database Architect j...@nasby.net 512.569.9461 (cell) http://j

Re: [HACKERS] Potential autovacuum optimization: new tables

2012-10-13 Thread Joshua Berkus
> For my part, while that's certainly an interesting idea, it's far > more > complicated than even providing GUCs and the idea is to make PG just > "do > it right", not to offer the user more ways to get it wrong... Yes, please let's not replace the existing too-simplistic knobs with giant compl

Re: [HACKERS] Optimizer regression

2012-10-13 Thread Tom Lane
Jim Nasby writes: > Just upgraded to 8.4 (I know, I know…) and ran across this. Unfortunately I > have no way to test this on 9.x, so I don't know if it's been fixed or not. > I'm hoping that someone *cough*Tom*cough* would quickly recognize whether > this push into subquery issue has been fixe

Re: [HACKERS] getopt() and strdup()

2012-10-13 Thread Phil Sorber
On Sat, Oct 13, 2012 at 3:14 PM, Tom Lane wrote: > Phil Sorber writes: >> On Wed, Oct 10, 2012 at 7:54 PM, Bruce Momjian wrote: >>> Also, do we want to centralize the definition of pg_strdup() in /port, >>> or leave each module to define it on its own? > >> +1 for a centralized definition. > > T

Re: [HACKERS] Adding comments for system table/column names

2012-10-13 Thread Magnus Hagander
On Sat, Oct 13, 2012 at 9:12 PM, Bruce Momjian wrote: > On Sat, Oct 13, 2012 at 09:10:05PM +0200, Magnus Hagander wrote: >> >> > I think the idea of having the short descriptions in SQL and longer ones >> >> > in SGML is not maintainable. One idea would be to clip the SQL >> >> > description to b

Re: [HACKERS] getopt() and strdup()

2012-10-13 Thread Tom Lane
Phil Sorber writes: > On Wed, Oct 10, 2012 at 7:54 PM, Bruce Momjian wrote: >> Also, do we want to centralize the definition of pg_strdup() in /port, >> or leave each module to define it on its own? > +1 for a centralized definition. The difficulty with a centralized definition is that it's not

Re: [HACKERS] Adding comments for system table/column names

2012-10-13 Thread Bruce Momjian
On Sat, Oct 13, 2012 at 09:10:05PM +0200, Magnus Hagander wrote: > >> > I think the idea of having the short descriptions in SQL and longer ones > >> > in SGML is not maintainable. One idea would be to clip the SQL > >> > description to be no longer than a specified number of characters, with > >>

Re: [HACKERS] Adding comments for system table/column names

2012-10-13 Thread Magnus Hagander
On Sat, Oct 13, 2012 at 5:17 PM, Bruce Momjian wrote: > On Sat, Oct 13, 2012 at 07:03:49AM -0400, Noah Misch wrote: >> On Fri, Oct 12, 2012 at 01:29:21PM -0400, Bruce Momjian wrote: >> > There was a thread in January of 2012 where we discussed the idea of >> > pulling system table/column name desc

Re: [HACKERS] getopt() and strdup()

2012-10-13 Thread Phil Sorber
On Wed, Oct 10, 2012 at 7:54 PM, Bruce Momjian wrote: > On Mon, Oct 8, 2012 at 09:03:37PM -0400, Bruce Momjian wrote: >> On Mon, Oct 8, 2012 at 04:33:29PM -0400, Tom Lane wrote: >> > Bruce Momjian writes: >> > > A while ago I noticed that in some places we strdup/pg_strdup() optarg >> > > strin

Re: [HACKERS] enhanced error fields

2012-10-13 Thread Peter Geoghegan
On 12 October 2012 20:27, Pavel Stehule wrote: > I understand to your request, but I don't thing so this request is > 100% valid. Check violation is good example. Constraint names are > "optional" in PostgreSQL - so we cannot require constraint_name. One > from first prototypes I used generated na

Re: [HACKERS] pg_stat_lwlocks view - lwlocks statistics, round 2

2012-10-13 Thread Fujii Masao
On Sat, Oct 13, 2012 at 11:34 PM, Satoshi Nagayasu wrote: > Hi, > > 2012/10/13 23:05, Satoshi Nagayasu wrote: >> Hi all, >> >> I have fixed my previous patch for pg_stat_lwlocks view, and >> as Josh commented, it now supports local and global (shared) >> statistics in the same system view. > > Sor

Re: [HACKERS] Extend argument of OAT_POST_CREATE

2012-10-13 Thread Kohei KaiGai
Thanks for your reviews. 2012/10/10 Alvaro Herrera : > Kohei KaiGai escribió: >> The attached patch adds argument of OAT_POST_CREATE hook; >> to inform extensions type of the context of this object creation. It allows >> extensions to know whether the new object is indirectly created apart >> from

Re: [HACKERS] proposal - assign result of query to psql variable

2012-10-13 Thread Pavel Stehule
2012/10/13 Shigeru HANADA : > Hi Pavel, > > > On Sat, Oct 13, 2012 at 12:58 AM, Pavel Stehule > wrote: >> >> * merge Shigeru's doc patch >> * rename psql regression test from "psql" to "psql_cmd" > > > Those changes seem good. > > Besides, I found an error message which doesn't end with '¥n' in co

Re: [HACKERS] [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown

2012-10-13 Thread Fujii Masao
On Thu, Oct 11, 2012 at 11:52 PM, Heikki Linnakangas wrote: > On 11.10.2012 13:17, Amit Kapila wrote: >>> >>> How does this look now? >> >> >> The Patch is fine and test results are also fine. > > > Ok, thanks. Committed. I found one typo. The attached patch fixes that typo. ISTM you need to upd

[HACKERS] Optimizer regression

2012-10-13 Thread Jim Nasby
Just upgraded to 8.4 (I know, I know…) and ran across this. Unfortunately I have no way to test this on 9.x, so I don't know if it's been fixed or not. I'm hoping that someone *cough*Tom*cough* would quickly recognize whether this push into subquery issue has been fixed or not, so I haven't incl

Re: [HACKERS] Successor of MD5 authentication, let's use SCRAM

2012-10-13 Thread Stephen Frost
* Andrew Dunstan (and...@dunslane.net) wrote: > Does Debian they create a self-signed certificate? If so, count me > as unimpressed. I'd argue that's worse than doing nothing. Here's > what the docs say (rightly) about such certificates: Self-signed certificates do provide for in-transit encryptio

Re: [HACKERS] Adding comments for system table/column names

2012-10-13 Thread Bruce Momjian
On Sat, Oct 13, 2012 at 07:03:49AM -0400, Noah Misch wrote: > On Fri, Oct 12, 2012 at 01:29:21PM -0400, Bruce Momjian wrote: > > There was a thread in January of 2012 where we discussed the idea of > > pulling system table/column name descriptions from the SGML docs and > > creating SQL comments fo

[HACKERS] Bug in -c CLI option of pg_dump/pg_restore

2012-10-13 Thread Guillaume Lelarge
Hi, One of my colleagues, Jehan-Guillaume de Rorthais, found a weird behaviour of the "-c" command line option in the pg_restore tool while doing a training. Here is the following steps he followed: createdb foo pg_dump -Fc foo > foo.dump createdb bar pg_restore -c -d bar foo.dump bar contains

Re: [HACKERS] pg_stat_lwlocks view - lwlocks statistics, round 2

2012-10-13 Thread Satoshi Nagayasu
Hi, 2012/10/13 23:05, Satoshi Nagayasu wrote: > Hi all, > > I have fixed my previous patch for pg_stat_lwlocks view, and > as Josh commented, it now supports local and global (shared) > statistics in the same system view. Sorry, I found my mistakes. New fixed one is attached to this mail. Regar

[HACKERS] pg_stat_lwlocks view - lwlocks statistics, round 2

2012-10-13 Thread Satoshi Nagayasu
Hi all, I have fixed my previous patch for pg_stat_lwlocks view, and as Josh commented, it now supports local and global (shared) statistics in the same system view. Local statistics means the counters are only effective in the same session, and shared ones means the counters are shared within th

Re: [HACKERS] Successor of MD5 authentication, let's use SCRAM

2012-10-13 Thread Andrew Dunstan
On 10/13/2012 01:55 AM, Darren Duncan wrote: John R Pierce wrote: On 10/12/12 9:00 PM, Darren Duncan wrote: And now we're migrating to Red Hat for the production launch, using the http://www.postgresql.org/download/linux/redhat/ packages for Postgres 9.1, and these do *not* include the SSL.

Re: [HACKERS] Adding comments for system table/column names

2012-10-13 Thread Noah Misch
On Fri, Oct 12, 2012 at 01:29:21PM -0400, Bruce Momjian wrote: > There was a thread in January of 2012 where we discussed the idea of > pulling system table/column name descriptions from the SGML docs and > creating SQL comments for them: > > http://archives.postgresql.org/pgsql-hackers/2012