Re: [HACKERS] pre-MED

2008-10-29 Thread Joshua D. Drake
Tom Lane wrote: Hannu Krosing <[EMAIL PROTECTED]> writes: On Wed, 2008-10-29 at 09:40 -0700, David Fetter wrote: Also, PL/Perl shouldn't be the only language to have this capability. How might we add similar capabilities to PL/PythonU I'll look at adding this to pl/pythonu. I would argue

Re: [HACKERS] WIP patch: convert SQL-language functions to return tuplestores

2008-10-29 Thread Pavel Stehule
2008/10/30 Robert Haas <[EMAIL PROTECTED]>: >> All of this is pie-in-the-sky for PL functions, and I think properly so: >> the whole reason for supporting PLs is to enable doing things that SQL >> does poorly or not at all. So expecting SQL to interoperate very >> closely with them seems impossibl

Re: [HACKERS] pre-MED

2008-10-29 Thread David Fetter
On Wed, Oct 29, 2008 at 10:23:36PM -0400, Tom Lane wrote: > Hannu Krosing <[EMAIL PROTECTED]> writes: > > On Wed, 2008-10-29 at 09:40 -0700, David Fetter wrote: > >> Also, PL/Perl shouldn't be the only language to have this > >> capability. How might we add similar capabilities to PL/PythonU > >

Re: [HACKERS] recovery_target_time and last completed transaction log time

2008-10-29 Thread Tom Lane
"Kevin Grittner" <[EMAIL PROTECTED]> writes: > Regarding the LOG message, it is confusing to have a recovery.conf > file which contains this: > recovery_target_time = '2008-10-16 17:00:00.0' > and see this in the log: > [2008-10-16 23:04:26.006 CDT] 19951 LOG: last completed transaction > was at l

Re: [HACKERS] Please make sure your patches are on the wiki page

2008-10-29 Thread Josh Berkus
On Wednesday 29 October 2008 20:12, Tom Lane wrote: > Earlier today I had a different thought about how to sort things early > in the fest.  I think that there is a strong temptation to finish off > the "simple" patches quickly so as to reduce the size of the list --- > I know I've done that and I

Re: [HACKERS] pre-MED

2008-10-29 Thread Tom Lane
"David Blewett" <[EMAIL PROTECTED]> writes: > Here's a vote for allowing this in plain SQL. > I use the tablefunc contrib module as a way to build a view of a > specific questionnaire's responses (using Elein's nice model here > [1]). Currently, if I then write queries against these views that > i

Re: [HACKERS] minimal update

2008-10-29 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > I think I like this best of all the suggestions - > suppress_redundant_updates_trigger() is what I have now. > If there's no further discussion, I'll go ahead and commit this in a day > or two. The documentation seems a bit lacking: it gives neither

Re: [HACKERS] Please make sure your patches are on the wiki page

2008-10-29 Thread Tom Lane
Josh Berkus <[EMAIL PROTECTED]> writes: >> (2) sorting the pending patches by complexity or subject matter > Sorting them by complexity would be great, if I thought I could do it. I'm > not sure I can. We organized them by subject matter (or code area, really) in a couple of the earlier fests.

Re: [HACKERS] Updates of SE-PostgreSQL 8.4devel patches (r1155)

2008-10-29 Thread KaiGai Kohei
Simon Riggs wrote: On Wed, 2008-10-29 at 17:42 +0900, KaiGai Kohei wrote: I've updated my patches, these are ready for CommitFest:Nov. [1/6] http://sepgsql.googlecode.com/files/sepostgresql-sepgsql-8.4devel-3-r1155.patch [2/6] http://sepgsql.googlecode.com/files/sepostgresql-pg_dump-8.4devel

Re: [HACKERS] minimal update

2008-10-29 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: >> Not sure that's appropriate, but I can't see anything else that is >> very appropriate either. > The plpgsql code uses errcode(ERRCODE_FEATURE_NOT_SUPPORTED) for this > situation, so I guess we should be consistent with that. TRIGGERED_DATA_CHANGE_V

Re: [HACKERS] Please make sure your patches are on the wiki page

2008-10-29 Thread Josh Berkus
Robert, > (1) moving all of the patches committed prior to 11/1 to a separate > section or page Why? > (2) sorting the pending patches by complexity or subject matter Sorting them by complexity would be great, if I thought I could do it. I'm not sure I can. -- Josh Berkus PostgreSQL San Fra

Re: [HACKERS] pre-MED

2008-10-29 Thread Tom Lane
Hannu Krosing <[EMAIL PROTECTED]> writes: > On Wed, 2008-10-29 at 09:40 -0700, David Fetter wrote: >> Also, PL/Perl shouldn't be the only language to have this capability. >> How might we add similar capabilities to PL/PythonU > I'll look at adding this to pl/pythonu. I would argue that it's alr

Re: [HACKERS] BufferAccessStrategy for bulk insert

2008-10-29 Thread Simon Riggs
On Wed, 2008-10-29 at 21:58 -0400, Robert Haas wrote: > > If you say its a loss you should publish timings to support that. Using > > a BAS for VACUUM was a performance gain, not a loss. > > Well, I can dig up and publish the timings from my laptop, but I'm not > sure where that will get us. Tru

Re: [HACKERS] Please make sure your patches are on the wiki page

2008-10-29 Thread Robert Haas
I wonder if we should consider: (1) moving all of the patches committed prior to 11/1 to a separate section or page (2) sorting the pending patches by complexity or subject matter ...Robert On Wed, Oct 29, 2008 at 5:26 PM, Josh Berkus <[EMAIL PROTECTED]> wrote: > Patch submitters, > > Please mak

Re: [HACKERS] BufferAccessStrategy for bulk insert

2008-10-29 Thread Robert Haas
> If you say its a loss you should publish timings to support that. Using > a BAS for VACUUM was a performance gain, not a loss. Well, I can dig up and publish the timings from my laptop, but I'm not sure where that will get us. Trust me, the numbers were higher with BAS, otherwise I wouldn't be

Re: [HACKERS] Proposal of PITR performance improvement for 8.4.

2008-10-29 Thread Simon Riggs
On Thu, 2008-10-30 at 09:46 +0900, Koichi Suzuki wrote: > I'm not sure if blocks reffered from all WAL records in single WAL > segment can fit kernel cache. This is why current pg_readahead > returns the last LSN and require starting LSN. So far, with FPW, it > seems that we can prefetch all

Re: [HACKERS] Proposal of PITR performance improvement for 8.4.

2008-10-29 Thread Koichi Suzuki
Hi, 2008/10/29 Simon Riggs <[EMAIL PROTECTED]>: > > On Tue, 2008-10-28 at 14:21 +0200, Heikki Linnakangas wrote: > >> 1. You should avoid useless posix_fadvise() calls. In the naive >> implementation, where you simply call posix_fadvise() for every page >> referenced in every WAL record, you'll d

Re: [HACKERS] Proposal of PITR performance improvement for 8.4.

2008-10-29 Thread Koichi Suzuki
I'm not sure if blocks reffered from all WAL records in single WAL segment can fit kernel cache. This is why current pg_readahead returns the last LSN and require starting LSN. So far, with FPW, it seems that we can prefetch all the pages in a WAL segment. So it will be okay for archive log c

Re: [HACKERS] WIP patch: convert SQL-language functions to return tuplestores

2008-10-29 Thread Robert Haas
> All of this is pie-in-the-sky for PL functions, and I think properly so: > the whole reason for supporting PLs is to enable doing things that SQL > does poorly or not at all. So expecting SQL to interoperate very > closely with them seems impossible, or at least unreasonably limiting. > The real

[HACKERS] Please make sure your patches are on the wiki page

2008-10-29 Thread Josh Berkus
Patch submitters, Please make sure your patches are on the November CommitFest wiki page, with correct and updated links. http://wiki.postgresql.org/wiki/CommitFest_2008-11 -- Josh Berkus PostgreSQL San Francisco -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make c

Re: [HACKERS] pre-MED

2008-10-29 Thread Hannu Krosing
On Wed, 2008-10-29 at 10:33 -0700, Joshua D. Drake wrote: > On Wed, 2008-10-29 at 19:17 +0200, Hannu Krosing wrote: > > On Wed, 2008-10-29 at 09:40 -0700, David Fetter wrote: > > > Folks, > > > > > > Please find enclosed a WIP patch to add the ability for functions to > > > see the qualifiers of t

Re: [HACKERS] BufferAccessStrategy for bulk insert

2008-10-29 Thread Simon Riggs
On Tue, 2008-10-28 at 23:45 -0400, Robert Haas wrote: > One concern that I have about this approach is that the situation in > which people are probably most concerned about COPY performance is > restoring a dump. In that case, the COPY will be the only thing > running, and using a BufferAccessS

Re: [HACKERS] Block-level CRC checks

2008-10-29 Thread Alvaro Herrera
Alvaro Herrera wrote: > 3. the bgwriter is seen writing WAL entries at checkpoint. At shutdown, > this might cause an error to be reported on how there was not supposed > to be activity on the log. I didn't save the exact error report and I > can't find it in the source :-( LOG: received fast

Re: [HACKERS] PostgreSQL network discovery

2008-10-29 Thread Tom Lane
"Gevik Babakhani" <[EMAIL PROTECTED]> writes: > I asked this question because I have a situation where a service like this > would be very useful. If such a functionality would be accepted by the core > team, I am willing to work on it. The existing code uses APIs that Apple has deprecated, so it'

Re: [HACKERS] minimal update

2008-10-29 Thread Andrew Dunstan
Andrew Dunstan wrote: David Fetter wrote: Maybe we should fix our C sample trigger, from which this was taken. Yes :) Does the attached have the right error code? -elog(ERROR, "trigf: not called by trigger manager"); +ereport(ERROR, +(error(TRIGGERED

Re: [HACKERS] Updates of SE-PostgreSQL 8.4devel patches (r1155)

2008-10-29 Thread Simon Riggs
On Wed, 2008-10-29 at 17:42 +0900, KaiGai Kohei wrote: > I've updated my patches, these are ready for CommitFest:Nov. > > [1/6] > http://sepgsql.googlecode.com/files/sepostgresql-sepgsql-8.4devel-3-r1155.patch > [2/6] > http://sepgsql.googlecode.com/files/sepostgresql-pg_dump-8.4devel-3-r1155.

Re: [HACKERS] minimal update

2008-10-29 Thread Andrew Dunstan
David Fetter wrote: Maybe we should fix our C sample trigger, from which this was taken. Yes :) Does the attached have the right error code? -elog(ERROR, "trigf: not called by trigger manager"); +ereport(ERROR, +(error(TRIGGERED_DATA_CHANGE_VIOLATION),

Re: [HACKERS] minimal update

2008-10-29 Thread David Fetter
On Wed, Oct 29, 2008 at 03:48:09PM -0400, Andrew Dunstan wrote: > >>> + /* make sure it's called as a trigger */ >>> + if (!CALLED_AS_TRIGGER(fcinfo)) >>> + elog(ERROR, "suppress_redundant_updates_trigger: must be called >>> as trigger"); >> >> Shouldn't these all be ereport()? > >

Re: [HACKERS] PostgreSQL network discovery

2008-10-29 Thread Gevik Babakhani
I asked this question because I have a situation where a service like this would be very useful. If such a functionality would be accepted by the core team, I am willing to work on it. > -Original Message- > From: Alvaro Herrera [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 29, 200

Re: [HACKERS] PostgreSQL network discovery

2008-10-29 Thread Gevik Babakhani
If I am not mistaken, it only works fine on OSX environments. (I might be very wrong here) > -Original Message- > From: Magnus Hagander [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 29, 2008 8:47 PM > To: Gevik Babakhani > Cc: 'PGSQL Hackers' > Subject: Re: [HACKERS] PostgreSQL ne

Re: [HACKERS] Block-level CRC checks

2008-10-29 Thread Alvaro Herrera
Alvaro Herrera wrote: > There are some gotchas in this patch: > > 1. it does not consider hint bits other than the ones defined in htup.h. > Some index AMs use hint bits to "kill" tuples (LP_DEAD mostly, I think). > This means that CRCs will be broken for such pages when pages are torn. The "oth

Re: [HACKERS] PostgreSQL network discovery

2008-10-29 Thread Alvaro Herrera
Gevik Babakhani wrote: > Hi, > > There is a nice little feature within MSSQL where it is possible to > enumerate all MSSQL servers on the local network. > I wonder how this can be made possible with PG. Pinging every IP:PGPORT > within the current subnet is one of the options but I guess that wou

Re: [HACKERS] minimal update

2008-10-29 Thread Andrew Dunstan
Alvaro Herrera wrote: Andrew Dunstan escribió: + /* make sure it's called as a trigger */ + if (!CALLED_AS_TRIGGER(fcinfo)) + elog(ERROR, "suppress_redundant_updates_trigger: must be called as trigger"); Shouldn't these all be ereport()? Good point. I'll fix

Re: [HACKERS] PostgreSQL network discovery

2008-10-29 Thread Magnus Hagander
Gevik Babakhani wrote: > Hi, > > There is a nice little feature within MSSQL where it is possible to > enumerate all MSSQL servers on the local network. > I wonder how this can be made possible with PG. Pinging every IP:PGPORT > within the current subnet is one of the options but I guess that wou

[HACKERS] PostgreSQL network discovery

2008-10-29 Thread Gevik Babakhani
Hi, There is a nice little feature within MSSQL where it is possible to enumerate all MSSQL servers on the local network. I wonder how this can be made possible with PG. Pinging every IP:PGPORT within the current subnet is one of the options but I guess that would be just a bad solution. Any tho

Re: [HACKERS] minimal update

2008-10-29 Thread Alvaro Herrera
Andrew Dunstan escribió: > + /* make sure it's called as a trigger */ > + if (!CALLED_AS_TRIGGER(fcinfo)) > + elog(ERROR, "suppress_redundant_updates_trigger: must be called as > trigger"); Shouldn't these all be ereport()? -- Alvaro Herrerahttp:

Re: [HACKERS] autovacuum: I need some explanation

2008-10-29 Thread Noah Freire
Hi Alvaro, On Wed, Oct 29, 2008 at 3:46 PM, Alvaro Herrera <[EMAIL PROTECTED]>wrote: > Noah Freire escribió: > > > please check the first log message: the vacuum threshold is 6,000,050 > rows > > and the number of dead tuples is 16,697,969. Even though the number of > > dead_tuples is greater than

Re: [HACKERS] minimal update

2008-10-29 Thread Magnus Hagander
Andrew Dunstan wrote: > > > Kenneth Marshall wrote: >> On Wed, Oct 22, 2008 at 06:05:26PM -0400, Tom Lane wrote: >> >>> Simon Riggs <[EMAIL PROTECTED]> writes: >>> > On Wed, Oct 22, 2008 at 3:24 PM, Tom Lane <[EMAIL PROTECTED]> wrote: > >> "Minimal" really fails to conve

Re: [HACKERS] autovacuum: I need some explanation

2008-10-29 Thread Alvaro Herrera
Noah Freire escribió: > datid | datname | procpid | usesysid | usename | current_query | waiting | > xact_start | query_start | backend_start | client_addr | client_port > ---+-+-+--+--+-+-

Re: [HACKERS] minimal update

2008-10-29 Thread Andrew Dunstan
Kenneth Marshall wrote: On Wed, Oct 22, 2008 at 06:05:26PM -0400, Tom Lane wrote: Simon Riggs <[EMAIL PROTECTED]> writes: On Wed, Oct 22, 2008 at 3:24 PM, Tom Lane <[EMAIL PROTECTED]> wrote: "Minimal" really fails to convey the point here IMHO. How about something like "sup

Re: [HACKERS] Block-level CRC checks

2008-10-29 Thread Alvaro Herrera
Alvaro Herrera wrote: > So this is what I ended up doing; attached. Oh, another thing. The contents for the WAL log message here is very simplistic; just store all the t_infomask and t_infomask2 relevant bits, for all the tuples in the table. A possible optimization to reduce the WAL traffic is

Re: [HACKERS] autovacuum: I need some explanation

2008-10-29 Thread Alvaro Herrera
Noah Freire escribió: > please check the first log message: the vacuum threshold is 6,000,050 rows > and the number of dead tuples is 16,697,969. Even though the number of > dead_tuples is greater than the threshold the autovacuum is not being > triggered for this table. So, besides this condition

Re: [HACKERS] pre-MED

2008-10-29 Thread David Blewett
On Wed, Oct 29, 2008 at 12:40 PM, David Fetter <[EMAIL PROTECTED]> wrote: > Also, PL/Perl shouldn't be the only language to have this capability. > How might we add similar capabilities to PL/PythonU and PL/Tcl? To > the rest of the PLs? Would it make any sense to have it in SQL > language functi

[HACKERS] recovery_target_time and last completed transaction log time

2008-10-29 Thread Kevin Grittner
I'm posting on hackers because I think that there is a problem in one of three places, and I'm not sure which: (1) The documentation needs clarification. (2) A LOG message needs clarification. (3) There is a bug in recovery. (unlikely) This issue was previously posted here with no response:

[HACKERS] autovacuum: I need some explanation

2008-10-29 Thread Noah Freire
Hello, I have a table (accounts) with 600,000,000 rows. A heavy high-concurrent workload that makes mostly updates on this table generates a lot of dead tuples in its run, which is expected due to MVCC. The problem is that even though autovacuum is enabled, the autovacuum worker does not vacuum th

Re: [HACKERS] Block-level CRC checks

2008-10-29 Thread Alvaro Herrera
Simon Riggs wrote: > But perhaps writing a single WAL record if you scan whole page and set > all bits at once. Then it makes sense in some cases. So this is what I ended up doing; attached. There are some gotchas in this patch: 1. it does not consider hint bits other than the ones defined in h

Re: [HACKERS] Multi CPU Queries - Feedback and/or suggestions wanted!

2008-10-29 Thread Dann Corbit
>Hi Simon, > >He is going to do some investigation in the methods and >write down the possibilities and then he is going to implement >something from that for PostgreSQL. > >When will this work be complete? We are days away from completing main >work on 8.4, so you won't get much discussion on this

Re: [HACKERS] Multi CPU Queries - Feedback and/or suggestions wanted!

2008-10-29 Thread Julius Stroffek
Hi Simon, He is going to do some investigation in the methods and write down the possibilities and then he is going to implement something from that for PostgreSQL. When will this work be complete? We are days away from completing main work on 8.4, so you won't get much discussion on this

Re: [HACKERS] PostgreSQL + Replicator developer meeting 10/28

2008-10-29 Thread Joshua D. Drake
On Wed, 2008-10-29 at 19:15 +0200, Hannu Krosing wrote: > > > SLAVE 0 is defined by a GUC on the slave, replication_slave_no I think. > > ( I would have to check the docs) > > And the only other GUC slave needs for replication is MCP/Slave connect > info ? https://projects.commandprompt.com/pub

Re: [HACKERS] pre-MED

2008-10-29 Thread Joshua D. Drake
On Wed, 2008-10-29 at 19:17 +0200, Hannu Krosing wrote: > On Wed, 2008-10-29 at 09:40 -0700, David Fetter wrote: > > Folks, > > > > Please find enclosed a WIP patch to add the ability for functions to > > see the qualifiers of the query in which they're called. It's not > > working just yet, and

Re: [HACKERS] WIP patch: convert SQL-language functions to return tuplestores

2008-10-29 Thread Hannu Krosing
On Wed, 2008-10-29 at 11:58 -0400, Tom Lane wrote: > Dimitri Fontaine <[EMAIL PROTECTED]> writes: > > And I fail to see how the user would control which behavior will get > > chosen, > > Oh, I'm sorry, I didn't realize you misunderstood my syntax example. > I was suggesting that the SQL function

Re: [HACKERS] pre-MED

2008-10-29 Thread Hannu Krosing
On Wed, 2008-10-29 at 09:40 -0700, David Fetter wrote: > Folks, > > Please find enclosed a WIP patch to add the ability for functions to > see the qualifiers of the query in which they're called. It's not > working just yet, and I'm not sure how best to get it working, but I'd > like to see this

Re: [HACKERS] WIP patch: convert SQL-language functions to return tuplestores

2008-10-29 Thread Tom Lane
Dimitri Fontaine <[EMAIL PROTECTED]> writes: > Le mercredi 29 octobre 2008, Tom Lane a écrit : >> However, I see no >> solution to that problem except function inlining; and if the function >> gets inlined then all this discussion is moot anyhow. > How to inline PLs functions? All of this is p

Re: [HACKERS] PostgreSQL + Replicator developer meeting 10/28

2008-10-29 Thread Hannu Krosing
On Wed, 2008-10-29 at 09:01 -0700, Joshua D. Drake wrote: > On Wed, 2008-10-29 at 12:02 +0200, Hannu Krosing wrote: > > On Tue, 2008-10-28 at 22:16 -0700, Joshua D. Drake wrote: > > > Alvaro Herrera wrote: > > > Case in point. To replicate a table currently you do this: > > > > > > ALTER TABLE fo

Re: [HACKERS] pre-MED

2008-10-29 Thread Jonah H. Harris
On Wed, Oct 29, 2008 at 12:40 PM, David Fetter <[EMAIL PROTECTED]> wrote: > Please find enclosed a WIP patch to add the ability for functions to > see the qualifiers of the query in which they're called. It's not > working just yet, and I'm not sure how best to get it working, but I'd > like to se

Re: [HACKERS] WIP patch: convert SQL-language functions to return tuplestores

2008-10-29 Thread Dimitri Fontaine
Le mercredi 29 octobre 2008, Tom Lane a écrit : > Now of course the bigger problem with either this syntax or yours is > that attaching such a property to a function is arguably the Wrong Thing > in the first place. Which one is the best way is likely to depend on > the calling query more than it

[HACKERS] pre-MED

2008-10-29 Thread David Fetter
Folks, Please find enclosed a WIP patch to add the ability for functions to see the qualifiers of the query in which they're called. It's not working just yet, and I'm not sure how best to get it working, but I'd like to see this as part of 8.4, as SQL/MED is just way too ambitious given the time

Re: [HACKERS] PostgreSQL + Replicator developer meeting 10/28

2008-10-29 Thread Joshua D. Drake
On Wed, 2008-10-29 at 09:54 +0200, Hannu Krosing wrote: > On Tue, 2008-10-28 at 22:37 -0300, Alvaro Herrera wrote: > > Hannu Krosing wrote: > > > On Tue, 2008-10-28 at 15:18 -0700, Joshua Drake wrote: > it was in subsection "mcp_server mysteriously dies" > http://www.commandprompt.com/products/mam

Re: [HACKERS] PostgreSQL + Replicator developer meeting 10/28

2008-10-29 Thread Joshua D. Drake
On Wed, 2008-10-29 at 12:02 +0200, Hannu Krosing wrote: > On Tue, 2008-10-28 at 22:16 -0700, Joshua D. Drake wrote: > > Alvaro Herrera wrote: > > Case in point. To replicate a table currently you do this: > > > > ALTER TABLE foo ENABLE REPLICATION; > > ALTER TABLE foo ENABLE REPLICATION ON SLAVE

Re: [HACKERS] WIP patch: convert SQL-language functions to return tuplestores

2008-10-29 Thread Tom Lane
Dimitri Fontaine <[EMAIL PROTECTED]> writes: > And I fail to see how the user would control which behavior will get chosen, Oh, I'm sorry, I didn't realize you misunderstood my syntax example. I was suggesting that the SQL function manager recognize some optional non-SQL keywords at the start of

Re: [HACKERS] WIP patch: convert SQL-language functions to return tuplestores

2008-10-29 Thread Dimitri Fontaine
Le mercredi 29 octobre 2008, Tom Lane a écrit : > Well, call-per-value is *necessary* for lazy evaluation, but it's not > *sufficient*. You need a function implementation that can suspend and > resume execution, and that's difficult in general. Ok, I think I begin to understand how things are tie

Re: [HACKERS] WIP patch: convert SQL-language functions to return tuplestores

2008-10-29 Thread Tom Lane
Dimitri Fontaine <[EMAIL PROTECTED]> writes: > Le mercredi 29 octobre 2008, Tom Lane a écrit : >> So the fact that it's possible for SQL-language functions is an >> idiosyncrasy of that language, not something we should cram into the >> general CREATE FUNCTION syntax in the vain hope that having

[HACKERS] WIP parallel restore patch

2008-10-29 Thread Andrew Dunstan
Attached is my latest parallel restore patch. I think it's functionally complete for Unix. Many bugs have been fixed since the last patch, and the hardcoded limitation to two table dependencies is removed. It seems fairly robust in my recent testing. Remaining to be done: . code cleanup .

Re: [HACKERS] WIP patch: convert SQL-language functions to return tuplestores

2008-10-29 Thread Dimitri Fontaine
Le mercredi 29 octobre 2008, Tom Lane a écrit : > So the fact that it's possible for SQL-language functions is an > idiosyncrasy of that language, not something we should cram into the > general CREATE FUNCTION syntax in the vain hope that having syntax > might cause an implementation to appear som

Re: [HACKERS] WIP patch: convert SQL-language functions to return tuplestores

2008-10-29 Thread Tom Lane
Dimitri Fontaine <[EMAIL PROTECTED]> writes: > Done this way, the user could also choose for the function to be lazy or to > use a tuplestore whatever the language in which it's written. The odds of this ever happening for any of the PLs are not distinguishable from zero. It might be nice to hav

Re: [HACKERS] PostgreSQL + Replicator developer meeting 10/28

2008-10-29 Thread Andrew Sullivan
On Wed, Oct 29, 2008 at 12:02:20PM +0200, Hannu Krosing wrote: > A good goal. But why would anybody _need_ 50 slaves ? They might have a contractual responsibility for extremely wide geographic distribution. Or they might be building an application that needs extremely wide network-topological

Re: [HACKERS] Updating FSM on recovery

2008-10-29 Thread Robert Haas
> Buffer ReadBuffer(Relation reln, BlockNumber blockNum); > Buffer ReadBufferExt(Relation reln, ForkNumber forkNum, BlockNumber > blockNum, BufferAccessStrategy strategy, ReadBufferMode mode); > Buffer ReadBufferWithoutRelcache(RelFileNode rnode, bool isTemp, ForkNumber > forkNum, BlockNumber block

Re: [HACKERS] WIP patch: convert SQL-language functions to return tuplestores

2008-10-29 Thread Robert Haas
> So my idea would be to have the SQL function behavior choose to return values > either via tuplestore or via value-per-call, depending on the user > setting "generator" or "lazy". > Done this way, the user could also choose for the function to be lazy or to > use a tuplestore whatever the languag

Re: [HACKERS] some problem with casting unknown to smallint

2008-10-29 Thread Pavel Stehule
2008/10/29 Tom Lane <[EMAIL PROTECTED]>: > "Pavel Stehule" <[EMAIL PROTECTED]> writes: >> I understand. So every smallint should be call with casting? > > A long time ago we tried to make small integer literals be interpreted > as int2 initially, instead of int4, and the attempt failed rather > spe

Re: [HACKERS] some problem with casting unknown to smallint

2008-10-29 Thread Tom Lane
"Pavel Stehule" <[EMAIL PROTECTED]> writes: > I understand. So every smallint should be call with casting? A long time ago we tried to make small integer literals be interpreted as int2 initially, instead of int4, and the attempt failed rather spectacularly. (It broke most of the regression tests

Re: [HACKERS] Updating FSM on recovery

2008-10-29 Thread Tom Lane
Heikki Linnakangas <[EMAIL PROTECTED]> writes: > The FSM would be perfectly happy to just initialize torn or otherwise > damaged pages, so I think we should add yet another mode to ReadBuffer() > to allow that. We could also treat read() errors as merely warnings in > that mode, effectively the

Re: [HACKERS] some problem with casting unknown to smallint

2008-10-29 Thread Pavel Stehule
2008/10/29 Tom Lane <[EMAIL PROTECTED]>: > "Pavel Stehule" <[EMAIL PROTECTED]> writes: >> I am not sure, it's probably bug. > >> postgres=# create function t1(smallint) returns smallint as $$select >> $1$$ language sql; >> CREATE FUNCTION >> postgres=# select t1(10); >> ERROR: function t1(integer)

Re: [HACKERS] some problem with casting unknown to smallint

2008-10-29 Thread Tom Lane
"Pavel Stehule" <[EMAIL PROTECTED]> writes: > I am not sure, it's probably bug. > postgres=# create function t1(smallint) returns smallint as $$select > $1$$ language sql; > CREATE FUNCTION > postgres=# select t1(10); > ERROR: function t1(integer) does not exist That's not "unknown to smallint",

Re: [HACKERS] Updating FSM on recovery

2008-10-29 Thread Heikki Linnakangas
Tom Lane wrote: Heikki Linnakangas <[EMAIL PROTECTED]> writes: Tom Lane wrote: As far as the ugliness in XLogRecordPageWithFreeSpace goes: couldn't you just call XLogReadBufferWithFork with init = true, and then initialize the page if PageIsNew? With init=true, we don't even try to read the p

Re: [HACKERS] WIP patch: convert SQL-language functions to return tuplestores

2008-10-29 Thread Dimitri Fontaine
Le mardi 28 octobre 2008, Pavel Stehule a écrit : > 2008/10/28 Dimitri Fontaine <[EMAIL PROTECTED]>: > > Hi, > > > > In the python language, functions that lazily return collections are > > called generators and use the yield keyword instead of return. > > http://www.python.org/doc/2.5.2/tut/node11

Re: [HACKERS] PostgreSQL + Replicator developer meeting 10/28

2008-10-29 Thread Hannu Krosing
On Tue, 2008-10-28 at 22:16 -0700, Joshua D. Drake wrote: > Alvaro Herrera wrote: > > Hannu Krosing wrote: > >> On Tue, 2008-10-28 at 15:18 -0700, Joshua Drake wrote: > > >> Will there be an helper application for setting up and configuring > >> changes in replication. or will it all be done usin

Re: [HACKERS] Proposal of PITR performance improvement for 8.4.

2008-10-29 Thread Simon Riggs
On Wed, 2008-10-29 at 09:55 +0900, Koichi Suzuki wrote: > I'd like to hear some more about these. I'm more than happy to write > all the code inside PG core to avoid overhead to create another > process. Having an external program can help earlier releases also, so I think this is the right ap

[HACKERS] Updates of SE-PostgreSQL 8.4devel patches (r1155)

2008-10-29 Thread KaiGai Kohei
I've updated my patches, these are ready for CommitFest:Nov. [1/6] http://sepgsql.googlecode.com/files/sepostgresql-sepgsql-8.4devel-3-r1155.patch [2/6] http://sepgsql.googlecode.com/files/sepostgresql-pg_dump-8.4devel-3-r1155.patch [3/6] http://sepgsql.googlecode.com/files/sepostgresql-policy

Re: [HACKERS] Proposal of PITR performance improvement for 8.4.

2008-10-29 Thread Simon Riggs
On Tue, 2008-10-28 at 14:21 +0200, Heikki Linnakangas wrote: > 1. You should avoid useless posix_fadvise() calls. In the naive > implementation, where you simply call posix_fadvise() for every page > referenced in every WAL record, you'll do 1-2 posix_fadvise() syscalls > per WAL record, and t

Re: [HACKERS] Feature Request - Table Definition query

2008-10-29 Thread Svenne Krap
It could be useful to have a command that returns the table definition (like pg_dump -st) from within the query interface. This could be particularly useful if one doesn't have access to or prefers not to manipulate results coming from a shell. If I have an API from which to query the databas

[HACKERS] some problem with casting unknown to smallint

2008-10-29 Thread Pavel Stehule
Hello I am not sure, it's probably bug. postgres=# create function t1(smallint) returns smallint as $$select $1$$ language sql; CREATE FUNCTION postgres=# create function t2(bigint) returns bigint as $$select $1$$ language sql; CREATE FUNCTION postgres=# select t1(10); ERROR: function t1(integer

Re: [HACKERS] PostgreSQL + Replicator developer meeting 10/28

2008-10-29 Thread Hannu Krosing
On Tue, 2008-10-28 at 22:37 -0300, Alvaro Herrera wrote: > Hannu Krosing wrote: > > On Tue, 2008-10-28 at 15:18 -0700, Joshua Drake wrote: > > > > The two obvious problems with the existing MCP architecture is: > > > > > > 1. Single point of failure > > > > For async replication there is always