Re: [HACKERS] Initial review of xslt with no limits patch

2010-08-09 Thread Mike Fowler
On 09/08/10 04:07, Tom Lane wrote: Robert Haasrobertmh...@gmail.com writes: On Sun, Aug 8, 2010 at 11:36 AM, Mike Fowlerm...@mlfowler.com wrote: 1) XML2 is largely undocumented, giving rise to the problems encountered. Since the module is deprecated anyways, does it make more sense to get

Re: [HACKERS] review: psql: edit function, show function commands patch

2010-08-09 Thread Pavel Stehule
2010/8/9 Tom Lane t...@sss.pgh.pa.us: Robert Haas robertmh...@gmail.com writes: On Sun, Aug 8, 2010 at 1:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: What exactly is the point of the \sf command? I rather like \sf, actually; in fact, I think there's a decent argument to be made that it's more

Re: [HACKERS] review: psql: edit function, show function commands patch

2010-08-09 Thread Pavel Stehule
Hello 2010/8/8 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: updated patch attached What exactly is the point of the \sf command?  It seems like quite a lot of added code for a feature that nobody has requested, and whose definition is about as ad-hoc as could

Re: [HACKERS] parallel quicksort

2010-08-09 Thread Markus Wanner
Hi, On 08/09/2010 12:04 AM, Mark Wong wrote: I've been playing around with a process based parallel quicksort (http://github.com/markwkm/quicksort) and I tried to shoehorn it into postgres because I wanted to see if I could sort more than integers. I've attached a patch that creates a new GUC

Re: [HACKERS] pg_stat_transaction patch

2010-08-09 Thread Joel Jacobson
2010/8/8 Tom Lane t...@sss.pgh.pa.us Itagaki Takahiro itagaki.takah...@gmail.com writes: Accessor functions to get so far collected statistics for the current transaction https://commitfest.postgresql.org/action/patch_view?id=301 The only issue in the patch is too long view and function

Re: [HACKERS] GROUPING SETS revisited

2010-08-09 Thread Pavel Stehule
Hello I was confused when I though so I found a solution of 1 shift/reduce conflict :( All identificators used for buildin functions have to be a col_name_keywords or reserved keyword. There is conflict with our (probably obsolete) feature SELECT colname(tabname). So for this moment the real

Re: [HACKERS] more personal copyrights

2010-08-09 Thread Robert Haas
On Mon, Aug 9, 2010 at 1:18 AM, Jaime Casanova ja...@2ndquadrant.com wrote: A few months ago Bruce was doing a hunting of personal Copyrights notices, but i still found a lot of files copyrighted to: Regents of the University of California and other files copyrighted to individuals (ej: almost

[HACKERS] is syntax columname(tablename) necessary still?

2010-08-09 Thread Pavel Stehule
Hello I am working on Grouping Sets support. The first issue is cube keyword. Contrib module cube define a few functions cube. So if we want to continue in support this function, then cube have to be a unreserved keyword. But then we have a gram conflict with mentioned obsolete syntax. I am

Re: [HACKERS] review: psql: edit function, show function commands patch

2010-08-09 Thread Robert Haas
On Sun, Aug 8, 2010 at 11:38 PM, Tom Lane t...@sss.pgh.pa.us wrote: Um, but \sf *doesn't* give you anything that's usefully copy and pasteable. Works for me. \sf ts_debug(regconfig, text) And if that were the goal, why doesn't it have an option to write to a file? Well, you cut-and-paste

Re: [HACKERS] review: psql: edit function, show function commands patch

2010-08-09 Thread Pavel Stehule
2010/8/9 Robert Haas robertmh...@gmail.com: On Sun, Aug 8, 2010 at 11:38 PM, Tom Lane t...@sss.pgh.pa.us wrote: Um, but \sf *doesn't* give you anything that's usefully copy and pasteable. Works for me. \sf ts_debug(regconfig, text) And if that were the goal, why doesn't it have an option

Re: [HACKERS] MERGE Specification

2010-08-09 Thread Heikki Linnakangas
On 07/08/10 10:58, Boxuan Zhai wrote: I have just finished a new patch, with the following feature: Please include the regression tests in the patch too. Also, I note that there's a few merge conflicts when applied over CVS HEAD from today, can you please fix the bitrot? -- Heikki

Re: [HACKERS] MERGE Specification

2010-08-09 Thread Heikki Linnakangas
On 09/08/10 14:47, Heikki Linnakangas wrote: On 07/08/10 10:58, Boxuan Zhai wrote: I have just finished a new patch, with the following feature: Please include the regression tests in the patch too And the docs changes too. -- Heikki Linnakangas EnterpriseDB

Re: [HACKERS] is syntax columname(tablename) necessary still?

2010-08-09 Thread David Fetter
On Mon, Aug 09, 2010 at 12:18:33PM +0200, Pavel Stehule wrote: Hello I am working on Grouping Sets support. The first issue is cube keyword. Contrib module cube define a few functions cube. So if we want to continue in support this function, then cube have to be a unreserved keyword. The

Re: [HACKERS] more personal copyrights

2010-08-09 Thread David Fetter
On Mon, Aug 09, 2010 at 02:27:50PM +0900, Tatsuo Ishii wrote: A few months ago Bruce was doing a hunting of personal Copyrights notices, but i still found a lot of files copyrighted to: Regents of the University of California and other files copyrighted to individuals (ej: almost

Re: [HACKERS] is syntax columname(tablename) necessary still?

2010-08-09 Thread Greg Stark
On Mon, Aug 9, 2010 at 2:02 PM, David Fetter da...@fetter.org wrote: I am working on Grouping Sets support. The first issue is cube keyword. Contrib module cube define a few functions cube. So if we want to continue in support this function, then cube have to be a unreserved keyword. The

Re: [HACKERS] is syntax columname(tablename) necessary still?

2010-08-09 Thread David Fetter
On Mon, Aug 09, 2010 at 02:23:55PM +0100, Greg Stark wrote: On Mon, Aug 9, 2010 at 2:02 PM, David Fetter da...@fetter.org wrote: I am working on Grouping Sets support. The first issue is cube keyword. Contrib module cube define a few functions cube. So if we want to continue in support this

Re: [HACKERS] is syntax columname(tablename) necessary still?

2010-08-09 Thread Pavel Stehule
2010/8/9 Greg Stark gsst...@mit.edu: On Mon, Aug 9, 2010 at 2:02 PM, David Fetter da...@fetter.org wrote: I am working on Grouping Sets support. The first issue is cube keyword. Contrib module cube define a few functions cube. So if we want to continue in support this function, then cube have

Re: [HACKERS] is syntax columname(tablename) necessary still?

2010-08-09 Thread Tom Lane
Greg Stark gsst...@mit.edu writes: Personally I think cube is uncommonly used and CUBE an important enough SQL feature that we should just bite the bullet and kill/rename the contrib module. Yeah. It looks to me like CUBE will have to be a type_function_name keyword (but hopefully not fully

Re: [HACKERS] more personal copyrights

2010-08-09 Thread Tom Lane
Jaime Casanova ja...@2ndquadrant.com writes: A few months ago Bruce was doing a hunting of personal Copyrights notices, but i still found a lot of files copyrighted to: Regents of the University of California and other files copyrighted to individuals (ej: almost everything inside

Re: [HACKERS] Initial review of xslt with no limits patch

2010-08-09 Thread Tom Lane
Mike Fowler m...@mlfowler.com writes: Turns out the bug was filed in 2005 (see https://bugzilla.gnome.org/show_bug.cgi?id=307061). They are currently taking a fairly loose interpretation of the XSLT spec. However that was only one aspect of the concern. The other was that no errors were

Re: [HACKERS] Initial review of xslt with no limits patch

2010-08-09 Thread Robert Haas
On Mon, Aug 9, 2010 at 10:14 AM, Tom Lane t...@sss.pgh.pa.us wrote: Mike Fowler m...@mlfowler.com writes: Turns out the bug was filed in 2005 (see https://bugzilla.gnome.org/show_bug.cgi?id=307061). They are currently taking a fairly loose interpretation of the XSLT spec. However that was

Re: [HACKERS] review: xml_is_well_formed

2010-08-09 Thread Peter Eisentraut
On lör, 2010-08-07 at 16:47 +0100, Mike Fowler wrote: To be honest I'm happiest with returning a boolean, even if there is some confusion over content only being valid. Though changing the return value to DOCUMENT/CONTENT/NULL makes things a touch more explicit, the same results can be

Re: [HACKERS] is syntax columname(tablename) necessary still?

2010-08-09 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: I am working on Grouping Sets support. The first issue is cube keyword. Contrib module cube define a few functions cube. So if we want to continue in support this function, then cube have to be a unreserved keyword. But then we have a gram conflict

Re: [HACKERS] Initial review of xslt with no limits patch

2010-08-09 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: Right. So, what about Mike's idea of extracting this into a new contrib module, perhaps contrib/xslt? That might also provide a good excuse to jettison any details of the existing interfaces that we happen to find unfortunate. Seems like mostly

Re: [HACKERS] review: xml_is_well_formed

2010-08-09 Thread Robert Haas
On Mon, Aug 9, 2010 at 10:20 AM, Peter Eisentraut pete...@gmx.net wrote: On lör, 2010-08-07 at 16:47 +0100, Mike Fowler wrote: To be honest I'm happiest with returning a boolean, even if there is some confusion over content only being valid. Though changing the return value to

Re: [HACKERS] is syntax columname(tablename) necessary still?

2010-08-09 Thread Pavel Stehule
2010/8/9 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: I am working on Grouping Sets support. The first issue is cube keyword. Contrib module cube define a few functions cube. So if we want to continue in support this function, then cube have to be a unreserved

Re: [HACKERS] is syntax columname(tablename) necessary still?

2010-08-09 Thread Robert Haas
On Mon, Aug 9, 2010 at 10:45 AM, Pavel Stehule pavel.steh...@gmail.com wrote: 2010/8/9 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: I am working on Grouping Sets support. The first issue is cube keyword. Contrib module cube define a few functions cube. So if we

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Bruce Momjian
Markus Wanner wrote: Hi, On 07/26/2010 07:16 PM, Robert Haas wrote: Of course, there are other parts of the system (a whole bunch of them) that used shared memory also, and perhaps some of those could be modified to use the dynamic allocator as well. But they're getting by without it

Re: [HACKERS] is syntax columname(tablename) necessary still?

2010-08-09 Thread Pavel Stehule
2010/8/9 Tom Lane t...@sss.pgh.pa.us: Greg Stark gsst...@mit.edu writes: Personally I think cube is uncommonly used and CUBE an important enough SQL feature that we should just bite the bullet and kill/rename the contrib module. Yeah.  It looks to me like CUBE will have to be a

[HACKERS] regclass, \d command and temp tables

2010-08-09 Thread Tatsuo Ishii
Hi, I have created regular table t1 and temp table t1. Regclass and \d command do not seem to distinguish them. Is this normal? test=# create table t1(i int); CREATE TABLE test=# select 't1'::regclass::oid; oid - 1470776 (1 row) test=# create temp table t1(i int, j int); CREATE

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Robert Haas
On Mon, Aug 9, 2010 at 11:02 AM, Bruce Momjian br...@momjian.us wrote: I am not sure threads would greatly help us.  The major problem is that all of our our structures are currently contiguous in memory for quick access.  I don't see how threading would help with that.  We could use

Re: [HACKERS] is syntax columname(tablename) necessary still?

2010-08-09 Thread Robert Haas
On Mon, Aug 9, 2010 at 11:06 AM, Pavel Stehule pavel.steh...@gmail.com wrote: 2010/8/9 Tom Lane t...@sss.pgh.pa.us: Greg Stark gsst...@mit.edu writes: Personally I think cube is uncommonly used and CUBE an important enough SQL feature that we should just bite the bullet and kill/rename the

Re: [HACKERS] regclass, \d command and temp tables

2010-08-09 Thread Tom Lane
Tatsuo Ishii is...@postgresql.org writes: I have created regular table t1 and temp table t1. Regclass and \d command do not seem to distinguish them. Is this normal? It works for me. Are you using clean sources? regression=# create table t1(i int); CREATE TABLE regression=# select

Re: [HACKERS] is syntax columname(tablename) necessary still?

2010-08-09 Thread Pavel Stehule
2010/8/9 Robert Haas robertmh...@gmail.com: On Mon, Aug 9, 2010 at 11:06 AM, Pavel Stehule pavel.steh...@gmail.com wrote: 2010/8/9 Tom Lane t...@sss.pgh.pa.us: Greg Stark gsst...@mit.edu writes: Personally I think cube is uncommonly used and CUBE an important enough SQL feature that we

Re: [HACKERS] regclass, \d command and temp tables

2010-08-09 Thread Tatsuo Ishii
It works for me. Are you using clean sources? regression=# create table t1(i int); CREATE TABLE regression=# select 't1'::regclass::oid; oid 127671 (1 row) regression=# create temp table t1(i int, j int); CREATE TABLE regression=# select 't1'::regclass::oid; oid

Re: [HACKERS] review: psql: edit function, show function commands patch

2010-08-09 Thread David E. Wheeler
On Aug 8, 2010, at 8:38 PM, Tom Lane wrote: Um, but \sf *doesn't* give you anything that's usefully copy and pasteable. And if that were the goal, why doesn't it have an option to write to a file? But it's really the line numbers shoved in front that I'm on about here. I can't see *any*

Re: [HACKERS] review: psql: edit function, show function commands patch

2010-08-09 Thread Pavel Stehule
2010/8/9 David E. Wheeler da...@kineticode.com: On Aug 8, 2010, at 8:38 PM, Tom Lane wrote: Um, but \sf *doesn't* give you anything that's usefully copy and pasteable.  And if that were the goal, why doesn't it have an option to write to a file? But it's really the line numbers shoved in

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Markus Wanner
Hi, On 08/09/2010 05:02 PM, Bruce Momjian wrote: [ Sorry to be jumping into this thread late.] No problem at all. I am not sure threads would greatly help us. Note that I'm absolutely, certainly not advocating the use of threads for Postgres. The major problem is that all of our our

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: So imagine that thread-or-process A allocates allocates a new chunk of memory and then writes a pointer to the new chunk in a previously allocated section of memory. Thread-or-process B then follows the pointer. In a threaded model, this is

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Bruce Momjian
Robert Haas wrote: On Mon, Aug 9, 2010 at 11:02 AM, Bruce Momjian br...@momjian.us wrote: I am not sure threads would greatly help us. ?The major problem is that all of our our structures are currently contiguous in memory for quick access. ?I don't see how threading would help with that.

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Bruce Momjian
Markus Wanner wrote: Hi, On 08/09/2010 05:02 PM, Bruce Momjian wrote: [ Sorry to be jumping into this thread late.] No problem at all. I am not sure threads would greatly help us. Note that I'm absolutely, certainly not advocating the use of threads for Postgres. The major

Re: [HACKERS] ERROR: argument to pg_get_expr() must come from system catalogs

2010-08-09 Thread Bruce Momjian
Tom Lane wrote: Dave Page dp...@pgadmin.org writes: On Fri, Jul 30, 2010 at 12:17 AM, Tom Lane t...@sss.pgh.pa.us wrote: I've applied a (rather hurried) patch for this for 9.0beta4. Thanks. Bruce seemed to think it affected 8.4.4 as well - would that be the case, or is it something

[HACKERS] Universal B-tree

2010-08-09 Thread Daniel Oliveira
Dear developers, I'm PhD candidate in Brazil and a newbie on postgresql developement, sorry for any silly questions. I implemented a new algorithm for range search using universal b-tree but I don't have a clue how to integrate it into postgresql. Where I can find the resources about it? I

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Bruce Momjian
Bruce Momjian wrote: With our process-based design, the default is private memory (i.e. not shared). If you need shared memory, you must specify a certain amount in advance. That chunk of shared memory then is reserved and can't ever be used by another subsystem. Even if you barely ever

Re: [HACKERS] ERROR: argument to pg_get_expr() must come from system catalogs

2010-08-09 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Tom Lane wrote: Dave Page dp...@pgadmin.org writes: Thanks. Bruce seemed to think it affected 8.4.4 as well - would that be the case, or is it something else? He's mistaken. The bug is in all the branches, but there have been no releases with it

Re: [HACKERS] ERROR: argument to pg_get_expr() must come from system catalogs

2010-08-09 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Tom Lane wrote: Dave Page dp...@pgadmin.org writes: Thanks. Bruce seemed to think it affected 8.4.4 as well - would that be the case, or is it something else? He's mistaken. The bug is in all the branches, but there have been no

Re: [HACKERS] patch: to_string, to_array functions

2010-08-09 Thread Bruce Momjian
Pavel Stehule wrote: 2010/7/21 Itagaki Takahiro itagaki.takah...@gmail.com: 2010/7/20 Pavel Stehule pavel.steh...@gmail.com: here is a new version - new these functions are not a strict and function to_string is marked as stable. We have array_to_string(anyarray, text) and

Re: [HACKERS] Universal B-tree

2010-08-09 Thread Greg Stark
On Mon, Aug 9, 2010 at 5:31 PM, Daniel Oliveira danielmarquesolive...@gmail.com wrote: I don't need to change B-tree estructure. I just need integrate my encode function that transforms multiple keys into one key by bit-interleaving and to acess elements given several intervals (range search).

Re: [HACKERS] patch: to_string, to_array functions

2010-08-09 Thread Brendan Jurd
Apparently, the message I sent (quoted below) didn't make it to -hackers. I know that Pavel received the message, as he replied to it. I'm calling shenanigans on the mailing list server, but in the meantime, here are those diffs again. On 31 July 2010 07:37, Brendan Jurd dire...@gmail.com

Re: [HACKERS] knngist - 0.8

2010-08-09 Thread Alexander Korotkov
In gist consitent method support only filtering strategies. For such strategies consistent method returns true if subtree can contain matching node and false otherwise. Knngist introduce also order by strategies. For filtering strategies knngist consistent method returns 0 if subtree can contain

Re: [HACKERS] Universal B-tree

2010-08-09 Thread Daniel Oliveira
For research purpose, I think that expression index is a good idea. I just want to do a proof of concept. The other issue is that my algorithm break a z-order interval into several intervals that represents the query box. How should I create it without creating any overhead? Best regards,

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Simon Riggs
On Mon, 2010-08-09 at 11:41 -0400, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: So imagine that thread-or-process A allocates allocates a new chunk of memory and then writes a pointer to the new chunk in a previously allocated section of memory. Thread-or-process B then

Re: [HACKERS] Surprising dead_tuple_count from pgstattuple

2010-08-09 Thread Simon Riggs
On Sat, 2010-08-07 at 16:11 -0700, Gordon Shannon wrote: So, I guess my real question here is, what happened to the missing 100 items? If it was HOT prune, can anyone summarize what that does? Itagaki already explained that the second DELETE would have removed the 100 dead rows you consider

Re: [HACKERS] is syntax columname(tablename) necessary still?

2010-08-09 Thread Robert Haas
On Mon, Aug 9, 2010 at 11:24 AM, Pavel Stehule pavel.steh...@gmail.com wrote: They name to be type_func_keywords, perhaps, but not fully reserved. And they'd still need that treatment anyway.  Even if cube(whatever) can't mean extract a column called cube from table whatever, it can still mean

Re: [HACKERS] is syntax columname(tablename) necessary still?

2010-08-09 Thread Pavel Stehule
2010/8/9 Robert Haas robertmh...@gmail.com: On Mon, Aug 9, 2010 at 11:24 AM, Pavel Stehule pavel.steh...@gmail.com wrote: They name to be type_func_keywords, perhaps, but not fully reserved. And they'd still need that treatment anyway.  Even if cube(whatever) can't mean extract a column

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Markus Wanner
Hi, On 08/09/2010 05:41 PM, Tom Lane wrote: ... and on some platforms, it'll be flat out impossible. We looked at this years ago and concluded that changing the size of the shmem segment after postmaster start was impractical from a portability standpoint. I have not seen anything to change

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Markus Wanner
Hi, On 08/09/2010 06:10 PM, Bruce Momjian wrote: My point is that you can treat malloc the same as add shared memory, to some extent, with the same limiations. Once one of the SLRU buffers is full, it cannot currently allocate from another SLRU buffer's unused memory area. That memory there

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Robert Haas
On Mon, Aug 9, 2010 at 11:41 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: So imagine that thread-or-process A allocates allocates a new chunk of memory and then writes a pointer to the new chunk in a previously allocated section of memory.  Thread-or-process

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Robert Haas
On Mon, Aug 9, 2010 at 12:03 PM, Bruce Momjian br...@momjian.us wrote: Robert Haas wrote: On Mon, Aug 9, 2010 at 11:02 AM, Bruce Momjian br...@momjian.us wrote: I am not sure threads would greatly help us. ?The major problem is that all of our our structures are currently contiguous in

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Robert Haas
On Mon, Aug 9, 2010 at 12:31 PM, Bruce Momjian br...@momjian.us wrote: Bruce Momjian wrote: With our process-based design, the default is private memory (i.e. not shared). If you need shared memory, you must specify a certain amount in advance. That chunk of shared memory then is reserved

Re: [HACKERS] Surprising dead_tuple_count from pgstattuple

2010-08-09 Thread Robert Haas
On Mon, Aug 9, 2010 at 1:50 PM, Simon Riggs si...@2ndquadrant.com wrote: On Sat, 2010-08-07 at 16:11 -0700, Gordon Shannon wrote: So, I guess my real question here is, what happened to the missing 100 items?  If it was HOT prune, can anyone summarize what that does? Itagaki already explained

Re: [HACKERS] Surprising dead_tuple_count from pgstattuple

2010-08-09 Thread Heikki Linnakangas
On 09/08/10 21:21, Robert Haas wrote: On Mon, Aug 9, 2010 at 1:50 PM, Simon Riggssi...@2ndquadrant.com wrote: Any SQL statement that reads a block can do HOT pruning, if the block is otherwise unlocked. Where does heap_page_prune() get called from in the DELETE path? heapgetpage() --

Re: [HACKERS] Surprising dead_tuple_count from pgstattuple

2010-08-09 Thread Robert Haas
On Mon, Aug 9, 2010 at 2:23 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 09/08/10 21:21, Robert Haas wrote: On Mon, Aug 9, 2010 at 1:50 PM, Simon Riggssi...@2ndquadrant.com  wrote: Any SQL statement that reads a block can do HOT pruning, if the block is otherwise

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Markus Wanner
Hi, On 08/09/2010 06:31 PM, Bruce Momjian wrote: Let me be more concrete. Suppose you are using threads, and you want to increase your shared memory from 20MB to 30MB. How do you do that? There's absolutely no need to pre-allocate 20 MB in advance in a threaded environment. You just

Re: [HACKERS] knngist - 0.8

2010-08-09 Thread Robert Haas
On Sun, Aug 8, 2010 at 4:28 PM, Alexander Korotkov aekorot...@gmail.com wrote: In gist consitent method support only filtering strategies. For such strategies consistent method returns true if subtree can contain matching node and false otherwise. Knngist introduce also order by strategies. For

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Bruce Momjian
Markus Wanner wrote: Hi, On 08/09/2010 06:10 PM, Bruce Momjian wrote: My point is that you can treat malloc the same as add shared memory, to some extent, with the same limiations. Once one of the SLRU buffers is full, it cannot currently allocate from another SLRU buffer's unused

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Bruce Momjian
Robert Haas wrote: On Mon, Aug 9, 2010 at 12:31 PM, Bruce Momjian br...@momjian.us wrote: Bruce Momjian wrote: With our process-based design, the default is private memory (i.e. not shared). If you need shared memory, you must specify a certain amount in advance. That chunk of shared

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Bruce Momjian
Markus Wanner wrote: Hi, On 08/09/2010 06:31 PM, Bruce Momjian wrote: Let me be more concrete. Suppose you are using threads, and you want to increase your shared memory from 20MB to 30MB. How do you do that? There's absolutely no need to pre-allocate 20 MB in advance in a threaded

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Markus Wanner
On 08/09/2010 08:33 PM, Bruce Momjian wrote: Robert Haas wrote: You probably wouldn't do either of those things. You'd just allocate small chunks here and there for whatever you need them for. Well, then we do that with shared memory then --- my point is that it is the same problem with

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Robert Haas
On Mon, Aug 9, 2010 at 2:28 PM, Markus Wanner mar...@bluegap.ch wrote: Another issue to be discussed would be the limits of sharing free memory between subsystems. Maybe we even reach the conclusion that we absolutely *want* fixed maximum sizes for every single subsystem so as to be able to

[HACKERS] host name support in pg_hba.conf

2010-08-09 Thread Peter Eisentraut
Here is a patch for host name support in pg_hba.conf. I have reviewed various past threads about this, and there appeared to have been a 50/50 split of for and against reverse lookup. I went with the reverse lookup, because 0) I like it. 1) It is more secure. 2) It allows extending it to

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Robert Haas
On Mon, Aug 9, 2010 at 2:33 PM, Bruce Momjian br...@momjian.us wrote: Let me be more concrete. ?Suppose you are using threads, and you want to increase your shared memory from 20MB to 30MB. ?How do you do that? ?If you want it contiguous, you have to use realloc, which might move the

Re: [HACKERS] [JDBC] Trouble with COPY IN

2010-08-09 Thread Kris Jurka
On Sat, 7 Aug 2010, Kris Jurka wrote: On Fri, 6 Aug 2010, James William Pye wrote: I think there's a snag in the patch: postgres=# COPY data FROM '/Users/jwp/DATA.bcopy' WITH BINARY; ERROR: row field count is -1, expected 1 CONTEXT: COPY data, line 4 Probably a quick/small fix away, I

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Bruce Momjian
Markus Wanner wrote: On 08/09/2010 08:33 PM, Bruce Momjian wrote: Robert Haas wrote: You probably wouldn't do either of those things. You'd just allocate small chunks here and there for whatever you need them for. Well, then we do that with shared memory then --- my point is that it is

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Bruce Momjian
Robert Haas wrote: On Mon, Aug 9, 2010 at 2:33 PM, Bruce Momjian br...@momjian.us wrote: Let me be more concrete. ?Suppose you are using threads, and you want to increase your shared memory from 20MB to 30MB. ?How do you do that? ?If you want it contiguous, you have to use realloc, which

Re: [HACKERS] host name support in pg_hba.conf

2010-08-09 Thread Kevin Grittner
Peter Eisentraut pete...@gmx.net wrote: The client's IP address (known from the kernel) Some machines have several IP addresses; how is that handled? is reverse looked up, which results in a host name. Some IP addresses have several host names, including in reverse lookup; how is that

Re: [HACKERS] host name support in pg_hba.conf

2010-08-09 Thread Thom Brown
On 9 August 2010 19:47, Peter Eisentraut pete...@gmx.net wrote: Here is a patch for host name support in pg_hba.conf.  I have reviewed various past threads about this, and there appeared to have been a 50/50 split of for and against reverse lookup.  I went with the reverse lookup, because 0)

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Markus Wanner
On 08/09/2010 08:49 PM, Bruce Momjian wrote: Markus Wanner wrote: That's what my patch allows you to do, yes. Currently you are bound to pre-allocate shared memory at startup. Or how would you allocate small chunks from shared memory at the moment? We don't --- we allocate it all at startup.

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Robert Haas
On Mon, Aug 9, 2010 at 2:50 PM, Bruce Momjian br...@momjian.us wrote: Robert Haas wrote: On Mon, Aug 9, 2010 at 2:33 PM, Bruce Momjian br...@momjian.us wrote: Let me be more concrete. ?Suppose you are using threads, and you want to increase your shared memory from 20MB to 30MB. ?How do you

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Bruce Momjian
Robert Haas wrote: On Mon, Aug 9, 2010 at 2:50 PM, Bruce Momjian br...@momjian.us wrote: Robert Haas wrote: On Mon, Aug 9, 2010 at 2:33 PM, Bruce Momjian br...@momjian.us wrote: Let me be more concrete. ?Suppose you are using threads, and you want to increase your shared memory

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Markus Wanner
On 08/09/2010 08:50 PM, Bruce Momjian wrote: You effectively have to add infrastructure to add/remove shared memory segments to match memory requests. It is another step, but it is the same behavior. That's of no use without a dynamic allocator, I think. Or else it is a vague description of

Re: [HACKERS] host name support in pg_hba.conf

2010-08-09 Thread Robert Haas
On Mon, Aug 9, 2010 at 2:47 PM, Peter Eisentraut pete...@gmx.net wrote: Here is a patch for host name support in pg_hba.conf.  I have reviewed various past threads about this, and there appeared to have been a 50/50 split of for and against reverse lookup.  I went with the reverse lookup,

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Markus Wanner
On 08/09/2010 09:00 PM, Bruce Momjian wrote: You could allocate shared memory in chunks and then pass that out to requestors, the same way sbrk() does it. sbrk() is described [1] as a low-level memory allocator, which is typically only used by the high-level malloc memory allocator

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Robert Haas
On Mon, Aug 9, 2010 at 3:00 PM, Bruce Momjian br...@momjian.us wrote: That would be one way to tackle the problem, but there are difficulties.  If we just created new shared memory segments at need, we might end up with a lot of shared memory segments.  I suspect that would get complicated and

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Markus Wanner
Hi, On 08/09/2010 08:45 PM, Robert Haas wrote: Yeah, I think that's a real concern. I think we need to distinguish memory needs from memory wants. Ideally, we'd like our entire database to be cached in RAM. But that may or may not be feasible, so we page what we can into shared_buffers and

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Tom Lane
Markus Wanner mar...@bluegap.ch writes: However, I'd like to get back to the original intent of the posted patch. Which is about dynamically allocating memory *within a fixed size pool*. That's something SRLU or shared_buffers do to some extent, but with lots of limitations. And without

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Aug 9, 2010 at 11:41 AM, Tom Lane t...@sss.pgh.pa.us wrote: ... and on some platforms, it'll be flat out impossible.  We looked at this years ago and concluded that changing the size of the shmem segment after postmaster start was impractical

Re: [HACKERS] host name support in pg_hba.conf

2010-08-09 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: Here is a patch for host name support in pg_hba.conf. My recollection is that the previous discussions got stuck on the cost of doing DNS lookups for every connect; and the obvious solution of trying to cache the names was shot down on the basis of not

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Markus Wanner
Hi, On 08/09/2010 09:14 PM, Tom Lane wrote: As far as SLRU is concerned, the already-agreed-to plan is to get rid of the separate arenas for SLRU and merge those things into the main shared buffers arena. I didn't know about that plan. Sounds good. (I'm personally thinking this is trying to

Re: [HACKERS] host name support in pg_hba.conf

2010-08-09 Thread Stephen Frost
* Kevin Grittner (kevin.gritt...@wicourts.gov) wrote: The client's IP address (known from the kernel) Some machines have several IP addresses; how is that handled? Sounds like he already described it, or I read it wrong. The fact that some machines have several IP addresses hardly matters-

Re: [HACKERS] security label support, part.2

2010-08-09 Thread Robert Haas
2010/7/26 KaiGai Kohei kai...@ak.jp.nec.com: The attached patches are revised ones, as follows. I think this is pretty good, and I'm generally in favor of committing it. Some concerns: 1. Since nobody has violently objected to the comment.c refactoring patch I recently proposed, I'm hopeful

Re: [HACKERS] patch: to_string, to_array functions

2010-08-09 Thread Tom Lane
Brendan Jurd dire...@gmail.com writes: I have attached v4 of the patch against HEAD, and also an incremental patch showing just my changes against v3. I'll mark this as ready for committer. Looking at this, I want to question the implode/explode naming. I think those names are too cute by

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Robert Haas
On Mon, Aug 9, 2010 at 3:20 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Aug 9, 2010 at 11:41 AM, Tom Lane t...@sss.pgh.pa.us wrote: ... and on some platforms, it'll be flat out impossible.  We looked at this years ago and concluded that changing the

Re: [HACKERS] patch: to_string, to_array functions

2010-08-09 Thread Robert Haas
On Mon, Aug 9, 2010 at 4:08 PM, Tom Lane t...@sss.pgh.pa.us wrote: Brendan Jurd dire...@gmail.com writes: I have attached v4 of the patch against HEAD, and also an incremental patch showing just my changes against v3. I'll mark this as ready for committer. Looking at this, I want to

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Aug 9, 2010 at 3:20 PM, Tom Lane t...@sss.pgh.pa.us wrote: It's not portable.  That's exactly what we were looking into back when. Uggh, that sucks. Can you provide any more details? You don't really have to go further than consulting the

Re: [HACKERS] patch: to_string, to_array functions

2010-08-09 Thread Merlin Moncure
On Mon, Aug 9, 2010 at 4:08 PM, Tom Lane t...@sss.pgh.pa.us wrote: Brendan Jurd dire...@gmail.com writes: I have attached v4 of the patch against HEAD, and also an incremental patch showing just my changes against v3. I'll mark this as ready for committer. Looking at this, I want to

[HACKERS] Hector Beyers wants to stay in touch on LinkedIn

2010-08-09 Thread Hector Beyers
LinkedIn Hector Beyers souhaite se connecter à vous sur LinkedIn : -- Amine, I'd like to add you to my professional network on LinkedIn. - Hector Beyers Accepter l'invitation de Hector Beyers

Re: [HACKERS] dynamically allocating chunks from shared memory

2010-08-09 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: I don't think it's going to be too easy to provide, short of (as Tom says) moving to the MySQL model of many threads working in a single process. Well, it's a bit misleading to refer to it as the MySQL model. It's used by Microsoft SQL Server,

Re: [HACKERS] patch: to_string, to_array functions

2010-08-09 Thread Tom Lane
Merlin Moncure mmonc...@gmail.com writes: Is there any reason why array functions need the type prefix when other type conversion functions don't? Why didn't we name unnest() array_unnest()? UNNEST() is in the standard, IIRC, so you'd have to ask the SQL committee that. (And no, they're not

Re: [HACKERS] patch: to_string, to_array functions

2010-08-09 Thread David E. Wheeler
On Aug 9, 2010, at 1:10 PM, Robert Haas wrote: My first thought is that we should go back to the string_to_array and array_to_string names. The key reason not to use those names was the conflict with the old functions if you didn't specify a third argument, but where is the advantage of not

  1   2   >