Re: [HACKERS] pg_migrator issues

2010-01-05 Thread decibel
On Dec 30, 2009, at 9:50 PM, Bruce Momjian wrote: > 3) There is no easy way to analyze all databases. vacuumdb --analyze > does analyze _and_ vacuum, which for an 8.4 to 8.5 migration does an > unnecessary vacuum. Right now I recommend ANALYZE in every database, > but it would be nice if there w

Re: [HACKERS] Stats for inheritance trees

2010-01-05 Thread decibel
On Dec 29, 2009, at 6:29 PM, Tom Lane wrote: > * when a tabstat message comes in, increment changes_since_analyze by > the sum of t_tuples_inserted + t_tuples_updated + t_tuples_deleted; > > * when an analyze report message comes in, reset changes_since_analyze > to zero. If that's being added, c

Re: [HACKERS] Type modifiers for DOMAIN

2010-01-05 Thread Jaime Casanova
On Wed, Jan 6, 2010 at 1:12 AM, Takahiro Itagaki wrote: > > What reason do we have not to inherit typmodin/typmodout from the base type? > I found a comment in DefineDomain(), >    /* Domains never accept typmods, so no typmodin/typmodout needed */ > but can we relax the restriction? This feature

[HACKERS] Type modifiers for DOMAIN

2010-01-05 Thread Takahiro Itagaki
Hi, I'm trying to use DOMAIN as just synonym types for database migration. For example, =# CREATE DOMAIN varchar2 AS pg_catalog.varchar; =# CREATE DOMAIN number AS pg_catalog.numeric; Domains were created successfully, but I cannot use type modifiers for them. =# CREATE TABLE tbl (v v

Re: [HACKERS] New VACUUM FULL

2010-01-05 Thread Takahiro Itagaki
Simon Riggs wrote: > > 1. Commit your patch, as-is (you/me) > > I assume this is OK with you now? I just applied the patch with a few additional comments. Also, I adjusted some messages for vacuumdb to be look-alike for recently-committed --only-analyze patch. Remaining ToDo items are: >> 2.

[HACKERS] 'replication' keyword on .pgpass (Streaming Replication)

2010-01-05 Thread Fujii Masao
On Sat, Dec 26, 2009 at 10:55 AM, Fujii Masao wrote: > On Fri, Dec 25, 2009 at 9:56 PM, Andrew Dunstan wrote: >> I don't see the use case for it - .pgpass is for single users, not a whole >> cluster. And it does support wildcards, which takes care of the 'all' case. >> In the case of pg_hba.conf

Re: [HACKERS] Auto-extending table partitions?

2010-01-05 Thread u235sentinel
Robert Haas wrote: Getting full? ...Robert Ok. Bad analogy. We have the tables setup to write data according to the month it was loaded. We have a December table, a January table and so on. Basically following the examples given on the 8.4 web site. I'm thinking it would be nice if

Re: [HACKERS] pg_migrator issues

2010-01-05 Thread Bruce Momjian
Bruce Momjian wrote: > Alvaro Herrera wrote: > > > 3) There is no easy way to analyze all databases. vacuumdb --analyze > > > does analyze _and_ vacuum, which for an 8.4 to 8.5 migration does an > > > unnecessary vacuum. Right now I recommend ANALYZE in every database, > > > but it would be nice

Re: [HACKERS] pg_migrator issues

2010-01-05 Thread Bruce Momjian
Bruce Momjian wrote: > Bruce Momjian wrote: > > pg_migrator has become more popular recently, so it seems time to look > > at some enhancements that would improve pg_migrator. None of these are > > required, but rather changes that would be nice to have: > > > > 1) Right now pg_migrator preserve

Re: [HACKERS] ecpg compile error

2010-01-05 Thread Bruce Momjian
Bruce Momjian wrote: > I am seeing a compile failure in current CVS because my operating > system, BSD/OS, does not have inttypes.h: > > ccache gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith > -fno-strict-aliasing -O1 -Wall -Wmissing-prototypes > -Wmissing-declarations -Wpoin

Re: [HACKERS] xpath improvement suggestion

2010-01-05 Thread Robert Haas
On Tue, Jan 5, 2010 at 6:09 PM, Arie Bikker wrote: > Hi all, > > Well I had  to burn some midnight oil trying to figure out why a construct > like > SELECT xpath('name()',''); > doesn't give the expected result. Kept getting an empty array: >  xpath > - > {} > instead of the expected "

[HACKERS] ecpg compile error

2010-01-05 Thread Bruce Momjian
I am seeing a compile failure in current CVS because my operating system, BSD/OS, does not have inttypes.h: ccache gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -fno-strict-aliasing -O1 -Wall -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wcast-align -pth

Re: [HACKERS] Streaming replication and non-blocking I/O

2010-01-05 Thread Fujii Masao
On Tue, Jan 5, 2010 at 12:22 AM, Heikki Linnakangas wrote: > I've merged the replication branch with PostgreSQL CVS HEAD now, > including the patch for end-of-backup WAL records I committed earlier > today. See 'replication' branch in my git repository. > > There's also a couple of other small cha

Re: [HACKERS] Streaming replication and postmaster signaling

2010-01-05 Thread Fujii Masao
On Tue, Jan 5, 2010 at 11:29 PM, Alvaro Herrera wrote: > This was probably discussed to death earlier, but: why was it decided to > not simply use a different port for listening for walsender > connections? I believe that using a different port would make the setup of replication messier; look fo

Re: [HACKERS] Streaming replication and postmaster signaling

2010-01-05 Thread Fujii Masao
On Tue, Jan 5, 2010 at 11:07 PM, Heikki Linnakangas wrote: > I think it would be better to utilize the existing array of child > processes in pmsignal.c. Instead of having postmaster peek into > WalSndCtlData, let's add a new state to PMChildFlags, > PM_CHILD_WALSENDER, which is just like PM_CHILD

Re: [HACKERS] Auto-extending table partitions?

2010-01-05 Thread Robert Haas
On Tue, Jan 5, 2010 at 8:00 PM, u235sentinel wrote: > http://www.postgresql.org/docs/8.4/static/ddl-partitioning.html > > Is there a way to automatically extend table partitions?  I'm curious if / > when a table is getting full if there is a way for postgres to create > additional tables. Getting

[HACKERS] Auto-extending table partitions?

2010-01-05 Thread u235sentinel
http://www.postgresql.org/docs/8.4/static/ddl-partitioning.html Is there a way to automatically extend table partitions? I'm curious if / when a table is getting full if there is a way for postgres to create additional tables. Or is it all manual? Thanks :D -- Sent via pgsql-hackers mail

Re: [HACKERS] xpath improvement suggestion

2010-01-05 Thread Scott Bailey
Arie Bikker wrote: Hi all, Well I had to burn some midnight oil trying to figure out why a construct like SELECT xpath('name()',''); doesn't give the expected result. Kept getting an empty array: xpath - {} instead of the expected "{a}" BugID 4294 and the TODO item "better handl

Re: [HACKERS] Status of plperl inter-sp calling

2010-01-05 Thread Tom Lane
Tim Bunce writes: > The only question I have at the moment, before I try implementing this, > is the the need for freeing the plan. When would that be needed? There's probably no strong need to do it at all, unless you are dropping your last reference to the plan. regards

Re: [HACKERS] Status of plperl inter-sp calling

2010-01-05 Thread Tom Lane
Tim Bunce writes: > On Thu, Dec 31, 2009 at 09:47:24AM -0800, David E. Wheeler wrote: >> Definite benefit, there. How does it handle the difference between >> IMMUTABLE | STABLE | VOLATILE, as well as STRICT functions? > It doesn't at the moment. I think IMMUTABLE, STABLE and VOLATILE can be > (d

[HACKERS] xpath improvement suggestion

2010-01-05 Thread Arie Bikker
Hi all, Well I had to burn some midnight oil trying to figure out why a construct like SELECT xpath('name()',''); doesn't give the expected result. Kept getting an empty array: xpath - {} instead of the expected "{a}" BugID 4294 and the TODO item "better handling of XPath data ty

Re: [HACKERS] Status of plperl inter-sp calling

2010-01-05 Thread Tim Bunce
Ok, Plan B... Consider this (hypothetical) example: CREATE OR REPLACE FUNCTION test() ... LANGUAGE plperl AS $$ use SP foo_int => 'foo(int)'; use SP foo_text => 'foo(text)', -cached; foo_int(42); foo_text(42); ... $$ Here the user is importing i

Re: [HACKERS] Somebody has broken autovacuum's abort path

2010-01-05 Thread Simon Riggs
On Tue, 2010-01-05 at 03:09 -0500, Tom Lane wrote: > http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=jaguar&dt=2010-01-05%2004:00:03 > (and the same a couple times before this...) > > Core was generated by `postgres: autovacuum worker process regression >'.

Re: [HACKERS] Writeable CTEs

2010-01-05 Thread Josh Berkus
> I agree with Tom's statement upthread that we should only count the > rows affected by the top-level query. Anything else seems extremely > counter-intuitive. I'm ok with that. I don't think there is any kind of intuitive behavior in this situation, and we just need to pick something and docu

Re: [HACKERS] Writeable CTEs

2010-01-05 Thread Robert Haas
On Tue, Jan 5, 2010 at 4:20 PM, Josh Berkus wrote: > On 1/5/10 9:45 AM, Marko Tiikkaja wrote: >> On 2010-01-05 19:21 +0200, Greg Stark wrote: >>> with t as (delete from foo returning *) >>> select * from t where x=? >>> >>> applications will almost certainly expect the number to match the >>> actu

Re: [HACKERS] Stats for inheritance trees

2010-01-05 Thread Robert Haas
On Tue, Dec 29, 2009 at 9:12 PM, Tom Lane wrote: > Robert Haas writes: >> Yep.  It would also lower the barrier to future innovations of that >> type, which would be a good thing, IMO.  Unfortunately we'd likely >> need to continue to support the existing syntax at least for >> attstattarget, whi

Re: [HACKERS] Status of plperl inter-sp calling

2010-01-05 Thread Tim Bunce
On Tue, Jan 05, 2010 at 01:05:40PM -0800, David E. Wheeler wrote: > On Jan 5, 2010, at 12:59 PM, Tim Bunce wrote: > > > So you're suggesting SP::foo(...) _always_ executes foo(...) via bunch > > of spi_* calls. Umm. I thought performance was a major driving factor. > > Sounds like you're more keen

Re: [HACKERS] true serializability and predicate locking

2010-01-05 Thread Kevin Grittner
Jeff Davis wrote: > Is a full table lock acceptable in the end? If so, then predicate > locking is just optimization, and we should leave it until later. I think that the predicate locking will need to be RAM-based to provide acceptable performance, and that we will need a multi-granularity ap

Re: [HACKERS] Writeable CTEs

2010-01-05 Thread Josh Berkus
On 1/5/10 9:45 AM, Marko Tiikkaja wrote: > On 2010-01-05 19:21 +0200, Greg Stark wrote: >> with t as (delete from foo returning *) >> select * from t where x=? >> >> applications will almost certainly expect the number to match the >> actual number of rows returned and may well misbehave if they do

Re: [HACKERS] Proposal: XML helper functions

2010-01-05 Thread Peter Eisentraut
On tis, 2010-01-05 at 11:50 -0800, Scott Bailey wrote: > > There has been talk about adding something like xpath_string, > > xpath_number, xpath_boolean for fetching xpath expressions that > don't > > return nodesets. I think that would fit your use case. > > The first two sound very much like wh

Re: [HACKERS] true serializability and predicate locking

2010-01-05 Thread Jeff Davis
On Tue, 2010-01-05 at 13:47 -0600, Kevin Grittner wrote: > I will not > spend any significant amount of time looking at the specifics of any > particular optimizations yet, because such premature optimization is > certain to kill the whole project. I'm certainly not trying to derail the project, I

Re: [HACKERS] Status of plperl inter-sp calling

2010-01-05 Thread David E. Wheeler
On Jan 5, 2010, at 12:59 PM, Tim Bunce wrote: > So you're suggesting SP::foo(...) _always_ executes foo(...) via bunch > of spi_* calls. Umm. I thought performance was a major driving factor. > Sounds like you're more keen on syntactic sugar. I'm saying do both. Make the cached version the one th

Re: [HACKERS] pg_migrator issues

2010-01-05 Thread Bruce Momjian
Alvaro Herrera wrote: > Bruce Momjian wrote: > > pg_migrator has become more popular recently, so it seems time to look > > at some enhancements that would improve pg_migrator. None of these are > > required, but rather changes that would be nice to have: > > > > 1) Right now pg_migrator preserv

Re: [HACKERS] Status of plperl inter-sp calling

2010-01-05 Thread Tim Bunce
On Thu, Dec 31, 2009 at 09:47:24AM -0800, David E. Wheeler wrote: > On Dec 30, 2009, at 2:54 PM, Tim Bunce wrote: > > > That much works currently. Behind the scenes, when a stored procedure is > > loaded into plperl the code ref for the perl sub is stored in a cache. > > Effectively just > >$c

Re: [HACKERS] We no longer have a fallback for machines without working int64

2010-01-05 Thread Tom Lane
David Fetter writes: > On Tue, Jan 05, 2010 at 10:47:33AM -0500, Tom Lane wrote: >> As pointed out here >> http://archives.postgresql.org/pgsql-general/2010-01/msg00145.php >> the current zic code doesn't cope gracefully with lack of working >> int64. Considering the trouble we've gone to through

Re: [HACKERS] Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial

2010-01-05 Thread Tom Lane
Andrew Dunstan writes: > Something like: > (my $bkival = $row->{bki_values}) =~ s/"[^"]*"/"xxx"/g; > my $atts = {}; > @{$att...@attnames} = split /\s+/, $bkival; > might work better. I committed Alvaro's suggestion (undef at the bottom), but feel free to clean it up if you like this w

Re: [HACKERS] Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial

2010-01-05 Thread Andrew Dunstan
Tom Lane wrote: I'm not nearly good enough in Perl to be sure about the semantics of this loop. Is it possible that it's changing the global contents of the @$data structure, rather than just hacking a local copy of each row before pushing some values into @fmgr? That's exactly what it do

Re: [HACKERS] Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial

2010-01-05 Thread Tom Lane
Stefan Kaltenbrunner writes: >> What about Alvaro's idea of adding >> $row = undef; >> at the bottom of the loop? That seems marginally less ugly... > not sure I want to argue about the ugliness of perl but that has the > same effect as my patch so either way would do to get spoonbill green aga

Re: [HACKERS] Proposal: XML helper functions

2010-01-05 Thread Scott Bailey
Peter Eisentraut wrote: On tis, 2010-01-05 at 10:14 -0800, Scott Bailey wrote: One of the problem with shredding XML is that it is very kludgy to get a scalar value back from xpath. The xpath function always returns an array of XML. So for example, to extract a numeric value you need to: 1) us

Re: [HACKERS] true serializability and predicate locking

2010-01-05 Thread Kevin Grittner
Jeff Davis wrote: > Clearly one of those transactions should abort, because that will > happen in either serialized order. But I don't see where any lock > is stored, nor how the conflict is detected. That depends on where in the development cycle of this feature you are. I'm anticipating tha

Re: [HACKERS] true serializability and predicate locking

2010-01-05 Thread Robert Haas
On Tue, Jan 5, 2010 at 2:14 PM, Jeff Davis wrote: > I have a question regarding true serializability and predicate locking. > There's some context on the wiki page: > > http://wiki.postgresql.org/wiki/Serializable > > under the heading "Predicate Locking". > > If you have the following DDL: > >  c

Re: [HACKERS] Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial

2010-01-05 Thread Stefan Kaltenbrunner
Tom Lane wrote: Stefan Kaltenbrunner writes: yeah it is probably some strange platform specific issue - however with some help from the IRC channel I came up with the following patch that considerable reduces the memory bloat (but still needs ~55MB max) and allows the build to succeed. What

Re: [HACKERS] Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial

2010-01-05 Thread Garick Hamlin
On Tue, Jan 05, 2010 at 02:02:51PM -0500, Tom Lane wrote: > Stefan Kaltenbrunner writes: > > did that and it seems the problem is in the loop that does: > > > foreach my $row (@$data) > > { > > > # To construct fmgroids.h and fmgrtab.c, we need to inspect some > > # of the individual d

Re: [HACKERS] Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial

2010-01-05 Thread Tom Lane
Garick Hamlin writes: > On Tue, Jan 05, 2010 at 02:02:51PM -0500, Tom Lane wrote: >> I'm not nearly good enough in Perl to be sure about the semantics >> of this loop. Is it possible that it's changing the global contents >> of the @$data structure, rather than just hacking a local copy of >> eac

Re: [HACKERS] Proposal: XML helper functions

2010-01-05 Thread Scott Bailey
Pavel Stehule wrote: 2010/1/5 Scott Bailey : One of the problem with shredding XML is that it is very kludgy to get a scalar value back from xpath. The xpath function always returns an array of XML. So for example, to extract a numeric value you need to: 1) use xpath to get the node 2) get the f

Re: [HACKERS] libpq naming on Win64

2010-01-05 Thread Dave Page
On Tuesday, January 5, 2010, Peter Eisentraut wrote: > On tis, 2010-01-05 at 16:48 +, Dave Page wrote: >> On Tue, Jan 5, 2010 at 3:15 PM, Tom Lane wrote: >> > I would have thought Microsoft would have a better solution than this >> > for managing 64-bit libraries.  Or am I too optimistic abou

Re: [HACKERS] Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial

2010-01-05 Thread Tom Lane
Stefan Kaltenbrunner writes: > yeah it is probably some strange platform specific issue - however with > some help from the IRC channel I came up with the following patch that > considerable reduces the memory bloat (but still needs ~55MB max) and > allows the build to succeed. What about Alvar

Re: [HACKERS] Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial

2010-01-05 Thread Stefan Kaltenbrunner
Tom Lane wrote: Stefan Kaltenbrunner writes: did that and it seems the problem is in the loop that does: foreach my $row (@$data) { # To construct fmgroids.h and fmgrtab.c, we need to inspect some # of the individual data fields. Just splitting on whitespace Huh. It's weird

Re: [HACKERS] libpq naming on Win64

2010-01-05 Thread Peter Eisentraut
On tis, 2010-01-05 at 16:48 +, Dave Page wrote: > On Tue, Jan 5, 2010 at 3:15 PM, Tom Lane wrote: > > I would have thought Microsoft would have a better solution than this > > for managing 64-bit libraries. Or am I too optimistic about Redmond's > > competence? > > They have two separate ins

Re: [HACKERS] Proposal: XML helper functions

2010-01-05 Thread Peter Eisentraut
On tis, 2010-01-05 at 10:14 -0800, Scott Bailey wrote: > One of the problem with shredding XML is that it is very kludgy to get a > scalar value back from xpath. The xpath function always returns an array > of XML. So for example, to extract a numeric value you need to: > 1) use xpath to get the

[HACKERS] true serializability and predicate locking

2010-01-05 Thread Jeff Davis
I have a question regarding true serializability and predicate locking. There's some context on the wiki page: http://wiki.postgresql.org/wiki/Serializable under the heading "Predicate Locking". If you have the following DDL: create table mytable(mycircle circle); create index mytable_myci

Re: [HACKERS] Proposal: XML helper functions

2010-01-05 Thread Scott Bailey
Merlin Moncure wrote: On Tue, Jan 5, 2010 at 1:14 PM, Scott Bailey wrote: One of the problem with shredding XML is that it is very kludgy to get a scalar value back from xpath. The xpath function always returns an array of XML. So for example, to extract a numeric value you need to: 1) use xpat

Re: [HACKERS] Testing with concurrent sessions

2010-01-05 Thread Markus Wanner
Hi, Kevin Grittner wrote: Where would I find this (and any related documentation)? Sorry, if that didn't get clear. I'm trying to put together something I can release real soon now (tm). I'll keep you informed. Regards Markus Wanner -- Sent via pgsql-hackers mailing list (pgsql-hackers@p

Re: [HACKERS] Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial

2010-01-05 Thread Alvaro Herrera
Stefan Kaltenbrunner escribió: > foreach my $row (@$data) > { > > # To construct fmgroids.h and fmgrtab.c, we need to inspect some > # of the individual data fields. Just splitting on whitespace > # won't work, because some quoted fields might contain internal > # whitespace. We

Re: [HACKERS] Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial

2010-01-05 Thread Tom Lane
Stefan Kaltenbrunner writes: > did that and it seems the problem is in the loop that does: > foreach my $row (@$data) > { > # To construct fmgroids.h and fmgrtab.c, we need to inspect some > # of the individual data fields. Just splitting on whitespace Huh. It's weird that I don't s

Re: [HACKERS] New VACUUM FULL

2010-01-05 Thread Simon Riggs
On Mon, 2010-01-04 at 08:04 +, Simon Riggs wrote: > I would prefer this slightly modified version > > 1. Commit your patch, as-is (you/me) I assume this is OK with you now? -- Simon Riggs www.2ndQuadrant.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org

Re: [HACKERS] Somebody has broken autovacuum's abort path

2010-01-05 Thread Simon Riggs
On Tue, 2010-01-05 at 03:09 -0500, Tom Lane wrote: > I think this can likely be blamed on the HS changes in transaction > abort, since I'm not aware of any other recent changes near here. I'll take a look. -- Simon Riggs www.2ndQuadrant.com -- Sent via pgsql-hackers mailing list (

Re: [HACKERS] Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial

2010-01-05 Thread Stefan Kaltenbrunner
Tom Lane wrote: Robert Haas writes: Beats me. I don't have any other ideas at the moment. Stefan, could you try adding some debugging printouts to the Gen_fmgrtab.pl script to see how far it gets before blowing up? did that and it seems the problem is in the loop that does: foreach my $ro

Re: [HACKERS] Writeable CTEs

2010-01-05 Thread Tom Lane
Marko Tiikkaja writes: > => with t as (delete from foo returning *) > -> insert into bar > -> select * from t; > INSERT 0 2 > It correctly reports 2 affected rows (one deleted and one inserted), but > is this the answer we want? No. The returned tag should consider only the top-level operation

Re: [HACKERS] Proposal: XML helper functions

2010-01-05 Thread Pavel Stehule
2010/1/5 Scott Bailey : > One of the problem with shredding XML is that it is very kludgy to get a > scalar value back from xpath. The xpath function always returns an array of > XML. So for example, to extract a numeric value you need to: > 1) use xpath to get the node > 2) get the first element o

Re: [HACKERS] Proposal: XML helper functions

2010-01-05 Thread Merlin Moncure
On Tue, Jan 5, 2010 at 1:14 PM, Scott Bailey wrote: > One of the problem with shredding XML is that it is very kludgy to get a > scalar value back from xpath. The xpath function always returns an array of > XML. So for example, to extract a numeric value you need to: > 1) use xpath to get the node

Re: [HACKERS] Stats for inheritance trees

2010-01-05 Thread Robert Haas
On Tue, Jan 5, 2010 at 1:20 PM, Tom Lane wrote: > Robert Haas writes: >> It's probably also worth noting that the reason I used DISTINCT >> originally is because it's already a keyword. > > True. > > It occurs to me that the pg_stats view already exposes "n_distinct" > as a column name.  I wouldn

Re: [HACKERS] Stats for inheritance trees

2010-01-05 Thread Tom Lane
Robert Haas writes: > It's probably also worth noting that the reason I used DISTINCT > originally is because it's already a keyword. True. It occurs to me that the pg_stats view already exposes "n_distinct" as a column name. I wouldn't object to using "n_distinct" and "n_distinct_inherited" or

Re: [HACKERS] Stats for inheritance trees

2010-01-05 Thread Robert Haas
On Tue, Jan 5, 2010 at 1:09 PM, Robert Haas wrote: > On Tue, Jan 5, 2010 at 1:00 PM, Tom Lane wrote: >> Robert Haas writes: >>> Another option would be to call it "inherits_ndistinct", or something >>> like that, which seems a little more readable, but not great: I don't >>> think there's going

Re: [HACKERS] Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial

2010-01-05 Thread Tom Lane
Robert Haas writes: > Beats me. I don't have any other ideas at the moment. Stefan, could you try adding some debugging printouts to the Gen_fmgrtab.pl script to see how far it gets before blowing up? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hack

[HACKERS] Proposal: XML helper functions

2010-01-05 Thread Scott Bailey
One of the problem with shredding XML is that it is very kludgy to get a scalar value back from xpath. The xpath function always returns an array of XML. So for example, to extract a numeric value you need to: 1) use xpath to get the node 2) get the first element of the XML array 3) cast that to

Re: [HACKERS] Stats for inheritance trees

2010-01-05 Thread Robert Haas
On Tue, Jan 5, 2010 at 1:00 PM, Tom Lane wrote: > Robert Haas writes: >> Another option would be to call it "inherits_ndistinct", or something >> like that, which seems a little more readable, but not great: I don't >> think there's going to be any getting around the need to RTFM before >> settin

Re: [HACKERS] Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial

2010-01-05 Thread Robert Haas
On Tue, Jan 5, 2010 at 12:51 PM, Tom Lane wrote: > Robert Haas writes: >> Is there by any chance some other, conflicting Catalog.pm on that machine? > > Even if there is, shouldn't the use of "perl -I" ensure our version gets > loaded? I would certainly think so. > Also, Stefan's log shows that

Re: [HACKERS] Stats for inheritance trees

2010-01-05 Thread Tom Lane
Robert Haas writes: > Another option would be to call it "inherits_ndistinct", or something > like that, which seems a little more readable, but not great: I don't > think there's going to be any getting around the need to RTFM before > setting these parameters. Well, the previously agreed-to syn

Re: [HACKERS] Stats for inheritance trees

2010-01-05 Thread Robert Haas
On Tue, Dec 29, 2009 at 9:12 PM, Tom Lane wrote: > Robert Haas writes: >> Yep.  It would also lower the barrier to future innovations of that >> type, which would be a good thing, IMO.  Unfortunately we'd likely >> need to continue to support the existing syntax at least for >> attstattarget, whi

Re: [HACKERS] Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial

2010-01-05 Thread Tom Lane
Robert Haas writes: > Is there by any chance some other, conflicting Catalog.pm on that machine? Even if there is, shouldn't the use of "perl -I" ensure our version gets loaded? Also, Stefan's log shows that it got through genbki.pl, so whatever the problem is, I don't think it's Catalog.pm's fa

Re: [HACKERS] Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial

2010-01-05 Thread Stefan Kaltenbrunner
Robert Haas wrote: On Tue, Jan 5, 2010 at 12:24 PM, Stefan Kaltenbrunner wrote: Tom Lane wrote: Log Message: --- Get rid of the need for manual maintenance of the initial contents of pg_attribute, by having genbki.pl derive the information from the various catalog header files. This g

Re: [HACKERS] Writeable CTEs

2010-01-05 Thread Marko Tiikkaja
On 2010-01-05 19:21 +0200, Greg Stark wrote: with t as (delete from foo returning *) select * from t where x=? applications will almost certainly expect the number to match the actual number of rows returned and may well misbehave if they don't. I probably wasn't clear about the actual problem

Re: [HACKERS] Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial

2010-01-05 Thread Robert Haas
On Tue, Jan 5, 2010 at 12:24 PM, Stefan Kaltenbrunner wrote: > Tom Lane wrote: >> >> Log Message: >> --- >> Get rid of the need for manual maintenance of the initial contents of >> pg_attribute, by having genbki.pl derive the information from the various >> catalog header files.  This grea

Re: [HACKERS] [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial

2010-01-05 Thread Tom Lane
Stefan Kaltenbrunner writes: > this broke the build on spoonbill: > http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=spoonbill&dt=2010-01-05%2015:05:08 > manually executing the command shows that the perl process eats more > than 250MB of RAM at closely afterwards fails with an out of mem

Re: [HACKERS] Writeable CTEs

2010-01-05 Thread David Fetter
On Tue, Jan 05, 2010 at 05:21:12PM +, Greg Stark wrote: > On Tue, Jan 5, 2010 at 4:42 PM, Marko Tiikkaja > wrote: > > => with t as (delete from foo returning *) > > -> insert into bar > > -> select * from t; > > INSERT 0 2 > > > > It correctly reports 2 affected rows (one deleted and one > > i

[HACKERS] Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial

2010-01-05 Thread Stefan Kaltenbrunner
Tom Lane wrote: Log Message: --- Get rid of the need for manual maintenance of the initial contents of pg_attribute, by having genbki.pl derive the information from the various catalog header files. This greatly simplifies modification of the "bootstrapped" catalogs. This patch finally

Re: [HACKERS] Writeable CTEs

2010-01-05 Thread Greg Stark
On Tue, Jan 5, 2010 at 4:42 PM, Marko Tiikkaja wrote: > => with t as (delete from foo returning *) > -> insert into bar > -> select * from t; > INSERT 0 2 > > It correctly reports 2 affected rows (one deleted and one inserted), but is > this the answer we want?  It doesn't seem all that useful to

Re: [HACKERS] libpq naming on Win64

2010-01-05 Thread Dave Page
On Tue, Jan 5, 2010 at 3:15 PM, Tom Lane wrote: > Dave Page writes: >> After chatting with Magnus, we feel that a good solution would be to >> rename libpq on Win64 to libpq64.dll to distinguish it from the 32 bit >> equivalent. > > Isn't that going to break applications?  Where by "break" I mean

Re: [HACKERS] ECPG SQLDA support

2010-01-05 Thread Michael Meskes
On Mon, Jan 04, 2010 at 02:32:56PM -0500, Tom Lane wrote: > I think checking SIZEOF_LONG would be preferred, since that's what > we use elsewhere. Although actually I wonder why this code exists > at all --- wouldn't it be easier to make these depend on "int64"? It does use int64. However, ecpg u

Re: [HACKERS] ECPG SQLDA support

2010-01-05 Thread Michael Meskes
On Mon, Jan 04, 2010 at 07:39:14PM +0100, Boszormenyi Zoltan wrote: > new patch attached. > ... Great job Zoltan, committed. > The sqlda.h header switches between the two different > structures depending on a new #define introduced in > and added to the generated C source by the preprocessor I c

Re: [HACKERS] Testing with concurrent sessions

2010-01-05 Thread Kevin Grittner
Markus Wanner wrote: > Kevin Grittner wrote: >> It's very soon going to be critical that I be able to test >> particular interleavings of statements in particular concurrent >> transaction sets to be able to make meaningful progress on the >> serializable transaction work. > > I've something in

Re: [HACKERS] krb_server_keyfile setting doesn't work on Windows

2010-01-05 Thread Hiroshi Inoue
Magnus Hagander wrote: On Thu, Dec 31, 2009 at 00:57, Magnus Hagander wrote: 2009/12/31 Hiroshi Inoue : Magnus Hagander wrote: 2009/12/30 Hiroshi Inoue : Hi, As far as I tested, the krb_server_keyfile setting in postgres.conf doesn't work on Windows. Because gssapi32.dll(krb5_32.dll) seems

Re: [HACKERS] pg_migrator issues

2010-01-05 Thread Bruce Momjian
Tom Lane wrote: > Robert Haas writes: > > On Tue, Jan 5, 2010 at 11:06 AM, Alvaro Herrera > > wrote: > >> Tom Lane wrote: > >>> Good point. ?Using catversion for the purpose seems a bit ugly but > >>> I have no better ideas. > >> > >> I thought we had rejected the idea of being able to migrate b

Re: [HACKERS] We no longer have a fallback for machines without working int64

2010-01-05 Thread David Fetter
On Tue, Jan 05, 2010 at 10:47:33AM -0500, Tom Lane wrote: > As pointed out here > http://archives.postgresql.org/pgsql-general/2010-01/msg00145.php > the current zic code doesn't cope gracefully with lack of working > int64. Considering the trouble we've gone to throughout the rest of > the system

Re: [HACKERS] pg_migrator issues

2010-01-05 Thread Tom Lane
Robert Haas writes: > On Tue, Jan 5, 2010 at 11:06 AM, Alvaro Herrera > wrote: >> Tom Lane wrote: >>> Good point.  Using catversion for the purpose seems a bit ugly but >>> I have no better ideas. >> >> I thought we had rejected the idea of being able to migrate between >> alphas.  Is migrating

Re: [HACKERS] pg_migrator issues

2010-01-05 Thread Robert Haas
On Tue, Jan 5, 2010 at 11:06 AM, Alvaro Herrera wrote: > Tom Lane wrote: >> Bruce Momjian writes: >> > I liked the idea, but I listed it as item #2 and no one else said they >> > liked it.  The only complexity I can see with the idea is that doing an >> > upgrade from one alpha to another would h

Re: [HACKERS] pg_migrator issues

2010-01-05 Thread Alvaro Herrera
Tom Lane wrote: > Bruce Momjian writes: > > I liked the idea, but I listed it as item #2 and no one else said they > > liked it. The only complexity I can see with the idea is that doing an > > upgrade from one alpha to another would have the same major version > > number and would therefore not

Re: I: [HACKERS] TODO: Allow substring/replace() to get/set bit values

2010-01-05 Thread Robert Haas
On Tue, Jan 5, 2010 at 10:45 AM, Leonardo F wrote: >> As you say, there's really no point in changing the internal >> representation, and if you don't find replace() useful either, then >> why are you even working on this at all? > > I would like a get_bit / set_bit for bit strings, as I find them

Re: [HACKERS] We no longer have a fallback for machines without working int64

2010-01-05 Thread Alvaro Herrera
Tom Lane wrote: > As pointed out here > http://archives.postgresql.org/pgsql-general/2010-01/msg00145.php > the current zic code doesn't cope gracefully with lack of working > int64. Considering the trouble we've gone to throughout the rest > of the system to support such compilers, it's a bit ann

Re: [HACKERS] pg_migrator issues

2010-01-05 Thread Tom Lane
Bruce Momjian writes: > I liked the idea, but I listed it as item #2 and no one else said they > liked it. The only complexity I can see with the idea is that doing an > upgrade from one alpha to another would have the same major version > number and would therefore not be possible, so maybe we h

[HACKERS] We no longer have a fallback for machines without working int64

2010-01-05 Thread Tom Lane
As pointed out here http://archives.postgresql.org/pgsql-general/2010-01/msg00145.php the current zic code doesn't cope gracefully with lack of working int64. Considering the trouble we've gone to throughout the rest of the system to support such compilers, it's a bit annoying to have this little

Re: I: [HACKERS] TODO: Allow substring/replace() to get/set bit values

2010-01-05 Thread Leonardo F
> As you say, there's really no point in changing the internal > representation, and if you don't find replace() useful either, then > why are you even working on this at all? I would like a get_bit / set_bit for bit strings, as I find them useful. get_bit could be a simple call to substring, bu

Re: [HACKERS] Does parallel make require guards against duplicate actions?

2010-01-05 Thread Tom Lane
Peter Eisentraut writes: > On mån, 2010-01-04 at 21:58 -0500, Tom Lane wrote: >> The new implementation uses temp files that just have ".tmp" appended to >> the target file name. If there is a risk that "make -j" will run the >> same action twice in parallel, this isn't good enough. While it >>

Re: [HACKERS] Re: [COMMITTERS] pgsql: Remove too-smart-for-its-own-good optimization of not overwriting

2010-01-05 Thread Peter Eisentraut
On mån, 2010-01-04 at 22:54 -0500, Robert Haas wrote: > I think you're dismissing the idea too cavalierly. If A generates B, > A is inevitably changed frequently, but the changes to A affect B only > rarely, this is a good trick. If that is the case, you might want to consider splitting up A or

Re: [HACKERS] execute sql commands in core

2010-01-05 Thread Tom Lane
Robert Haas writes: > On Tue, Jan 5, 2010 at 12:56 AM, black light wrote: >> In fact, i want to add a table to system catalog and SELECT/UPDATE it from >> auth.c. > If you are considering proposing your patch for inclusion in the > PostgreSQL upstream sources, you should first discuss why you ar

Re: [HACKERS] pg_migrator issues

2010-01-05 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Alvaro Herrera wrote: > >> I thought it was impossible to use bare mountpoints as tablespaces due > >> to ownership problems ... Is that not the case? -1 for special hacks > >> that work around bogus setups, if that means intrusive changes to the > >> c

Re: [HACKERS] Does parallel make require guards against duplicate actions?

2010-01-05 Thread Peter Eisentraut
On mån, 2010-01-04 at 21:58 -0500, Tom Lane wrote: > The old Gen_fmgrtab.sh script used temporary file names that included > its process PID. It had this comment about that: > > # We use the temporary files to avoid problems with concurrent runs > # (which can happen during parallel make). > > T

Re: [HACKERS] patch - per-tablespace random_page_cost/seq_page_cost

2010-01-05 Thread Robert Haas
On Mon, Jan 4, 2010 at 1:48 PM, Tom Lane wrote: > Robert Haas writes: >> My only objection to that is that if we're going to add attoptions >> also, I'd like to get this committed first before I start working on >> that, and we're running short on time.  If you can commit his patch in >> the next

Re: [HACKERS] libpq naming on Win64

2010-01-05 Thread Tom Lane
Dave Page writes: > After chatting with Magnus, we feel that a good solution would be to > rename libpq on Win64 to libpq64.dll to distinguish it from the 32 bit > equivalent. Isn't that going to break applications? Where by "break" I mean "have to explicitly link with 'libpq64', thereby renderi

  1   2   >