Re: [HACKERS] external_pid_file not removed on postmaster exit

2012-08-16 Thread Peter Eisentraut
On Fri, 2012-07-27 at 08:09 +0300, Peter Eisentraut wrote: > It seems strange that the external_pid_file is never removed. There is > even a C comment about it: > > /* Should we remove the pid file on postmaster exit? */ > > I think it should be removed with proc_exit hook just like the main > p

Re: [HACKERS] huge tlb support

2012-08-16 Thread David Gould
On Mon, 9 Jul 2012 12:30:23 +0200 Andres Freund wrote: > On Monday, July 09, 2012 08:11:00 AM Tom Lane wrote: > > y...@mwd.biglobe.ne.jp (YAMAMOTO Takashi) writes: > > >> Also, I was under the impression that recent Linux kernels use > > >> hugepages automatically if they can, so I wonder exactly

[HACKERS] Slow tab completion w/ lots of tables

2012-08-16 Thread Stephen Frost
Greetings, When doing tab-completion under 9.1, pg_table_is_visible(oid) is slow and is ending up as the first thing tested against all the rows in pg_class. Increasing the cost of pg_table_is_visible() up to 10 causes it to move to the end of the tests, which improves things greatly- I

Re: [HACKERS] Timing overhead and Linux clock sources

2012-08-16 Thread Bruce Momjian
FYI, I am planning to go ahead and package this tool in /contrib for PG 9.3. --- On Fri, Dec 9, 2011 at 08:26:12PM -0500, Greg Smith wrote: > On 12/09/2011 06:48 PM, Ants Aasma wrote: > >The attached test program (test_gett

Re: [HACKERS] RFC: list API / memory allocations

2012-08-16 Thread Bruce Momjian
On Thu, Aug 16, 2012 at 09:51:28PM -0400, Stephen Frost wrote: > Bruce, > > * Bruce Momjian (br...@momjian.us) wrote: > > Did we make any headway on this? > > I've got the code written but I need to test it in a stable environment > to see what kind of improvment it provides. I've actually been

Re: [HACKERS] RFC: list API / memory allocations

2012-08-16 Thread Stephen Frost
Bruce, * Bruce Momjian (br...@momjian.us) wrote: > Did we make any headway on this? I've got the code written but I need to test it in a stable environment to see what kind of improvment it provides. I've actually been fighting for the past 2 months with the box that I want to use and think I ma

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2012-08-16 Thread Bruce Momjian
Was this resolved? (Sorry to be bugging everyone.) --- On Tue, Nov 29, 2011 at 11:42:10PM -0500, Robert Haas wrote: > On Tue, Nov 29, 2011 at 11:50 AM, Bruce Momjian wrote: > > Just confirming we decided not to persue this

Re: [HACKERS] Large number of open(2) calls with bulk INSERT into empty table

2012-08-16 Thread Bruce Momjian
A TODO for this? --- On Tue, Dec 6, 2011 at 02:53:42PM -0500, Robert Haas wrote: > On Tue, Dec 6, 2011 at 7:12 AM, Florian Weimer wrote: > > * Robert Haas: > > > >> I tried whacking out the call to GetPageWithFreeSpace() i

Re: [HACKERS] Avoiding repeated snapshot computation

2012-08-16 Thread Bruce Momjian
Did we ever make a decision on this patch? --- On Sat, Nov 26, 2011 at 09:22:50PM +0530, Pavan Deolasee wrote: > On some recent benchmarks and profile data, I saw GetSnapshotData > figures at the very top or near top. For le

Re: [HACKERS] Not HOT enough

2012-08-16 Thread Bruce Momjian
Did we want to apply this? --- On Wed, Nov 23, 2011 at 07:33:18PM +, Simon Riggs wrote: > On Wed, Nov 23, 2011 at 6:15 PM, Tom Lane wrote: > > >> The real question is do we favour HOT cleanup on those small 8 tables, >

Re: [HACKERS] RFC: list API / memory allocations

2012-08-16 Thread Bruce Momjian
Is this a TODO? --- On Sat, Nov 19, 2011 at 12:31:09PM -0500, Stephen Frost wrote: > Andres, > > * Andres Freund (and...@anarazel.de) wrote: > > For that I added new functions/defines which allocate all the needed memory >

Re: [HACKERS] RFC: list API / memory allocations

2012-08-16 Thread Bruce Momjian
Did we make any headway on this? --- On Sat, Nov 19, 2011 at 12:31:09PM -0500, Stephen Frost wrote: > Andres, > > * Andres Freund (and...@anarazel.de) wrote: > > For that I added new functions/defines which allocate all the

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-08-16 Thread Dickson S. Guedes
2012/8/16 Fabrízio de Royes Mello : > The attached patch implement this feature: > > CREATE SCHEMA [ IF NOT EXISTS ] schema_name [ AUTHORIZATION user_name ] [ > schema_element [ ... ] ] > CREATE SCHEMA [ IF NOT EXISTS ] AUTHORIZATION user_name [ schema_element [ > ... ] ] > > Now, PostgreSQL don't

Re: [HACKERS] Regression tests fail once XID counter exceeds 2 billion

2012-08-16 Thread Bruce Momjian
On Wed, Nov 16, 2011 at 07:08:27PM -0500, Tom Lane wrote: > I wrote: > > Simon Riggs writes: > >> We need a function called transactionid_current() so a normal user can > >> write > > >> select virtualtransaction > >> from pg_locks > >> where transactionid = transactionid_current() > > >> and h

Re: [HACKERS] Avoiding shutdown checkpoint at failover

2012-08-16 Thread Bruce Momjian
On Thu, Mar 8, 2012 at 08:20:02AM -0500, Robert Haas wrote: > On Sat, Jan 28, 2012 at 8:57 AM, Simon Riggs wrote: > > On Thu, Jan 26, 2012 at 5:27 AM, Fujii Masao wrote: > > > >> One thing I would like to ask is that why you think walreceiver is more > >> appropriate for writing XLOG_END_OF_RECO

Re: [HACKERS] tuplesort memory usage: grow_memtuples

2012-08-16 Thread Peter Geoghegan
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 this sooner. I tested this patch on my x86_64 laptop: [peter@pe

Re: [HACKERS] heap_page_prune comments

2012-08-16 Thread Bruce Momjian
On Wed, Nov 2, 2011 at 12:27:02PM -0400, Robert Haas wrote: > The following comment - or at least the last sentence thereof - > appears to be out of date. > > /* > * XXX Should we update the FSM information of this page ? > * > * There are two schools of thought

Re: [HACKERS] [COMMITTERS] pgsql: Clean up the #include mess a little.

2012-08-16 Thread Bruce Momjian
On Thu, Aug 16, 2012 at 11:15:24AM -0400, Alvaro Herrera wrote: > Excerpts from Bruce Momjian's message of mié ago 15 18:30:40 -0400 2012: > > > > On Wed, Sep 7, 2011 at 01:20:17AM +0300, Ants Aasma wrote: > > > On Tue, Sep 6, 2011 at 10:18 PM, Alvaro Herrera > > > wrote: > > > > I wonder what h

Re: [HACKERS] Unreproducible bug in snapshot import code

2012-08-16 Thread Bruce Momjian
On Fri, Oct 28, 2011 at 11:07:25AM -0400, Gurjeet Singh wrote: > On Fri, Oct 28, 2011 at 10:11 AM, Bruce Momjian wrote: > > Gurjeet Singh wrote: > > > > I have tried reproducing the bug starting from 1 and 2 transactions > > > before > > > > the one shown in snippet, and I used ta

[HACKERS] State of the on-disk bitmap index

2012-08-16 Thread Daniel Bausch
Hello Jonah, Simon, and the hackers, I am going to implement a simple kind of "encoded bitmap indexes" (EBI). That is an index type where the bitmap columns may not only contain only a single '1' in the set of bits belonging to a tuple. Instead, an additional mapping table translates the distinc

Re: [HACKERS] Planner avoidance of index only scans for partial indexes

2012-08-16 Thread Josh Berkus
On 8/15/12 3:28 PM, Merlin Moncure wrote: > Aside: the performance gains I'm seeing for IOS are nothing short of > spectacular. Do you have some metrics? I could use them for publicity stuff. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-hackers mailing list (

Re: [HACKERS] TRUE/FALSE vs true/false

2012-08-16 Thread Bruce Momjian
On Thu, Aug 16, 2012 at 02:21:12PM -0500, Kevin Grittner wrote: > Bruce Momjian wrote: > > > So what do we want to do with this? I am a little concerned that > > we are sacrificing code clarity for backpatching ease, but I don't > > do as much backpatching as Tom. > > Well, if you back-patche

Re: [HACKERS] TRUE/FALSE vs true/false

2012-08-16 Thread Kevin Grittner
Bruce Momjian wrote: > So what do we want to do with this? I am a little concerned that > we are sacrificing code clarity for backpatching ease, but I don't > do as much backpatching as Tom. Well, if you back-patched this change, it would eliminate the issue for Tom, wouldn't it? Not sure if

Re: [HACKERS] TRUE/FALSE vs true/false

2012-08-16 Thread Bruce Momjian
On Tue, Aug 14, 2012 at 10:57:08PM -0400, Peter Eisentraut wrote: > On Tue, 2012-08-14 at 17:36 -0400, Bruce Momjian wrote: > > On Tue, Aug 14, 2012 at 05:34:02PM -0400, Tom Lane wrote: > > > Bruce Momjian writes: > > > > On Thu, Aug 4, 2011 at 09:00:11PM +0300, Peter Eisentraut wrote: > > > >> O

Re: [HACKERS] psql \set vs \copy - bug or expected behaviour?

2012-08-16 Thread Bruce Momjian
On Fri, Oct 21, 2011 at 05:31:41PM -0400, Robert Haas wrote: > On Fri, Oct 21, 2011 at 7:24 AM, Richard Huxton wrote: > > It looks like \copy is just passing the text of the query unadjusted to > > "COPY". I get a syntax error on ":x" with the \copy below on both 9.0 and > > 9.1 > > > > === test s

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-08-16 Thread Fabrízio de Royes Mello
2012/8/16 David E. Wheeler > On Aug 16, 2012, at 10:36 AM, Fabrízio de Royes Mello wrote: > > > The attached patch implement this feature: > > > > CREATE SCHEMA [ IF NOT EXISTS ] schema_name [ AUTHORIZATION user_name ] > [ schema_element [ ... ] ] > > CREATE SCHEMA [ IF NOT EXISTS ] AUTHORIZATION

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-08-16 Thread David E. Wheeler
On Aug 16, 2012, at 10:36 AM, Fabrízio de Royes Mello wrote: > The attached patch implement this feature: > > CREATE SCHEMA [ IF NOT EXISTS ] schema_name [ AUTHORIZATION user_name ] [ > schema_element [ ... ] ] > CREATE SCHEMA [ IF NOT EXISTS ] AUTHORIZATION user_name [ schema_element [ > ... ]

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-08-16 Thread Andrew Dunstan
On 08/16/2012 01:36 PM, Fabrízio de Royes Mello wrote: 2012/8/15 David E. Wheeler > On Aug 15, 2012, at 11:31 AM, Fabrízio de Royes Mello wrote: >> Is there any reason not to add $subject? Would it be difficult? > > Looking to the source code I

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-08-16 Thread Fabrízio de Royes Mello
2012/8/15 David E. Wheeler > On Aug 15, 2012, at 11:31 AM, Fabrízio de Royes Mello wrote: > > >> Is there any reason not to add $subject? Would it be difficult? > > > > Looking to the source code I think this feature isn't hard to > implement... I'm writing a little path to do that and I'll send

Re: [HACKERS] HeapTupleHeaderAdvanceLatestRemovedXid doing the wrong thing with multixacts

2012-08-16 Thread Alvaro Herrera
Excerpts from Bruce Momjian's message of jue ago 16 11:24:55 -0400 2012: > On Mon, Oct 17, 2011 at 08:38:18PM +0100, Simon Riggs wrote: > > On Mon, Oct 17, 2011 at 8:03 PM, Tom Lane wrote: > > > Alvaro Herrera writes: > > >> I just noticed that HeapTupleHeaderAdvanceLatestRemovedXid is comparing

Re: [HACKERS] The pgrminclude problem

2012-08-16 Thread Peter Geoghegan
On 16 August 2012 16:56, Bruce Momjian wrote: > Good to know. We only use pgrminclude very five years or so, and Tom > isn't even keen on that. Yeah. Even if this could be made to work well, we'd still have to do something like get an absolute consensus from all build farm animals, if we expected

[HACKERS] Re: [COMMITTERS] pgsql: In docs, change a few cases of "not important" to "unimportant".

2012-08-16 Thread Bruce Momjian
On Thu, Aug 16, 2012 at 10:38:09AM -0500, Kevin Grittner wrote: > Heikki Linnakangas wrote: > > On 16.08.2012 17:49, Bruce Momjian wrote: > >> Heikki Linnakangas wrote: > >>> On 16.08.2012 17:36, Bruce Momjian wrote: > In docs, change a few cases of "not important" to > "unimportant". >

Re: [HACKERS] cataloguing NOT NULL constraints

2012-08-16 Thread Kevin Grittner
Alvaro Herrera wrote: > I think that a NOT NULL constraint attached to a column with a > composite type is equivalent to a CHECK (col IS DISTINCT FROM > NULL); at least they seem to behave identically. Is that what you > would expect? I had not thought about that, but now that you point it ou

Re: [HACKERS] HeapTupleHeaderAdvanceLatestRemovedXid doing the wrong thing with multixacts

2012-08-16 Thread Alvaro Herrera
Excerpts from Bruce Momjian's message of jue ago 16 11:44:48 -0400 2012: > On Thu, Aug 16, 2012 at 11:38:14AM -0400, Alvaro Herrera wrote: > > Excerpts from Bruce Momjian's message of jue ago 16 11:24:55 -0400 2012: > > > On Mon, Oct 17, 2011 at 08:38:18PM +0100, Simon Riggs wrote: > > > > On Mon,

Re: [HACKERS] The pgrminclude problem

2012-08-16 Thread Bruce Momjian
On Thu, Aug 16, 2012 at 04:48:34PM +0100, Peter Geoghegan wrote: > I found a tool that Google authored that attempts to solve the same > problems as pgrminclude does in our codebase. It's called "include > what you use", and is based on Clang. The project is hosted here: > > http://code.google.co

[HACKERS] The pgrminclude problem

2012-08-16 Thread Peter Geoghegan
I found a tool that Google authored that attempts to solve the same problems as pgrminclude does in our codebase. It's called "include what you use", and is based on Clang. The project is hosted here: http://code.google.com/p/include-what-you-use/ I'm not suggesting that we should start using th

Re: [HACKERS] HeapTupleHeaderAdvanceLatestRemovedXid doing the wrong thing with multixacts

2012-08-16 Thread Bruce Momjian
On Thu, Aug 16, 2012 at 11:38:14AM -0400, Alvaro Herrera wrote: > Excerpts from Bruce Momjian's message of jue ago 16 11:24:55 -0400 2012: > > On Mon, Oct 17, 2011 at 08:38:18PM +0100, Simon Riggs wrote: > > > On Mon, Oct 17, 2011 at 8:03 PM, Tom Lane wrote: > > > > Alvaro Herrera writes: > > > >

[HACKERS] Re: [COMMITTERS] pgsql: In docs, change a few cases of "not important" to "unimportant".

2012-08-16 Thread Kevin Grittner
Heikki Linnakangas wrote: > On 16.08.2012 17:49, Bruce Momjian wrote: >> Heikki Linnakangas wrote: >>> On 16.08.2012 17:36, Bruce Momjian wrote: In docs, change a few cases of "not important" to "unimportant". >>> >>> FWIW, I don't think these changes were an improvement. I find >>> "not

Re: [HACKERS] HeapTupleHeaderAdvanceLatestRemovedXid doing the wrong thing with multixacts

2012-08-16 Thread Bruce Momjian
On Mon, Oct 17, 2011 at 08:38:18PM +0100, Simon Riggs wrote: > On Mon, Oct 17, 2011 at 8:03 PM, Tom Lane wrote: > > Alvaro Herrera writes: > >> I just noticed that HeapTupleHeaderAdvanceLatestRemovedXid is comparing > >> Xmax as a TransactionId without verifying whether it is a multixact or > >

Re: [HACKERS] Underspecified window queries in regression tests

2012-08-16 Thread Bruce Momjian
I have used your notes below to rewrite the Window function SQL manual section. As you said, it was very hard to read. I now understand it better, having restructured it, and I hope others do too. After waiting 30 minutes for our developer doc build to refresh, I am giving up and posting my own

Re: [HACKERS] [COMMITTERS] pgsql: Clean up the #include mess a little.

2012-08-16 Thread Alvaro Herrera
Excerpts from Bruce Momjian's message of mié ago 15 18:30:40 -0400 2012: > > On Wed, Sep 7, 2011 at 01:20:17AM +0300, Ants Aasma wrote: > > On Tue, Sep 6, 2011 at 10:18 PM, Alvaro Herrera > > wrote: > > > I wonder what happens if files in the same subdir are grouped in a > > > subgraph.  Is that

Re: [HACKERS] UNION ALL with WHERE clause does not use Merge Append

2012-08-16 Thread Tom Lane
Marti Raudsepp writes: > Is this just a planner shortcoming or a bug? Or is there some > justification for this behavior? Per the comment in is_safe_append_member(): * It's only safe to pull up the child if its jointree contains exactly * one RTE, else the AppendRelInfo data structure

Re: [HACKERS] cataloguing NOT NULL constraints

2012-08-16 Thread Alvaro Herrera
Excerpts from Kevin Grittner's message of jue ago 02 10:48:02 -0400 2012: > > "Kevin Grittner" wrote: > > > Don't forget the peculiarities of columns with record types. > > I forgot to include the type creation in the example: > > test=# create type a as (a1 int, a2 int); > CREATE TYPE Th

Re: [HACKERS] Statistics and selectivity estimation for ranges

2012-08-16 Thread Heikki Linnakangas
On 15.08.2012 11:34, Alexander Korotkov wrote: On Wed, Aug 15, 2012 at 12:14 PM, Heikki Linnakangas< heikki.linnakan...@enterprisedb.com> wrote: Histogram of upper bounds would be both more accurate and natural for some operators. However, it requires collecting additional statistics while AF

Re: [HACKERS] Statistics and selectivity estimation for ranges

2012-08-16 Thread Heikki Linnakangas
On 15.08.2012 11:34, Alexander Korotkov wrote: On Wed, Aug 15, 2012 at 12:14 PM, Heikki Linnakangas< heikki.linnakan...@enterprisedb.com> wrote: Histogram of upper bounds would be both more accurate and natural for some operators. However, it requires collecting additional statistics while AF

Re: [HACKERS] SP-GiST for ranges based on 2d-mapping and quad-tree

2012-08-16 Thread Heikki Linnakangas
On 09.08.2012 18:42, Alexander Korotkov wrote: In this revision of patch I tried to handle conditions more generally using variables minLower, maxLower, minUpper, maxUpper, inclusive and strictEmpty. However some strategies still contain additional logic. Thanks, that clarified the code tremend

Re: [HACKERS] ToDo: allow to get a number of processed rows by COPY statement

2012-08-16 Thread Pavel Stehule
Hello here is updated patch postgres=# copy omega to '/tmp/xxx'; COPY 60 postgres=# do $$ declare r int; begin copy omega from '/tmp/xxx'; get diagnostics r = row_count; raise notice '>>> %', r; end; $$ language plpgsql; NOTICE: >>> 60 DO Regards Pavel 2012/8/16 Bruce Momjian : > > What ev

[HACKERS] UNION ALL with WHERE clause does not use Merge Append

2012-08-16 Thread Marti Raudsepp
Hi list, I have a table with (start_time, end_time) and I'd want to tally up the number of concurrent connections at any point in time. The "Merge Append" plan node introduced in 9.1 would be perfect for this purpose. It seems to work out fine for the most trivial case, but just when I add an WHER

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2012-08-16 Thread Daniel Farina
On Mon, Nov 14, 2011 at 3:05 PM, Ross Reedstrom wrote: > On Mon, Nov 14, 2011 at 02:45:04PM -0800, Will Leinweber wrote: >> My coworker Dan suggested that some people copy and paste scripts. However >> I feel that that is an orthogonal problem and if there is a very high rate >> of input psql shou