Re: [HACKERS] text search patch status update?

2009-01-07 Thread Heikki Linnakangas
Bruce Momjian wrote: Sushant Sinha wrote: The default headline generation function is complicated. It checks a lot of cases to determine the best headline to be displayed. So Heikki's examples just say that headline generation function may not be very intuitive. However, his examples were not af

Re: [HACKERS] New patch for Column-level privileges

2009-01-07 Thread KaiGai Kohei
Jaime Casanova wrote: On Wed, Jan 7, 2009 at 1:46 AM, KaiGai Kohei wrote: The attached patch is a proof of the concept. It walks on a given query tree to append accessed columns on rte->cols_sel and rte->cols_mod. When aliasvar of JOIN'ed relation is accesses, its source is appended on the list

Re: [HACKERS] Meridiem markers (was: [BUGS] Incorrect "invalid AM/PM string" error from to_timestamp)

2009-01-07 Thread Brendan Jurd
On Thu, Jan 8, 2009 at 2:20 PM, Bruce Momjian wrote: > OK, what is the TODO? It is more than AM/PM, right? > I see it happening in two stages. Stage 1 is updating the AM/PM parse code to use the seq_search technique, which may involve some minor refactoring around seq_search itself. This will

Re: [HACKERS] New patch for Column-level privileges

2009-01-07 Thread Jaime Casanova
On Wed, Jan 7, 2009 at 1:46 AM, KaiGai Kohei wrote: > > The attached patch is a proof of the concept. > It walks on a given query tree to append accessed columns on > rte->cols_sel and rte->cols_mod. > When aliasvar of JOIN'ed relation is accesses, its source is > appended on the list. > for my t

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Jaime Casanova
On Wed, Jan 7, 2009 at 5:46 PM, Tom Lane wrote: > Bruce Momjian writes: >>> * Simon Riggs (si...@2ndquadrant.com) wrote: I don't really understand this. Who can set up an inherited table structure but can't remember to turn on constraint_exclusion? > >> This new change also adds the con

Re: [HACKERS] Common Table Expressions applied; some issues remain

2009-01-07 Thread Bruce Momjian
Is this a TODO? --- Tom Lane wrote: > [ back to the when-to-inline-WITHs discussion ] > > Gregory Stark writes: > >> Tom Lane wrote: > >>> Any thoughts on what to do? One possibility is to flatten only > >>> if the subque

Re: [HACKERS] Null row vs. row of nulls in plpgsql

2009-01-07 Thread Tom Lane
Bruce Momjian writes: > I assume this is a TODO, right? Yah. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Common Table Expressions applied; some issues remain

2009-01-07 Thread Tom Lane
Bruce Momjian writes: > Is this a TODO? I'm inclined to leave it as-is, at least till we get some field feedback about how people want it to behave. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscript

Re: [HACKERS] Potential Join Performance Issue

2009-01-07 Thread Lawrence, Ramon
> Has this been completed? TODO item? > > > I'd be more inclined to deal with the issue by trying to establish a > > > "safety margin" in the estimate of whether the hash will go > > multi-batch. > > > IOW we should disuse_physical_tlist if the hash is estimated to be > > close to but still withi

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Tom Lane
"Jaime Casanova" writes: > what i still doesn't understand is why we need a third value at all? There are cases for wanting all three. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://ww

Re: [HACKERS] Meridiem markers (was: [BUGS] Incorrect "invalid AM/PM string" error from to_timestamp)

2009-01-07 Thread Bruce Momjian
Brendan Jurd wrote: > On Sat, Sep 27, 2008 at 4:08 AM, Tom Lane wrote: > > "Alex Hunsaker" writes: > >> However that still leaves the original complaint around (at least IMHO): > > > >> select to_timestamp('AN', 'AM'); > >> ERROR: invalid AM/PM string > > > >> select to_timestamp('11:47 PM 27 Se

Re: [HACKERS] Meridiem markers (was: [BUGS] Incorrect "invalid AM/PM string" error from to_timestamp)

2009-01-07 Thread Brendan Jurd
On Thu, Jan 8, 2009 at 2:10 PM, Bruce Momjian wrote: > Brendan, did you ever complete this patch? > I didn't, no. I still intend on doing work in this area, but obviously it will have to be in the 8.5 cycle. Cheers, BJ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To m

Re: [HACKERS] Meridiem markers (was: [BUGS] Incorrect "invalid AM/PM string" error from to_timestamp)

2009-01-07 Thread Bruce Momjian
Brendan Jurd wrote: > On Thu, Jan 8, 2009 at 2:10 PM, Bruce Momjian wrote: > > Brendan, did you ever complete this patch? > > > > I didn't, no. I still intend on doing work in this area, but > obviously it will have to be in the 8.5 cycle. OK, what is the TODO? It is more than AM/PM, right? -

Re: [HACKERS] Null row vs. row of nulls in plpgsql

2009-01-07 Thread Bruce Momjian
I assume this is a TODO, right? --- Tom Lane wrote: > I looked a bit at the bug report here: > http://archives.postgresql.org/pgsql-bugs/2008-09/msg00164.php > > ISTM that the fundamental problem is that plpgsql doesn't dis

Re: [HACKERS] Re: [COMMITTERS] pgsql: Allow pg_regress to be run outside the build tree.

2009-01-07 Thread Bruce Momjian
Is this a TODO? --- Bjorn Munch wrote: > On 02/10 17.29, Peter Eisentraut wrote: > > Tom Lane wrote: > > >>I think the right fix would be to convert those .sql files to > > >>input/*.source files and have pg_regress substit

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

2009-01-07 Thread KaiGai Kohei
Alvaro Herrera wrote: KaiGai Kohei wrote: Could you deliver "bool validate" to the validate_string_relopt callback? In this specification, invoked callback cannot know whether it should really raise an error for invalid reloption, or not. Hmm, would it be better to not call the validation cal

Re: [HACKERS] Solve a problem of LC_TIME of windows.

2009-01-07 Thread ITAGAKI Takahiro
Magnus Hagander wrote: > ITAGAKI Takahiro wrote: > > Ok, wcsftime() requries both LC_TIME and LC_CTYPE are the same setting > > (at least encoding) on Windows. > > > Hmm. Is this actually cleaner than using the original method as > suggested? Because if I understand things right, that version d

Re: [HACKERS] text search patch status update?

2009-01-07 Thread Bruce Momjian
Sushant Sinha wrote: > The default headline generation function is complicated. It checks a lot > of cases to determine the best headline to be displayed. So Heikki's > examples just say that headline generation function may not be very > intuitive. However, his examples were not affected by the bu

Re: [HACKERS] text search patch status update?

2009-01-07 Thread Sushant Sinha
The default headline generation function is complicated. It checks a lot of cases to determine the best headline to be displayed. So Heikki's examples just say that headline generation function may not be very intuitive. However, his examples were not affected by the bug. Because of the bug, hlcov

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

2009-01-07 Thread Alvaro Herrera
KaiGai Kohei wrote: > Could you deliver "bool validate" to the validate_string_relopt callback? > In this specification, invoked callback cannot know whether it should > really raise an error for invalid reloption, or not. Hmm, would it be better to not call the validation callback at all if vali

Re: [HACKERS] New patch for Column-level privileges

2009-01-07 Thread Stephen Frost
KaiGai, * KaiGai Kohei (kai...@ak.jp.nec.com) wrote: > In addition, please note that expression_tree_walker() invokes > check_stack_depth() to prevent unexpected stack overflow. Ah, that's the part I was looking for and somehow overlooked. As long as we're checking at some point then I worry alo

Re: [HACKERS] text search patch status update?

2009-01-07 Thread Bruce Momjian
Uh, where are we on this? I see the same output in CVS HEAD as Heikki, and I assume he thought at least one of them was wrong. ;-) --- Heikki Linnakangas wrote: > Sushant Sinha wrote: > > Patch #2. I think this is a straig

Re: [HACKERS] Potential Join Performance Issue

2009-01-07 Thread Bruce Momjian
Has this been completed? TODO item? --- Lawrence, Ramon wrote: > > From: Tom Lane [mailto:t...@sss.pgh.pa.us] > > I was intending to do it the other way, actually. An extra field in > > HashPath hardly costs anything. The

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

2009-01-07 Thread KaiGai Kohei
Alvaro Herrera wrote: > Agreed, it seems better. The attached patch adds that, a macro you > originally requested and another one, and it also fixes an off-by-one > bug I discovered while testing all of this. I also attach the testing > patch I play with to check that this all works nicely. | **

Re: [HACKERS] New patch for Column-level privileges

2009-01-07 Thread KaiGai Kohei
Stephen Frost wrote: > KaiGai, > > * KaiGai Kohei (kai...@ak.jp.nec.com) wrote: >>> Is it possible to implement a walker function to pick up appeared >>> columns and to chain them on rte->cols_sel/cols_mod? >>> In this idea, columns in Query->targetList should be chained on >>> rte->cols_mod, and

Re: [HACKERS] Our CLUSTER implementation is pessimal

2009-01-07 Thread Bruce Momjian
Added to TODO: Improve CLUSTER performance by sorting to reduce random I/O * http://archives.postgresql.org/pgsql-hackers/2008-08/msg01371.php --- Gregory Stark wrote: > > One thing that's bee

Re: [HACKERS] parallel restore

2009-01-07 Thread Tom Lane
Andrew Dunstan writes: > Now, we could decide that we always want to do a safe truncate in a > parallel restore (i.e. if we have created the table in the same > restore), even if archive_mode is on. Then this switch would be > redundant, and we might avoid some confusion. I'm inclined to do tha

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

2009-01-07 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> What you seem to be supposing is that the only possible use pattern >> for these macros is a for-loop containing nothing but calls to one >> or another of the macros. > You're right. I initially wrote these macros to reduce the amount of > code in heap

Re: [HACKERS] Re: [COMMITTERS] pgsql: Adjust things so that the query_string of a cached plan and the

2009-01-07 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Tom Lane wrote: > >> Well, hold on a minute. I said that was an alternative to look at, > >> not that it was necessarily better. Can you define in words of one > >> syllable which queries will be exposed this way? I don't believe > >> it's "all of the

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

2009-01-07 Thread Alvaro Herrera
Tom Lane wrote: > Alvaro Herrera writes: > > Oh, the patch also removes a bunch of "continue" statements that, as far > > as I can tell, no longer work after the macros were wrapped in > > do { ... } while (0) :-( I don't see any nice way to put the facility > > back. > > Hmm ... I guess you cou

Re: [HACKERS] Re: [COMMITTERS] pgsql: Adjust things so that the query_string of a cached plan and the

2009-01-07 Thread Tom Lane
I wrote: > The good thing about using debug_query_string is that "the current > client query" is well-defined and easy to explain. I'm worried > whether using ActivePortal isn't likely to result in a rather > implementation-dependent behavior that changes from release to release. In fact, it *is*

Re: [HACKERS] reloptions and toast tables

2009-01-07 Thread Alvaro Herrera
Tom Lane wrote: > This is not only really ugly, but 100% toast-specific. The > qualified-name approach ("toast.autovacuum_enabled") has at least > a chance of being good for something else. Or just make it > toast_autovacuum_enabled and do the translation magic at some low > level in the stateme

Re: [HACKERS] Re: [COMMITTERS] pgsql: Adjust things so that the query_string of a cached plan and the

2009-01-07 Thread Tom Lane
Bruce Momjian writes: > Tom Lane wrote: >> Well, hold on a minute. I said that was an alternative to look at, >> not that it was necessarily better. Can you define in words of one >> syllable which queries will be exposed this way? I don't believe >> it's "all of them". > Well, if you call a p

Re: [HACKERS] parallel restore

2009-01-07 Thread Andrew Dunstan
Jaime Casanova wrote: Anyway i tried to run with --truncate-before-load and got a message about that should be necessary to run TRUNCATE CASCADE instead. Actually, this raises an interesting point. It doesn't seem safe to truncate before loading unless we have just created the table ear

Re: [HACKERS] Proposal: new border setting in psql

2009-01-07 Thread Bruce Momjian
D'Arcy J.M. Cain wrote: > On Wed, 7 Jan 2009 17:22:38 -0500 (EST) > Bruce Momjian wrote: > > D'Arcy J.M. Cain wrote: > > > So what have we decided about this suggestion. Should I submit the > > > patch or just forget about it? So far some people like it and some > > > people think that it is unn

Re: [HACKERS] Re: [COMMITTERS] pgsql: Adjust things so that the query_string of a cached plan and the

2009-01-07 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Tom Lane wrote: > >> The alternative I was envisioning was to have it look at the > >> ActivePortal's query string. However, if you prefer to define the > >> function as returning the current client query, it's fine as-is. > >> We should make sure the d

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Simon Riggs
On Wed, 2009-01-07 at 17:46 -0500, Tom Lane wrote: > Bruce Momjian writes: > >> * Simon Riggs (si...@2ndquadrant.com) wrote: > >>> I don't really understand this. Who can set up an inherited table > >>> structure but can't remember to turn on constraint_exclusion? > > > This new change also adds

Re: [HACKERS] Proposal: new border setting in psql

2009-01-07 Thread Tom Lane
"D'Arcy J.M. Cain" writes: > Bruce Momjian wrote: >> As I remember, no actual patch was posted for this. > There was. I am attaching it again in case there were any changes to > original files in the meantime. I think what Bruce meant to say is that this patch doesn't produce 100% spec-complia

Re: [HACKERS] Significant oversight in that #include-removal script

2009-01-07 Thread Bruce Momjian
Tom Lane wrote: > Alvaro Herrera writes: > > Bruce Momjian wrote: > >> The script certainly has no way to know it is missing an extern, and I > >> am not sure how I would even teach it that trick. > > > It would be easy if the compiler were to have an option to throw a > > warning when it finds a

Re: [HACKERS] Re: [COMMITTERS] pgsql: Adjust things so that the query_string of a cached plan and the

2009-01-07 Thread Tom Lane
Bruce Momjian writes: > Tom Lane wrote: >> The alternative I was envisioning was to have it look at the >> ActivePortal's query string. However, if you prefer to define the >> function as returning the current client query, it's fine as-is. >> We should make sure the documentation explains it lik

Re: [HACKERS] Proposal: new border setting in psql

2009-01-07 Thread D'Arcy J.M. Cain
On Wed, 7 Jan 2009 17:22:38 -0500 (EST) Bruce Momjian wrote: > D'Arcy J.M. Cain wrote: > > So what have we decided about this suggestion. Should I submit the > > patch or just forget about it? So far some people like it and some > > people think that it is unneccessary. No one so far has sugges

Re: [HACKERS] Significant oversight in that #include-removal script

2009-01-07 Thread Tom Lane
Alvaro Herrera writes: > Bruce Momjian wrote: >> The script certainly has no way to know it is missing an extern, and I >> am not sure how I would even teach it that trick. > It would be easy if the compiler were to have an option to throw a > warning when it finds a non-static variable that does

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Tom Lane
Bruce Momjian writes: >> * Simon Riggs (si...@2ndquadrant.com) wrote: >>> I don't really understand this. Who can set up an inherited table >>> structure but can't remember to turn on constraint_exclusion? > This new change also adds the constraint exclusion overhead only for > inhertance (by def

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Greg Smith
On Wed, 7 Jan 2009, Simon Riggs wrote: Who can set up an inherited table structure but can't remember to turn on constraint_exclusion? I thought the whole point of the WIP "Auto Partitioning Patch" was exactly to enable larger numbers of such people in the future. -- * Greg Smith gsm...@gre

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Bruce Momjian
Stephen Frost wrote: -- Start of PGP signed section. > Simon, > > * Simon Riggs (si...@2ndquadrant.com) wrote: > > I don't really understand this. Who can set up an inherited table > > structure but can't remember to turn on constraint_exclusion? That is > > the easiest part of the whole process b

Re: [HACKERS] Proposal: new border setting in psql

2009-01-07 Thread Bruce Momjian
D'Arcy J.M. Cain wrote: > So what have we decided about this suggestion. Should I submit the > patch or just forget about it? So far some people like it and some > people think that it is unneccessary. No one so far has suggested that > it would harm the system or people's use of it. I have gon

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Stephen Frost
Simon, * Simon Riggs (si...@2ndquadrant.com) wrote: > I don't really understand this. Who can set up an inherited table > structure but can't remember to turn on constraint_exclusion? That is > the easiest part of the whole process by a long way. Nobody has this > table design by accident, they've

Re: [HACKERS] Latest version of Hot Standby patch

2009-01-07 Thread Simon Riggs
On Wed, 2009-01-07 at 23:56 +0200, Heikki Linnakangas wrote: > Simon Riggs wrote: > > On Wed, 2009-01-07 at 15:43 +0200, Heikki Linnakangas wrote: > >> When there's no xids in the procarray, couldn't we just use > >> latestCompletedXid instead of calling ReadNewTransactionId()? > > > > latestCom

Re: [HACKERS] Significant oversight in that #include-removal script

2009-01-07 Thread Alvaro Herrera
Bruce Momjian wrote: > The script certainly has no way to know it is missing an extern, and I > am not sure how I would even teach it that trick. > > The example you saw was: > > src/include/optimizer/cost.h:55:extern bool constraint_exclusion; > src/backend/optimizer/util/plancat.c:46:bool

Re: [HACKERS] [BUGS] BUG #4186: set lc_messages does not work

2009-01-07 Thread Hiroshi Inoue
Magnus Hagander wrote: Hiroshi Inoue wrote: Magnus Hagander wrote: Hiroshi Inoue wrote: AFAICS there are 2 causes. 1. MSVC version of postgres is using a bad gettext module. 2. getenv() in mingw cannot see the result of putenv() in MSVC8.0. As for 1, we have to use another gettext module. I

Re: [HACKERS] Latest version of Hot Standby patch

2009-01-07 Thread Heikki Linnakangas
Simon Riggs wrote: On Wed, 2009-01-07 at 15:43 +0200, Heikki Linnakangas wrote: When there's no xids in the procarray, couldn't we just use latestCompletedXid instead of calling ReadNewTransactionId()? latestCompletedXid is protected by ProcArrayLock so not much difference between those two.

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Dimitri Fontaine
Le 7 janv. 09 à 22:21, Simon Riggs a écrit : On Wed, 2009-01-07 at 12:54 -0500, Tom Lane wrote: So, barring objections, I'll go make this happen. I don't really understand this. Who can set up an inherited table structure but can't remember to turn on constraint_exclusion? That is the easi

[HACKERS] Re: [COMMITTERS] pgsql: Adjust things so that the query_string of a cached plan and the

2009-01-07 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Tom Lane wrote: > >> We should take a second look at the usage of debug_query_string, > >> particularly the recently added current_query() SQL function. > > > I looked at the use of 'debug_query_string'; I didn't see how > > current_query() could acces

Re: [HACKERS] Solve a problem of LC_TIME of windows.

2009-01-07 Thread Hiroshi Inoue
Alvaro Herrera wrote: ITAGAKI Takahiro wrote: Hiroshi Inoue wrote: Seems LC_CTYPE and LC_TIME should be convertible even though we use wcsftime (which internally calls strftime?). Ok, wcsftime() requries both LC_TIME and LC_CTYPE are the same setting (at least encoding) on Windows. shouldn

Re: [HACKERS] Latest version of Hot Standby patch

2009-01-07 Thread Simon Riggs
On Wed, 2009-01-07 at 15:43 +0200, Heikki Linnakangas wrote: > Another annoyance I noticed while testing I'm sorry this has annoyed you. Thanks for testing. > the case of a lot of > subtransactions (overflowing the procarray cache) is that when you have > a transaction with a lot of subtrans

Re: [HACKERS] Significant oversight in that #include-removal script

2009-01-07 Thread Bruce Momjian
Tom Lane wrote: > I just noticed that optimizer/cost.h is not #include'd by plancat.c, > which is not too cool because the former has the extern declaration > for the constraint_exclusion global variable while the latter has > the actual definition. I didn't run it down in the CVS history to > mak

Re: [HACKERS] [BUGS] BUG #4186: set lc_messages does not work

2009-01-07 Thread Magnus Hagander
Hiroshi Inoue wrote: > Magnus Hagander wrote: >> Hiroshi Inoue wrote: AFAICS there are 2 causes. 1. MSVC version of postgres is using a bad gettext module. 2. getenv() in mingw cannot see the result of putenv() in MSVC8.0. As for 1, we have to use another gettext modul

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Bruce Momjian
Simon Riggs wrote: > > On Wed, 2009-01-07 at 12:54 -0500, Tom Lane wrote: > > > So, barring objections, I'll go make this happen. > > I don't really understand this. Who can set up an inherited table > structure but can't remember to turn on constraint_exclusion? That is > the easiest part of t

[HACKERS] Significant oversight in that #include-removal script

2009-01-07 Thread Tom Lane
I just noticed that optimizer/cost.h is not #include'd by plancat.c, which is not too cool because the former has the extern declaration for the constraint_exclusion global variable while the latter has the actual definition. I didn't run it down in the CVS history to make sure, but I imagine what

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Simon Riggs
On Wed, 2009-01-07 at 12:54 -0500, Tom Lane wrote: > So, barring objections, I'll go make this happen. I don't really understand this. Who can set up an inherited table structure but can't remember to turn on constraint_exclusion? That is the easiest part of the whole process by a long way. Nob

Re: [HACKERS] [BUGS] BUG #4186: set lc_messages does not work

2009-01-07 Thread Hiroshi Inoue
Magnus Hagander wrote: Hiroshi Inoue wrote: AFAICS there are 2 causes. 1. MSVC version of postgres is using a bad gettext module. 2. getenv() in mingw cannot see the result of putenv() in MSVC8.0. As for 1, we have to use another gettext module. I can provide it if requested. Yes, I think th

Re: [HACKERS] [COMMITTERS] pgsql: Adjust things so that the query_string of a cached plan and the

2009-01-07 Thread Tom Lane
Bruce Momjian writes: > Tom Lane wrote: >> We should take a second look at the usage of debug_query_string, >> particularly the recently added current_query() SQL function. > I looked at the use of 'debug_query_string'; I didn't see how > current_query() could access the more concise query strin

[HACKERS] Re: [COMMITTERS] pgsql: Adjust things so that the query_string of a cached plan and the

2009-01-07 Thread Bruce Momjian
Tom Lane wrote: > Log Message: > --- > Adjust things so that the query_string of a cached plan and the sourceText of > a portal are never NULL, but reliably provide the source text of the query. > It turns out that there was only one place that was really taking a short-cut, > which was the

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Hm, how about just 'partition'? Your argument is fair, and another > point in its favor is that someday we'll probably have an explicit > notion of partitioned tables and both the inheritance and union-view > approaches would become legacy methods. We'd ce

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Zeugswetter Andreas OSB sIT
> >> So, barring objections, I'll go make this happen. What do we want to > >> call the intermediate constraint_exclusion value? The first thing > >> that comes to mind is constraint_exclusion = 'child', but perhaps > >> someone has a better idea. > > > Not a huge fan of 'child' since it implie

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Josh Berkus
Tom, Hm, how about just 'partition'? Your argument is fair, and another point in its favor is that someday we'll probably have an explicit notion of partitioned tables and both the inheritance and union-view approaches would become legacy methods. We'd certainly want constraint exclusion to ap

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Tom Lane
Stephen Frost writes: > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> So, barring objections, I'll go make this happen. What do we want to >> call the intermediate constraint_exclusion value? The first thing >> that comes to mind is constraint_exclusion = 'child', but perhaps >> someone has a better

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Josh Berkus
So, barring objections, I'll go make this happen. What do we want to call the intermediate constraint_exclusion value? The first thing that comes to mind is constraint_exclusion = 'child', but perhaps someone has a better idea. This is terrific. I've actually been turning c_e on and off by

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Actually, it looks like it'd be totally trivial to implement: just check > rel->reloptkind == RELOPT_OTHER_MEMBER_REL to detect whether we're > looking at an inheritance child. (Actually this would also succeed > for a UNION ALL member, but that's good beca

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Robert Haas
> So, barring objections, I'll go make this happen. What do we want to > call the intermediate constraint_exclusion value? The first thing > that comes to mind is constraint_exclusion = 'child', but perhaps > someone has a better idea. "inherit"? ...Robert -- Sent via pgsql-hackers mailing li

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Bruce Momjian
Tom Lane wrote: > I wrote: > > I just thought of a possible compromise though: maybe we could invent an > > intermediate constraint_exclusion setting that makes the checks only for > > inheritance-child tables. This would avoid the overhead for simple > > queries and still get the benefit for most

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Tom Lane
I wrote: > I just thought of a possible compromise though: maybe we could invent an > intermediate constraint_exclusion setting that makes the checks only for > inheritance-child tables. This would avoid the overhead for simple > queries and still get the benefit for most of the cases where it's >

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Joshua D. Drake
On Wed, 2009-01-07 at 12:26 -0500, Robert Haas wrote: > > ~ 10% slowdown on trivial queries will get noticed. > > I just thought of a possible compromise though: maybe we could invent an > > intermediate constraint_exclusion setting that makes the checks only for > > inheritance-child tables. Thi

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Robert Haas
> ~ 10% slowdown on trivial queries will get noticed. Agreed. > I just thought of a possible compromise though: maybe we could invent an > intermediate constraint_exclusion setting that makes the checks only for > inheritance-child tables. This would avoid the overhead for simple > queries and s

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Tom Lane
"Joshua D. Drake" writes: > On Wed, 2009-01-07 at 10:59 -0500, Tom Lane wrote: >> In installations whose average query is significantly heavier-weight >> than this one, and where constraint exclusion actually improves matters >> on a routine basis, it makes sense to turn it on by default. I will

Re: [HACKERS] Multiplexing SUGUSR1

2009-01-07 Thread Bruce Momjian
Greg Stark wrote: > > On 7 Jan 2009, at 09:47, Bruce Momjian wrote: > > > Heikki Linnakangas wrote: > >> It's required by the sync replication patch, but has no value > >> otherwise. > > > > Well, we have talked about allowing more signalling long-term, and > > this > > would accomplish that

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Joshua D. Drake
On Wed, 2009-01-07 at 10:59 -0500, Tom Lane wrote: > "Robert Haas" writes: > > On Wed, Jan 7, 2009 at 12:15 AM, Bruce Momjian wrote: > >> Based on the comments below, are we sure constraint_exclusion still > >> needs to be a parameter and can't be on by default? > In installations whose average

Re: [HACKERS] Multiplexing SUGUSR1

2009-01-07 Thread Greg Stark
On 7 Jan 2009, at 09:47, Bruce Momjian wrote: Heikki Linnakangas wrote: It's required by the sync replication patch, but has no value otherwise. Well, we have talked about allowing more signalling long-term, and this would accomplish that independent of the sync replication, so we might

Re: [HACKERS] Solve a problem of LC_TIME of windows.

2009-01-07 Thread Hiroshi Saito
I've also thought a similar implementation but there seems a problem of efficiency. As far as I see wcsftime() is almost = strftime() + mbstowcs() and so using strftime() is effective at least for the following cases. 1) LC_CTIME is "C". 2) LC_CTYPE != C and the database encoding != UTF-8. In th

Re: [HACKERS] float8 strtod weirdness

2009-01-07 Thread Tom Lane
Sam Mason writes: > This example does seem to be confounded by PG's somewhat eccentric type > system. Things would "just work" (in this case, and there have been > other cases recently[1]) if type decisions could be delayed slightly. There's been previous speculation about having numeric literal

Re: [HACKERS] about truncate

2009-01-07 Thread David Fetter
On Wed, Jan 07, 2009 at 11:17:46AM -0500, Tom Lane wrote: > Peter Eisentraut writes: > > [ good summary ] > > +1 for making TRUNCATE and LOCK support ONLY. I don't care much > about ALTER TABLE SET SCHEMA, but perhaps there's a use-case for > recursion on that. We should stay away from recursiv

Re: [HACKERS] Solve a problem of LC_TIME of windows.

2009-01-07 Thread Hiroshi Inoue
ITAGAKI Takahiro wrote: Hiroshi Inoue wrote: Seems LC_CTYPE and LC_TIME should be convertible even though we use wcsftime (which internally calls strftime?). Ok, wcsftime() requries both LC_TIME and LC_CTYPE are the same setting (at least encoding) on Windows. The attached patch is an updat

Re: [HACKERS] float8 strtod weirdness

2009-01-07 Thread Sam Mason
On Wed, Jan 07, 2009 at 09:56:48AM -0500, Tom Lane wrote: > "Nikhil Sontakke" writes: > > Consider the following with latest CVS sources: > > > postgres=# create table temp(val float4); > > CREATE TABLE > > postgres=# insert into temp values (415.1); > > INSERT 0 1 > > postgres=# select * from te

Re: [HACKERS] about truncate

2009-01-07 Thread Tom Lane
Peter Eisentraut writes: > [ good summary ] +1 for making TRUNCATE and LOCK support ONLY. I don't care much about ALTER TABLE SET SCHEMA, but perhaps there's a use-case for recursion on that. We should stay away from recursive CREATE INDEX for the moment --- for one thing, you'd have to invent

Re: [HACKERS] [BUGS] BUG #4186: set lc_messages does not work

2009-01-07 Thread Hiroshi Inoue
Magnus Hagander wrote: Hiroshi Inoue wrote: Hiroshi Inoue wrote: Where are we on this? AFAICS there are 2 causes. 1. MSVC version of postgres is using a bad gettext module. 2. getenv() in mingw cannot see the result of putenv() in MSVC8.0. As for 1, we have to use another gettext module. I

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Tom Lane
"Robert Haas" writes: > On Wed, Jan 7, 2009 at 12:15 AM, Bruce Momjian wrote: >> Based on the comments below, are we sure constraint_exclusion still >> needs to be a parameter and can't be on by default? > The benchmarking we did to determine the impact of raising > default_statistics_target was

Re: [HACKERS] about truncate

2009-01-07 Thread Peter Eisentraut
Tom Lane wrote: I note though that we have a lot of other non-recursive maintenance operations (CLUSTER, some variants of ALTER TABLE, etc) ... are we going to try to make them all recursive? Here is the current line-up: command supports ONLY ALTER TABLE all other acti

Re: [HACKERS] Warning about the 8.4 release

2009-01-07 Thread Bruce Momjian
Pavan Deolasee wrote: > On Wed, Jan 7, 2009 at 1:23 AM, Bruce Momjian wrote: > > Tom Lane wrote: > > > > >> As-is, this list is completely unhelpful. It looks like you've dumped > >> all your unread mail onto this page and asked the rest of us to sort it > >> for you. I'm sorry, but I've got ot

Re: [HACKERS] Warning about the 8.4 release

2009-01-07 Thread Bruce Momjian
Zdenek Kotala wrote: > > Robert Haas p??e v ?t 06. 01. 2009 v 12:38 -0500: > > > - WIP: Page space reservation (pgupgrade) is an idea that was > > rejected, IIRC. pg_upgrade project status is more of the same thing. > > there are several more pg_upgrade related items on here as well, most > > of

Re: [HACKERS] incoherent view of serializable transactions

2009-01-07 Thread Kevin Grittner
>>> Peter Eisentraut wrote: > Kevin Grittner wrote: >>> "is a natural consequence of the fact" --- There is nothing >>> natural about any of this. Why is it a consequence and how? >> >> How could you possibly get any of those phenomena if there are no >> concurrent transactions? > > I see wha

Re: [HACKERS] float8 strtod weirdness

2009-01-07 Thread Kenneth Marshall
On Wed, Jan 07, 2009 at 08:12:44PM +0530, Nikhil Sontakke wrote: > Hi, > > Consider the following with latest CVS sources: > > postgres=# create table temp(val float4); > CREATE TABLE > postgres=# insert into temp values (415.1); > INSERT 0 1 > postgres=# select * from temp where val = 415.1; >

Re: [HACKERS] float8 strtod weirdness

2009-01-07 Thread Tom Lane
"Nikhil Sontakke" writes: > Consider the following with latest CVS sources: > postgres=# create table temp(val float4); > CREATE TABLE > postgres=# insert into temp values (415.1); > INSERT 0 1 > postgres=# select * from temp where val = 415.1; Anybody who works with float arithmetic can tell yo

Re: [HACKERS] float8 strtod weirdness

2009-01-07 Thread David Fetter
On Wed, Jan 07, 2009 at 08:12:44PM +0530, Nikhil Sontakke wrote: > Hi, > > Consider the following with latest CVS sources: > > postgres=# create table temp(val float4); > CREATE TABLE > postgres=# insert into temp values (415.1); > INSERT 0 1 > postgres=# select * from temp where val = 415.1; >

[HACKERS] float8 strtod weirdness

2009-01-07 Thread Nikhil Sontakke
Hi, Consider the following with latest CVS sources: postgres=# create table temp(val float4); CREATE TABLE postgres=# insert into temp values (415.1); INSERT 0 1 postgres=# select * from temp where val = 415.1; val - (0 rows) !? The reason seems to be that 415.1 ends up being treated as a

Re: [HACKERS] Multiplexing SUGUSR1

2009-01-07 Thread Bruce Momjian
Heikki Linnakangas wrote: > It's required by the sync replication patch, but has no value otherwise. Well, we have talked about allowing more signalling long-term, and this would accomplish that independent of the sync replication, so we might want to revisit this someday if it isn't included in s

Re: [HACKERS] Significantly larger toast tables on 8.4?

2009-01-07 Thread Gregory Maxwell
On Fri, Jan 2, 2009 at 5:48 PM, Martijn van Oosterhout wrote: > So you compromise. You split the data into say 1MB blobs and compress > each individually. Then if someone does a substring at offset 3MB you > can find it quickly. This barely costs you anything in the compression > ratio mostly. > >

Re: [HACKERS] reducing statistics write overhead

2009-01-07 Thread Tom Lane
Martin Pihlak writes: > As I understand the autovacuum workers need up to date stats to minimize the > risk of re-vacuuming a table (in case it was already vacuumed by someone > else). I never understood why autovacuum should need a particularly short fuse on the stats file age to start with. I

Re: [HACKERS] New patch for Column-level privileges

2009-01-07 Thread Stephen Frost
KaiGai, * KaiGai Kohei (kai...@ak.jp.nec.com) wrote: >> Is it possible to implement a walker function to pick up appeared >> columns and to chain them on rte->cols_sel/cols_mod? >> In this idea, columns in Query->targetList should be chained on >> rte->cols_mod, and others should be chained on rte

Re: [HACKERS] Proposed Patch to Improve Performance of Multi-BatchHash Join for Skewed Data Sets

2009-01-07 Thread Joshua Tolley
On Tue, Jan 06, 2009 at 11:49:57PM -0500, Robert Haas wrote: > Josh / eggyknap - > > Can you rerun your performance tests with this version of the patch? > > ...Robert Will do, as soon as I can. signature.asc Description: Digital signature

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

2009-01-07 Thread Tom Lane
Alvaro Herrera writes: > Oh, the patch also removes a bunch of "continue" statements that, as far > as I can tell, no longer work after the macros were wrapped in > do { ... } while (0) :-( I don't see any nice way to put the facility > back. Hmm ... I guess you could make the wrapping be "if (.

  1   2   >