[HACKERS] set the cost of an aggregate function

2009-11-29 Thread Jaime Casanova
Hi, why we can't do $subject? it could have any benefit on the planner? -- Atentamente, Jaime Casanova Soporte y capacitación de PostgreSQL Asesoría y desarrollo de sistemas Guayaquil - Ecuador Cel. +59387171157 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make chan

Re: [HACKERS] Patch: Remove gcc dependency in definition of inline functions

2009-11-29 Thread Marko Kreen
On 11/29/09, Tom Lane wrote: > Kurt Harriman writes: > > (Does anybody still use a C compiler that doesn't support > > inline functions?) +1 for modern C. > The question isn't so much that, it's whether the compiler supports > inline functions with the same behavior as gcc. At minimum that

[HACKERS] Fwd: psql+krb5

2009-11-29 Thread rahimeh khodadadi
-- Forwarded message -- From: rahimeh khodadadi Date: 2009/11/29 Subject: Re: psql+krb5 To: Denis Feklushkin These items have added after my sending. I repeat again my configurations: * 1) The configuration of krb5.conf is: [realms] EXAMPLE.COM ={

Re: [HACKERS] ProcessUtility_hook

2009-11-29 Thread Itagaki Takahiro
Euler Taveira de Oliveira wrote: > The functionality is divided in two parts. The first part is a hook in the > utility module. The idea is capture the commands that doesn't pass through > executor. I'm afraid that that hook will be used only for capturing non-DML > queries. If so, why don't we

Re: [HACKERS] Application name patch - v4

2009-11-29 Thread Andres Freund
Hi, On Monday 30 November 2009 01:16:43 Florian G. Pflug wrote: > Tom Lane wrote: > > : One possibility would be to make it possible to issue SETs that > > > > behave : as if set in a startup packet - imho its an implementation > > detail that : SET currently is used. > > > > I think there's a goo

Re: [HACKERS] draft RFC: concept for partial, wal-based replication

2009-11-29 Thread Craig Ringer
Boszormenyi Zoltan wrote: > c. splitting wal into different replication sets Just a side note: in addition to its use for partial replication, this might have potential for performance-prioritizing databases or tablespaces. Being able to separate WAL logging so that different DBs, tablespaces, e

Re: [HACKERS] SE-PgSQL patch review

2009-11-29 Thread KaiGai Kohei
Itagaki Takahiro wrote: > KaiGai Kohei wrote: >> -- keep it smaller, and step-by-step enhancement > > I'd prefer "smaller concept" rather than "smaller patch". For the last a few days, I've talked with Itagaki-san off list to make clear where is the point of his suggestion. In summary, it was

Re: [HACKERS] New VACUUM FULL

2009-11-29 Thread Itagaki Takahiro
Thanks for review! Jeff Davis wrote: > * "VACUUM (FULL REPLACE) pg_class" should be rejected, not silently > turned into "VACUUM (FULL INPLACE) pg_class". Hmmm, it requires to remember whether REPLACE is specified or not for the non-INPLACE vacuum, but I don't want to add VACOPT_REPLACE only f

Re: [HACKERS] Listen / Notify - what to do when the queue is full

2009-11-29 Thread Jeff Davis
On Fri, 2009-11-20 at 10:35 +0100, Joachim Wieland wrote: > On Thu, Nov 19, 2009 at 11:04 PM, Joachim Wieland wrote: > > Given your example, what I am proposing now is to stop reading from > > the queue once we see a not-yet-committed notification but once the > > queue is full, read the uncommitt

Re: [HACKERS] Add YAML option to explain

2009-11-29 Thread Itagaki Takahiro
Itagaki Takahiro wrote: > My rewrite is relatively large. Please reversely-review the patch. I rethink the code cleanup should be done with another patch even if needed. Here is a lite version of yaml YAML explan patch. All of the logic for indent is done in ExplainYAMLLineStarting(). It can r

Re: [HACKERS] Application name patch - v4

2009-11-29 Thread Fujii Masao
On Mon, Nov 30, 2009 at 11:21 AM, Fujii Masao wrote: > On Mon, Nov 30, 2009 at 10:20 AM, Tom Lane wrote: >> Fujii Masao writes: >>> Why doesn't application_name appear in postgresql.conf.sample? >>> That is expected to be set from only libpq? >> >> It would seem pretty silly to set it in the con

Re: [HACKERS] draft RFC: concept for partial, wal-based replication

2009-11-29 Thread Fujii Masao
On Mon, Nov 30, 2009 at 4:56 AM, Boszormenyi Zoltan wrote: > I don't think its reasonable trying to discuss and implement this all > in one huge patch so I propose implementing at least 1) as a seperate > patch. I agree with this development plan. > Now there unforatunately are two different sch

Re: [HACKERS] [PATCH 4/4] Add tests to dblink covering use of COPY TO FUNCTION

2009-11-29 Thread Jeff Davis
On Sun, 2009-11-29 at 18:53 -0800, Daniel Farina wrote: > On Sun, Nov 29, 2009 at 6:35 PM, Jeff Davis wrote: > > What if the network buffer is flushed in the middle of a line? Is that > > possible, or is there a guard against that somewhere? > > What do you mean? They both catenate onto one stre

Re: [HACKERS] draft RFC: concept for partial, wal-based replication

2009-11-29 Thread Itagaki Takahiro
Boszormenyi Zoltan wrote: > we tried to discuss on a lower level what should be needed > for a partial replication based on streaming replication. We need to discuss a "partial recovery" before the partial replication. There are some related items in out ToDo list and previous discussions: ht

Re: [HACKERS] [PATCH 4/4] Add tests to dblink covering use of COPY TO FUNCTION

2009-11-29 Thread Daniel Farina
On Sun, Nov 29, 2009 at 6:35 PM, Jeff Davis wrote: > What if the network buffer is flushed in the middle of a line? Is that > possible, or is there a guard against that somewhere? What do you mean? They both catenate onto one stream of bytes, it shouldn't matter where the flush boundaries are...

Re: [HACKERS] [PATCH 4/4] Add tests to dblink covering use of COPY TO FUNCTION

2009-11-29 Thread Jeff Davis
On Thu, 2009-11-26 at 18:30 -0800, Daniel Farina wrote: > Okay, so this thread sort of wandered into how we could refactor other > elements of COPY. Do we have a good sense on what we should do to the > current patch (or at least the idea represented by it) to get it into > a committable state wit

Re: [HACKERS] [PATCH 4/4] Add tests to dblink covering use of COPY TO FUNCTION

2009-11-29 Thread Jeff Davis
On Fri, 2009-11-27 at 20:28 -0500, Greg Smith wrote: > In the context of the read case, I'm not as sure it's so black and > white. While the current situation does map better to a function that > produces a stream of bytes, that's not necessarily the optimal approach > for all situations. It's

Re: [HACKERS] Application name patch - v4

2009-11-29 Thread Fujii Masao
On Mon, Nov 30, 2009 at 10:20 AM, Tom Lane wrote: > Fujii Masao writes: >> Why doesn't application_name appear in postgresql.conf.sample? >> That is expected to be set from only libpq? > > It would seem pretty silly to set it in the conf file.  You *can*, > if you want, but I see no reason to lis

Re: [HACKERS] Application name patch - v4

2009-11-29 Thread Tom Lane
Fujii Masao writes: > Why doesn't application_name appear in postgresql.conf.sample? > That is expected to be set from only libpq? It would seem pretty silly to set it in the conf file. You *can*, if you want, but I see no reason to list it there. regards, tom lane --

Re: [HACKERS] cvs chapters in our docs

2009-11-29 Thread Ron Mayer
Brendan Jurd wrote: > 2009/11/29 Bruce Momjian : >> Wow, we mention 28k modems --- we are legacy software: ;-) >> >> This initial checkout is a little slower than simply downloading >> a tar.gz file; expect it to take 40 minutes >> or so if you have a 28.8K modem. > > Yes, and what ab

Re: [HACKERS] Application name patch - v4

2009-11-29 Thread Fujii Masao
On Sun, Nov 29, 2009 at 8:47 AM, Tom Lane wrote: > Dave Page writes: >> Updated application name patch, including a GUC assign hook to clean >> the application name of any unsafe characters, per discussion. > > Applied with assorted editorialization.  There were a couple of > definitional issues

Re: [HACKERS] Application name patch - v4

2009-11-29 Thread Florian G. Pflug
Tom Lane wrote: : One possibility would be to make it possible to issue SETs that behave : as if set in a startup packet - imho its an implementation detail that : SET currently is used. I think there's a good deal of merit in this, and it would't be hard at all to implement, seeing that we alre

Re: [HACKERS] Application name patch - v4

2009-11-29 Thread Tom Lane
Dimitri Fontaine writes: > Le 29 nov. 2009 à 18:22, Tom Lane a écrit : >>> I think we should use GUC_NO_RESET_ALL. >> >> I agree with you, but it seems we have at least as many votes to not do >> that. Any other votes out there? > Driven by the pooler use case (pgbouncer, even), I'd say RESET A

Re: [HACKERS] Writeable CTE patch

2009-11-29 Thread Alex Hunsaker
On Sat, Nov 28, 2009 at 11:59, Tom Lane wrote: > 1. I thought we'd agreed at > http://archives.postgresql.org/pgsql-hackers/2009-10/msg00558.php > that the patch should support WITH on DML statements, eg >        with (some-query) insert into foo ... > This might not take much more than grammar ad

Re: [HACKERS] plperl and inline functions -- first draft

2009-11-29 Thread Joshua Tolley
On Sat, Nov 28, 2009 at 10:15:40PM -0500, Tom Lane wrote: > Joshua Tolley writes: > > Makes sense on both counts. Thanks for the help. How does the attached look? > > Applied with minor corrections, mainly around the state save/restore > logic. I also put in some code to fix the memory leak note

Re: [HACKERS] Patch: Remove gcc dependency in definition of inline functions

2009-11-29 Thread Tom Lane
Kurt Harriman writes: > (Does anybody still use a C compiler that doesn't support > inline functions?) The question isn't so much that, it's whether the compiler supports inline functions with the same behavior as gcc. At minimum that would require * not generating extra copies of the fu

Re: [HACKERS] cvs chapters in our docs

2009-11-29 Thread Brendan Jurd
2009/11/29 Bruce Momjian : > Wow, we mention 28k modems --- we are legacy software:  ;-) > >     This initial checkout is a little slower than simply downloading >     a tar.gz file; expect it to take 40 minutes >     or so if you have a 28.8K modem. Yes, and what about all the people using carrie

Re: [HACKERS] Application name patch - v4

2009-11-29 Thread Dimitri Fontaine
Hi, Le 29 nov. 2009 à 18:22, Tom Lane a écrit : >> I think we should use GUC_NO_RESET_ALL. > > I agree with you, but it seems we have at least as many votes to not do > that. Any other votes out there? Driven by the pooler use case (pgbouncer, even), I'd say RESET ALL should reset also the app

Re: [HACKERS] draft RFC: concept for partial, wal-based replication

2009-11-29 Thread Boszormenyi Zoltan
Hi, we tried to discuss on a lower level what should be needed for a partial replication based on streaming replication. a. transferring base data after a slave got added a relation/index/... (and initial setup) b. communicating the the slaves which relations they currently should have available

[HACKERS] Patch: Remove gcc dependency in definition of inline functions

2009-11-29 Thread Kurt Harriman
Hi, The attached patch is offered for the 2010-01 commitfest. It's also available in my git repository in the "submitted" branch: http://git.postgresql.org/gitweb?p=users/harriman/share.git;a=shortlog;h=refs/heads/submitted In palloc.h and pg_list.h, some inline functions are defined if allow

Re: [HACKERS] Timezones (in 8.5?)

2009-11-29 Thread Pavel Stehule
2009/11/29 David E. Wheeler : > On Nov 28, 2009, at 5:40 PM, Bruce Momjian wrote: > >> I think there is general agreement that we should have a timezone data >> type which validates against pg_timezone_names().name.  It might be >> enough to just document how users can create such a domain data typ

Re: [HACKERS] Timezones (in 8.5?)

2009-11-29 Thread David E. Wheeler
On Nov 28, 2009, at 5:40 PM, Bruce Momjian wrote: > I think there is general agreement that we should have a timezone data > type which validates against pg_timezone_names().name. It might be > enough to just document how users can create such a domain data type, > but I don't know of a way to do

Re: [HACKERS] cvs chapters in our docs

2009-11-29 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Robert Haas wrote: > >> I have to say I'm not really impressed by the idea of removing things > >> from our documentation and replacing them with pages on the wiki. The > >> documentation is better-written and easier to navigate. Yeah, the > >> part ab

Re: [HACKERS] Application name patch - v4

2009-11-29 Thread Tom Lane
Dave Page writes: > On Sat, Nov 28, 2009 at 11:47 PM, Tom Lane wrote: >> 1. The patch prevents non-superusers from seeing other users' >> application names in pg_stat_activity.  This seems at best pretty >> debatable to me.  Yes, it supports usages in which you want to put >> security-sensitive i

Re: [HACKERS] LDAP where DN does not include UID attribute

2009-11-29 Thread Magnus Hagander
On Sun, Nov 29, 2009 at 13:05, Magnus Hagander wrote: > On Fri, Sep 18, 2009 at 02:24, Robert Fleming wrote: >> On Thu, Sep 17, 2009 at 11:15 AM, Magnus Hagander >> wrote: >>> >>> On Thu, Sep 17, 2009 at 18:02, Robert Fleming wrote: >>> > Following a discussion on the pgsql-admin list >>> >

Re: [HACKERS] Application name patch - v4

2009-11-29 Thread Dave Page
On Sat, Nov 28, 2009 at 11:47 PM, Tom Lane wrote: > Dave Page writes: >> Updated application name patch, including a GUC assign hook to clean >> the application name of any unsafe characters, per discussion. > > Applied with assorted editorialization.  There were a couple of > definitional issues

Re: [HACKERS] cvs chapters in our docs

2009-11-29 Thread Tom Lane
Bruce Momjian writes: > Robert Haas wrote: >> I have to say I'm not really impressed by the idea of removing things >> from our documentation and replacing them with pages on the wiki. The >> documentation is better-written and easier to navigate. Yeah, the >> part about 28K modems is pretty sil

Re: [HACKERS] compile error with -DOPTIMIZER_DEBUG

2009-11-29 Thread Tom Lane
Bruce Momjian writes: > Tom Lane wrote: >> You know, the last couple of times I've touched that code, I've been >> wondering why we bother to maintain it. Personally I always use pprint() >> when I'm interested in a printout of a plan tree. Is anyone actually >> using the printout code in allpat

[HACKERS] A small issue in CommentCast function

2009-11-29 Thread Gokulakannan Somasundaram
Hi, I think this is more of code uniformity issue. Nevertheless, i just thought of putting it here. In the CommentCast function, i think both sourcetype and targettype should be in the arguments, whereas in the code, source type is made as the name and the target type is passed in as argument

Re: [HACKERS] Timezones (in 8.5?)

2009-11-29 Thread Bruce Momjian
Andrew Gierth wrote: > > "Bruce" == Bruce Momjian writes: > > Bruce> I think there is general agreement that we should have a > Bruce> timezone data type which validates against > Bruce> pg_timezone_names().name. > > What happens when pg_timezone_names output changes? (which it can do, >

Re: [HACKERS] cvs chapters in our docs

2009-11-29 Thread Bruce Momjian
Robert Haas wrote: > I have to say I'm not really impressed by the idea of removing things > from our documentation and replacing them with pages on the wiki. The > documentation is better-written and easier to navigate. Yeah, the > part about 28K modems is pretty silly, but we can fix that witho

Re: [HACKERS] LDAP where DN does not include UID attribute

2009-11-29 Thread Magnus Hagander
On Fri, Sep 18, 2009 at 02:24, Robert Fleming wrote: > On Thu, Sep 17, 2009 at 11:15 AM, Magnus Hagander > wrote: >> >> On Thu, Sep 17, 2009 at 18:02, Robert Fleming wrote: >> > Following a discussion on the pgsql-admin list >> > ,

Re: [HACKERS] compile error with -DOPTIMIZER_DEBUG

2009-11-29 Thread Bruce Momjian
Tom Lane wrote: > Heikki Linnakangas writes: > > Jan Urba??ski wrote: > >> ISTM that there's a superfluous curly brace in print_path (which only > >> gets compiled with -DOPTIMIZER_DEBUG. > > > Thanks, committed. > > You know, the last couple of times I've touched that code, I've been > wonderin

Re: [HACKERS] Timezones (in 8.5?)

2009-11-29 Thread Andrew Gierth
> "Bruce" == Bruce Momjian writes: Bruce> I think there is general agreement that we should have a Bruce> timezone data type which validates against Bruce> pg_timezone_names().name. What happens when pg_timezone_names output changes? (which it can do, especially if the install is using th

Re: [HACKERS] plperl and inline functions -- first draft

2009-11-29 Thread Alexey Klyukin
On Nov 29, 2009, at 4:40 AM, Tom Lane wrote: > Alexey Klyukin writes: > >> Isn't it also the case with the existing plperl code ? I've noticed that >> free(prodesc) is called when it's no longer used (i.e. in >> plperl_compile_callback:1636), but refcount of desc->reference is never >> decre