Re: [HACKERS] Bloom index

2010-01-18 Thread Greg Stark
On Mon, Jan 18, 2010 at 2:29 AM, Greg Stark gsst...@mit.edu wrote: Bloom filters need to be sized to have n bits per set element to maintain a targeted false positive rate. And that false positive rate would be higher than just having an n bit hash for each set element. Normally they have the

Re: [HACKERS] Hot Standby and handling max_standby_delay

2010-01-18 Thread Simon Riggs
On Mon, 2010-01-18 at 08:28 +0200, Heikki Linnakangas wrote: Simon Riggs wrote: On Sun, 2010-01-17 at 22:57 +0200, Heikki Linnakangas wrote: It would be good if there was a keepalive WAL record with a timestamp on it generated every N seconds while in streaming mode. Yeah, that would

Re: [HACKERS] New XLOG record indicating WAL-skipping

2010-01-18 Thread Simon Riggs
On Fri, 2010-01-15 at 13:28 +0200, Heikki Linnakangas wrote: I think it's a premature optimization to skip writing the records if we've written in the same session already. Especially with the 'reason' information added to the records, it's nice to have a record of each such operation. All

Re: [SPAM][HACKERS] Mammoth in Core?

2010-01-18 Thread Takahiro Itagaki
Joshua D. Drake j...@commandprompt.com wrote: My question is, do we have any interest in working on getting this into core? We had a discussion how replication projects work together with the core in the developer meeting on PGCon 2009 Japan.

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

2010-01-18 Thread Leonardo F
This patch no longer applies. Could you rebase it? Done (I think). Added a couple of simple tests for bit overlay. I didn't include the catversion.h changes: obviously the CATALOG_VERSION_NO has to be changed. Leonardo Index: src/backend/utils/adt/varbit.c

Re: [HACKERS] Streaming Replication on win32

2010-01-18 Thread Fujii Masao
On Mon, Jan 18, 2010 at 5:22 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: This could be because the win32 socket emulation layer simply wasn't designed to deal with non-blocking sockets. Specifically, it actually *always* sets the socket to non-blocking mode, and then uses

Re: [HACKERS] Hot Standby and handling max_standby_delay

2010-01-18 Thread Simon Riggs
On Mon, 2010-01-18 at 08:28 +0200, Heikki Linnakangas wrote: Do we need a new record type for that, is there a handy record type to bounce from? After starting streaming, slices of WAL are sent as CopyData messages. The CopyData payload begins with an XLogRecPtr, followed by the WAL

Re: [HACKERS] Hot Standby and handling max_standby_delay

2010-01-18 Thread Fujii Masao
On Mon, Jan 18, 2010 at 5:45 PM, Simon Riggs si...@2ndquadrant.com wrote: How accurate is this now? With regard to remaining items of work. http://wiki.postgresql.org/wiki/Streaming_Replication Not accurate. I'll correct that and provide the link from v8.5 Open Items page to that. Regards, --

Re: [HACKERS] Streaming Replication on win32

2010-01-18 Thread Magnus Hagander
On Mon, Jan 18, 2010 at 10:30, Fujii Masao masao.fu...@gmail.com wrote: On Mon, Jan 18, 2010 at 5:22 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: This could be because the win32 socket emulation layer simply wasn't designed to deal with non-blocking sockets. Specifically,

Re: [HACKERS] Clearing global statistics

2010-01-18 Thread Magnus Hagander
On Mon, Jan 18, 2010 at 00:52, Greg Smith g...@2ndquadrant.com wrote: Magnus Hagander wrote: Maybe this should be Unrecognized reset target: %s, target, and also a errhint() saying which targets are allowed. Thoughts? That seems reasonable.  The other thing I realized is that I forgot to

Re: [HACKERS] RADIUS authentication

2010-01-18 Thread KaiGai Kohei
(2010/01/10 22:25), Magnus Hagander wrote: The attached patch implements RADIUS authentication (RFC2865-compatible). The main usecase for me in this is the ability to use (token based) one-time-password systems easily with PostgreSQL. These systems almost always support RADIUS, and the

Re: [HACKERS] Streaming Replication on win32

2010-01-18 Thread Fujii Masao
On Mon, Jan 18, 2010 at 6:40 PM, Magnus Hagander mag...@hagander.net wrote: SSL_read calls into pqwin32_recv(), so you have the same problem. (see my_sock_read() and my_sock_write() in be-secure.c) Oh, I confirmed that. Thanks! Can we prevent SSL_read from being blocked in the renegotiation

[HACKERS] Fix auto-prepare #2

2010-01-18 Thread Boszormenyi Zoltan
Hi, we have found that auto-prepare causes a problem if the connection is closed and re-opened and the previously prepared query is issued again. The application gets back a error code -201 which seems bogus and it turned out to be a missing return (false); after

Re: [HACKERS] Hot Standby and handling max_standby_delay

2010-01-18 Thread Fujii Masao
On Mon, Jan 18, 2010 at 6:35 PM, Fujii Masao masao.fu...@gmail.com wrote: On Mon, Jan 18, 2010 at 5:45 PM, Simon Riggs si...@2ndquadrant.com wrote: How accurate is this now? With regard to remaining items of work. http://wiki.postgresql.org/wiki/Streaming_Replication Not accurate. I'll

Re: [HACKERS] Fixing handling of constraint triggers

2010-01-18 Thread Dean Rasheed
2010/1/17 Tom Lane t...@sss.pgh.pa.us: I want to do something about the open item discussed in this thread: http://archives.postgresql.org/message-id/2009081446.ga25...@depesz.com The right way to handle that, IMO, is to create pg_constraint rows for triggers created via CREATE CONSTRAINT

Re: [HACKERS] Hot Standby and handling max_standby_delay

2010-01-18 Thread Simon Riggs
On Mon, 2010-01-18 at 20:18 +0900, Fujii Masao wrote: On Mon, Jan 18, 2010 at 6:35 PM, Fujii Masao masao.fu...@gmail.com wrote: On Mon, Jan 18, 2010 at 5:45 PM, Simon Riggs si...@2ndquadrant.com wrote: How accurate is this now? With regard to remaining items of work.

Re: [HACKERS] Hot Standby and handling max_standby_delay

2010-01-18 Thread Heikki Linnakangas
Fujii Masao wrote: On Mon, Jan 18, 2010 at 6:35 PM, Fujii Masao masao.fu...@gmail.com wrote: On Mon, Jan 18, 2010 at 5:45 PM, Simon Riggs si...@2ndquadrant.com wrote: How accurate is this now? With regard to remaining items of work. http://wiki.postgresql.org/wiki/Streaming_Replication Not

Re: [HACKERS] Bloom index

2010-01-18 Thread Teodor Sigaev
Yeah, (1) rand isn't a good random number generator and (2) fooling with I tested rand() and random() generator and results was close to the same, and rand() was even slightly better. the main random number sequence is user-unfriendly. If you need a That's really easy to fix. private

[HACKERS] Bloom filters bloom filters

2010-01-18 Thread Greg Stark
So the other thread on bloom filter indexes got a discussion going in real space about other neat things you can do with them and there were two that seemed useful for Postgres. We could efficiently get an fairly accurate estimate of the number of distinct values when doing analyze if we scan the

Re: [HACKERS] Hot Standby and handling max_standby_delay

2010-01-18 Thread Heikki Linnakangas
Simon Riggs wrote: What were the blockers that prevented sync rep from being included? I must have missed the discussion on that part. For one, figuring out how to send back the notifications about WAL applied in standby, and all the IPC required for that. Streaming replication is a complex

Re: [HACKERS] New XLOG record indicating WAL-skipping

2010-01-18 Thread Heikki Linnakangas
Simon Riggs wrote: Can we call that XLogReportUnloggedStatement() or similar? XlogSkipLogging() sounds like a request rather than a mark/report/record type of action. Agreed. I vote for XLogReportUnloggedOperation(). I'll change it to that before committing, unless Fujii beats me to it. --

Re: [HACKERS] Bloom index

2010-01-18 Thread Teodor Sigaev
So for example if your bloom filter is 4 bits per column your error rate for a single column where clause will be 1/2^(4/1.44) or a little worse than returning 1 record in 7. If you test two or three columns then it'll be about 1 in 49 or 1 in 343. Hmm, I don't understand your calculations. In

Re: [HACKERS] Bloom index

2010-01-18 Thread Greg Stark
2010/1/18 Teodor Sigaev teo...@sigaev.ru: So for example if your bloom filter is 4 bits per column your error rate for a single column where clause will be 1/2^(4/1.44) or a little worse than returning 1 record in 7. If you test two or three columns then it'll be about 1 in 49 or 1 in 343.

[HACKERS] Bloom filters bloom filters bloom filters

2010-01-18 Thread Greg Stark
Another idea of how to make use of bloom filters: It should be possible to implement a gist opclass over a bloomfilter data type which implements the operation int membership in int[]. All you need is a function which takes an int[] and returns a bloom filter. Then your union operation is to

Re: [HACKERS] New XLOG record indicating WAL-skipping

2010-01-18 Thread Fujii Masao
On Mon, Jan 18, 2010 at 9:17 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Agreed. I vote for XLogReportUnloggedOperation(). OK. I'll change it to that before committing, unless Fujii beats me to it. Yeah, please go ahead. Regards, -- Fujii Masao NIPPON TELEGRAPH AND

Re: [HACKERS] Streaming replication, and walsender during recovery

2010-01-18 Thread Tom Lane
Fujii Masao masao.fu...@gmail.com writes: When I configured a cascaded standby (i.e, made the additional standby server connect to the standby), I got the following errors, and a cascaded standby didn't start replication. ERROR: timeline 0 of the primary does not match recovery target

Re: [HACKERS] Hot Standby and handling max_standby_delay

2010-01-18 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: Simon Riggs wrote: Do we need a new record type for that, is there a handy record type to bounce from? After starting streaming, slices of WAL are sent as CopyData messages. The CopyData payload begins with an XLogRecPtr,

Re: [HACKERS] Streaming replication, and walsender during recovery

2010-01-18 Thread Simon Riggs
On Mon, 2010-01-18 at 09:31 -0500, Tom Lane wrote: Fujii Masao masao.fu...@gmail.com writes: When I configured a cascaded standby (i.e, made the additional standby server connect to the standby), I got the following errors, and a cascaded standby didn't start replication. ERROR:

Re: [HACKERS] Streaming Replication on win32

2010-01-18 Thread Magnus Hagander
2010/1/18 Tom Lane t...@sss.pgh.pa.us: Magnus Hagander mag...@hagander.net writes: Which shows one potentially big problem - since we're calling select() from inside libpq, it's not calling our signal emulation layer compatible select(). This means that at this point, walreceiver is not

Re: [HACKERS] Streaming Replication on win32

2010-01-18 Thread Magnus Hagander
2010/1/17 Heikki Linnakangas heikki.linnakan...@enterprisedb.com: Magnus Hagander wrote: Which shows one potentially big problem - since we're calling select() from inside libpq, it's not calling our signal emulation layer compatible select(). This means that at this point, walreceiver is not

Re: [HACKERS] mailing list archiver chewing patches

2010-01-18 Thread Matteo Beccati
Il 16/01/2010 14:21, Matteo Beccati ha scritto: Il 16/01/2010 11:48, Dimitri Fontaine ha scritto: Matteo Beccatip...@beccati.com writes: Anyway, I've made further changes and I would say that at this point the PoC is feature complete. There surely are still some rough edges and a few things to

Re: [HACKERS] Bloom index

2010-01-18 Thread Tom Lane
Teodor Sigaev teo...@sigaev.ru writes: Yeah, (1) rand isn't a good random number generator and (2) fooling with I tested rand() and random() generator and results was close to the same, and rand() was even slightly better. That is true on some platforms, but on others rand() is very bad.

Re: [HACKERS] mailing list archiver chewing patches

2010-01-18 Thread Magnus Hagander
2010/1/18 Matteo Beccati p...@beccati.com: Il 16/01/2010 14:21, Matteo Beccati ha scritto: Il 16/01/2010 11:48, Dimitri Fontaine ha scritto: Matteo Beccatip...@beccati.com writes: Anyway, I've made further changes and I would say that at this point the PoC is feature complete. There

Re: [HACKERS] Fixing handling of constraint triggers

2010-01-18 Thread Tom Lane
Dean Rasheed dean.a.rash...@googlemail.com writes: Agreed. That's much neater. However, it does introduce a change in behaviour - if you have 2 constraints with the same name in different schemas, one deferrable, and one not, and the non-deferrable one is first on the search path, then you'll

Re: [HACKERS] Hot Standby and handling max_standby_delay

2010-01-18 Thread Heikki Linnakangas
Tom Lane wrote: Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: Simon Riggs wrote: Do we need a new record type for that, is there a handy record type to bounce from? After starting streaming, slices of WAL are sent as CopyData messages. The CopyData payload begins with an

Re: [HACKERS] mailing list archiver chewing patches

2010-01-18 Thread Dimitri Fontaine
Magnus Hagander mag...@hagander.net writes: Also, I tink one of the main issues with the archives today that people bring up is the inability to have threads cross months. I think that should be fixed. Basically, get rid of the grouping by month for a more dynamic way to browse. Clic a mail

Re: [HACKERS] Hot Standby and handling max_standby_delay

2010-01-18 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: Tom Lane wrote: Whether or not anyone bothers with the timestamp message, I think adding a message type header is a Must Fix item. A protocol with no provision for extension is certainly going to bite us in the rear before long.

Re: [HACKERS] Streaming Replication on win32

2010-01-18 Thread Heikki Linnakangas
Magnus Hagander wrote: 2010/1/17 Heikki Linnakangas heikki.linnakan...@enterprisedb.com: We could replace the blocking PQexec() calls with PQsendQuery(), and use the emulated version of select() to wait. Hmm. That would at least theoretically work, but aren't there still places we may end

Re: [HACKERS] Build farm tweaks

2010-01-18 Thread Alvaro Herrera
Greg Sabino Mullane wrote: -BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 I mentioned earlier that buildfarm member jaguar (that's the one that builds with CLOBBER_CACHE_ALWAYS) was showing suspicious intermittent failures. Tom, this brings up another question: is there any

Re: [HACKERS] mailing list archiver chewing patches

2010-01-18 Thread Alvaro Herrera
Magnus Hagander wrote: 2010/1/18 Matteo Beccati p...@beccati.com: My question now is... what next? :) Gee, I disappear for a week and look what happens -- we get streaming replication, a revamped archives site, and maybe something else that I haven't seen yet. I love it :-) If it wasn't

[HACKERS] Review: Typed Table

2010-01-18 Thread Hitoshi Harada
I reviewed this patch today. Overview: Almost everything is OK. Applied with few hunks (in psql/describle.c 2 lines offset), compiled without warnings, passed regression tests. The results of advertised queries are as expected. Coding style is of course satisfied. Since this is utility changes

Re: [HACKERS] Testing with concurrent sessions

2010-01-18 Thread Markus Wanner
Hi, Quoting Kevin Grittner kevin.gritt...@wicourts.gov: I strongly encourage you to set that up on git.postgresql.org. I'm about to provide git repositories for Postgres-R anyway, so I've setup two projects on git.postgres-r.org: dtester: that's the driver/harness code postgres-dtests: a

[HACKERS] Re: Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)

2010-01-18 Thread Greg Stark
Looking at this patch for the commitfest I have a few questions. 1) You said you added an fsync of the new directory -- where is that I don't see it anywhere. 2) Why does the second pass to do the fsyncs read through fromdir to find all the filenames. I find that odd and counterintuitive. It

Re: [HACKERS] Hot Standby and handling max_standby_delay

2010-01-18 Thread Heikki Linnakangas
Tom Lane wrote: Speaking of which, just where is the defense that makes sure that walsender and walreceiver are compatible? We should be checking not only version, but all of the configuration variables that are embedded in pg_control. That happens at startup when pg_control is read, before

Re: [HACKERS] mailing list archiver chewing patches

2010-01-18 Thread Matteo Beccati
Il 18/01/2010 15:55, Magnus Hagander ha scritto: If it wasn't for the fact that we're knee deep in two other major projects for the infrastructure team right now, I'd be all over this :-) But we really need to complete that before we put anything new in production here. Sure, that's completely

Re: [HACKERS] mailing list archiver chewing patches

2010-01-18 Thread Matteo Beccati
Il 18/01/2010 16:19, Dimitri Fontaine ha scritto: Magnus Hagandermag...@hagander.net writes: Also, I tink one of the main issues with the archives today that people bring up is the inability to have threads cross months. I think that should be fixed. Basically, get rid of the grouping by month

Re: [HACKERS] mailing list archiver chewing patches

2010-01-18 Thread Magnus Hagander
On Mon, Jan 18, 2010 at 18:31, Matteo Beccati p...@beccati.com wrote: Il 18/01/2010 15:55, Magnus Hagander ha scritto: If it wasn't for the fact that we're knee deep in two other major projects for the infrastructure team right now, I'd be all over this :-) But we really need to complete that

Re: [HACKERS] mailing list archiver chewing patches

2010-01-18 Thread Magnus Hagander
On Mon, Jan 18, 2010 at 18:35, Matteo Beccati p...@beccati.com wrote: Il 18/01/2010 16:19, Dimitri Fontaine ha scritto: Magnus Hagandermag...@hagander.net  writes: Also, I tink one of the main issues with the archives today that people bring up is the inability to have threads cross months.

Re: [HACKERS] quoting psql varible as identifier

2010-01-18 Thread Robert Haas
On Sun, Jan 17, 2010 at 2:04 PM, Pavel Stehule pavel.steh...@gmail.com wrote: I rewrote patch so now interface for PQescapeIdentConn is same as PQescapeStringConn @3. I though so the protection under incomplete multibyte chars are enought - missing bytes are replaced by space - like

Re: [HACKERS] quoting psql varible as identifier

2010-01-18 Thread Pavel Stehule
2010/1/18 Robert Haas robertmh...@gmail.com: On Sun, Jan 17, 2010 at 2:04 PM, Pavel Stehule pavel.steh...@gmail.com wrote: I rewrote patch so now interface for PQescapeIdentConn is same as PQescapeStringConn @3. I though so the protection under incomplete multibyte chars are enought -

Re: [HACKERS] quoting psql varible as identifier

2010-01-18 Thread Robert Haas
On Mon, Jan 18, 2010 at 1:52 PM, Pavel Stehule pavel.steh...@gmail.com wrote: 2010/1/18 Robert Haas robertmh...@gmail.com: On Sun, Jan 17, 2010 at 2:04 PM, Pavel Stehule pavel.steh...@gmail.com wrote: I rewrote patch so now interface for PQescapeIdentConn is same as PQescapeStringConn @3.

Re: [HACKERS] quoting psql varible as identifier

2010-01-18 Thread Pavel Stehule
2010/1/18 Robert Haas robertmh...@gmail.com: On Mon, Jan 18, 2010 at 1:52 PM, Pavel Stehule pavel.steh...@gmail.com wrote: 2010/1/18 Robert Haas robertmh...@gmail.com: On Sun, Jan 17, 2010 at 2:04 PM, Pavel Stehule pavel.steh...@gmail.com wrote: I rewrote patch so now interface for

Re: [HACKERS] review: More frame options in window functions

2010-01-18 Thread Tom Lane
Hitoshi Harada umi.tan...@gmail.com writes: 2010/1/17 Tom Lane t...@sss.pgh.pa.us: That's broken, whether it passes regression tests or not.  Not canonicalizing will mean that you fail to recognize equality to canonicalized pathkeys, and thus for example execute unnecessary sorts. So why

Re: [HACKERS] Pretty printed trigger in psql

2010-01-18 Thread Brad T. Sliger
On Tuesday 12 January 2010 01:06:22 Takahiro Itagaki wrote: Psql shows too many parentheses when it prints triggers with WHEN clause. postgres=# \d t1 Table public.t1 Column | Type | Modifiers +-+--- c1 | integer | Triggers: mytrig AFTER UPDATE

Re: [HACKERS] quoting psql varible as identifier

2010-01-18 Thread Robert Haas
On Mon, Jan 18, 2010 at 2:20 PM, Pavel Stehule pavel.steh...@gmail.com wrote: 2010/1/18 Robert Haas robertmh...@gmail.com: On Mon, Jan 18, 2010 at 1:52 PM, Pavel Stehule pavel.steh...@gmail.com wrote: 2010/1/18 Robert Haas robertmh...@gmail.com: On Sun, Jan 17, 2010 at 2:04 PM, Pavel Stehule

Re: [HACKERS] quoting psql varible as identifier

2010-01-18 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: ... Also, I prefer an API where the escaping function does include the quotes, so I've done it that way in the attached patch. IMO this function should act as much like PQescapeStringConn as possible. Random differences like including or not including

Re: [HACKERS] quoting psql varible as identifier

2010-01-18 Thread Robert Haas
On Mon, Jan 18, 2010 at 3:26 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: ...  Also, I prefer an API where the escaping function does include the quotes, so I've done it that way in the attached patch. IMO this function should act as much like

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

2010-01-18 Thread Peter Eisentraut
On sön, 2009-12-06 at 02:21 -0800, Kurt Harriman wrote: Which ones does it actually offer any benefit for? MSVC is one. I seem to recall that somewhere else it was said that MSVC produces warnings on unused static inline functions. Am I mistaken? Also, if this is mainly for the benefit of

Re: [HACKERS] parallel regression test output

2010-01-18 Thread Peter Eisentraut
On sön, 2010-01-17 at 23:54 -0500, Robert Haas wrote: I always assumed that it was printing the names as the tests finished, probably because of the way the output is staggered. If they were printed when the tests were started, the list would be printed all but simultaneously. Well, as long

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

2010-01-18 Thread Kevin Grittner
Leonardo F wrote: Done (I think). Added a couple of simple tests for bit overlay. I didn't include the catversion.h changes: obviously the CATALOG_VERSION_NO has to be changed. [Following the Reviewing A Patch wiki, more or less] The patch is in context diff format and applies cleanly.

[HACKERS] create composite type error message

2010-01-18 Thread Peter Eisentraut
When you create a composite type that already exists, the error message you get is about 'relation foo already exists'. While true, this can be confusing, as you didn't plan to create a relation. Therefore, I propose that we insert a snippet of code that is already used by the other forms of

Re: [HACKERS] Pretty printed trigger in psql

2010-01-18 Thread Takahiro Itagaki
Brad T. Sliger b...@sliger.org wrote: I tried to apply this patch to the latest version of PostgreSQL in git (bbfc96e). Some of the patch did not apply. Please find attached the output from patch. The full path of the ruleutils.c.rej is src/backend/utils/adt/ruleutils.c.rej The attached

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

2010-01-18 Thread Kurt Harriman
On 1/18/2010 1:20 PM, Peter Eisentraut wrote: I seem to recall that somewhere else it was said that MSVC produces warnings on unused static inline functions. Am I mistaken? MSVC does warn about unused static inline functions. The warning is prevented by using __forceinline instead of

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

2010-01-18 Thread Tom Lane
Kurt Harriman harri...@acm.org writes: c) Use configure to automate the testing of each build environment in situ. The third alternative adapts to new or little-known platforms with little or no manual intervention. This argument is bogus unless you can demonstrate a working

Re: [HACKERS] review: More frame options in window functions

2010-01-18 Thread Hitoshi Harada
2010/1/19 Tom Lane t...@sss.pgh.pa.us: Hitoshi Harada umi.tan...@gmail.com writes: In a RANGE offset mode query, for example: SELECT sum(ten) over (PARTITION BY four ORDER BY four RANGE BETWEEN 2 PRECEDING AND 1 PRECEDING) FROM tenk1 the frame is determined as from the first row which has

Re: [HACKERS] parallel regression test output

2010-01-18 Thread Robert Haas
On Mon, Jan 18, 2010 at 4:54 PM, Peter Eisentraut pete...@gmx.net wrote: On sön, 2010-01-17 at 23:54 -0500, Robert Haas wrote: I always assumed that it was printing the names as the tests finished, probably because of the way the output is staggered.  If they were printed when the tests were

Re: [HACKERS] review: More frame options in window functions

2010-01-18 Thread Tom Lane
Hitoshi Harada umi.tan...@gmail.com writes: 2010/1/19 Tom Lane t...@sss.pgh.pa.us: AFAICS that doesn't mean it can't be the canonicalized form of the sort key.  If a column is dropped out of the canonical sort key then it's simply redundant, and hence not relevant to determining the range.

Re: [HACKERS] plpgsql: open for execute - add USING clause

2010-01-18 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: ok, I accept all comments. revised version are attached. Applied with minor editorialization. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Table size does not include toast size

2010-01-18 Thread Greg Smith
Bernd Helmle wrote: These are two new functions pg_table_size() and pg_indexes_size(). This patch also changes pg_total_relation_size() to be a shorthand for pg_table_size() + pg_indexes_size(). Attached is a test program to exercise these new functions. I thoroughly abuse generate_series

Re: [HACKERS] Table size does not include toast size

2010-01-18 Thread Tom Lane
Greg Smith g...@2ndquadrant.com writes: The only question I'm left with after browsing the patch and staring at the above results is whether it makes sense to expose a pg_toast_size function. That would make the set available here capable of handling almost every situation somebody might

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

2010-01-18 Thread Kurt Harriman
On 1/18/2010 4:42 PM, Tom Lane wrote: Kurt Harrimanharri...@acm.org writes: c) Use configure to automate the testing of each build environment in situ. The third alternative adapts to new or little-known platforms with little or no manual intervention. This argument is bogus

Re: [HACKERS] Table size does not include toast size

2010-01-18 Thread Greg Smith
Tom Lane wrote: I'm inclined to think that table vs. index is the right level of abstraction for these functions, and that breaking it down further than that isn't all that helpful. We have the bottom-level information (per-fork relation size) available for those who really want the details.

Re: [HACKERS] Fix auto-prepare #2

2010-01-18 Thread Takahiro Itagaki
Hi, I'm reviewing your patch and have a couple of comments. Boszormenyi Zoltan z...@cybertec.at wrote: we have found that auto-prepare causes a problem if the connection is closed and re-opened and the previously prepared query is issued again. You didn't attach actual test cases for the

Re: [HACKERS] Pretty printed trigger in psql

2010-01-18 Thread Brad T. Sliger
On Monday 18 January 2010 16:40:07 Takahiro Itagaki wrote: Brad T. Sliger b...@sliger.org wrote: I tried to apply this patch to the latest version of PostgreSQL in git (bbfc96e). Some of the patch did not apply. Please find attached the output from patch. The full path of the

Re: [HACKERS] Table size does not include toast size

2010-01-18 Thread Tom Lane
Bernd Helmle maili...@oopsware.de writes: Since i'm not able to finish those other things in time, i wrapped up my existing code for this issue and came up with the attached patch, which should implement the behavior Tom proposed. These are two new functions pg_table_size() and

Re: [HACKERS] Streaming replication, and walsender during recovery

2010-01-18 Thread Fujii Masao
On Mon, Jan 18, 2010 at 11:42 PM, Simon Riggs si...@2ndquadrant.com wrote: On Mon, 2010-01-18 at 09:31 -0500, Tom Lane wrote: Fujii Masao masao.fu...@gmail.com writes: When I configured a cascaded standby (i.e, made the additional standby server connect to the standby), I got the following

Re: [HACKERS] plpgsql: open for execute - add USING clause

2010-01-18 Thread Pavel Stehule
2010/1/19 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: ok, I accept all comments. revised version are attached. Applied with minor editorialization. thank you Pavel                        regards, tom lane -- Sent via pgsql-hackers mailing list

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

2010-01-18 Thread Jeff Davis
Initial comments: * compiler warnings ipci.c: In function ‘CreateSharedMemoryAndSemaphores’: ipci.c:228: warning: implicit declaration of function ‘AsyncShmemInit’ * 2PC Adds complexity, and I didn't see any clear, easy solution after reading the thread. I don't see this as a showstopper, so

Re: [HACKERS] Streaming replication, and walsender during recovery

2010-01-18 Thread Simon Riggs
On Tue, 2010-01-19 at 15:04 +0900, Fujii Masao wrote: There is an ERROR, but no problem AFAICS. The tli isn't set until end of recovery because it doesn't need to have been set yet. That shouldn't prevent retrieving WAL data. OK. Here is the patch which supports a walsender process

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

2010-01-18 Thread Peter Eisentraut
On mån, 2010-01-18 at 16:34 -0800, Kurt Harriman wrote: MSVC does warn about unused static inline functions. The warning is prevented by using __forceinline instead of __inline. Hmm, but forceinline is not the same as inline. Are we confident that forcing inlining is not going to lead to