Re: [HACKERS] Visibility map and freezing

2009-01-07 Thread Jeff Davis
On Wed, 2009-01-07 at 09:34 +0200, Heikki Linnakangas wrote: > autovacuum_freeze_max_age -> autovacuum_freeze_scan_age > vacuum_freeze_max_age -> vacuum_freeze_scan_age > vacuum_freeze_min_age -> vacuum_freeze_tuple_age > > *_scan_age settings control when the table is fully scanned to freeze > t

Re: [HACKERS] SQL/MED dummy vs postgresql wrapper

2009-01-07 Thread Martin Pihlak
Peter Eisentraut wrote: > Eventually, the postgresql_fdw library should contain an implementation that > actually connects to a PostgreSQL database and does useful things (dblink > replacement, basically). Right now, we are proposing to use it as connection > information storage. But I think

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

2009-01-07 Thread Markus Wanner
Hi, KaiGai Kohei wrote: > The attached patch is a proof of the concept. Awesome! I'll try to review during the day. > I strongly want the Column-level privileges to be get merged > as soon as possible, so I don't spare any possible assist > for his works. +1 Can you quickly comment on CLP vs.

Re: [HACKERS] PLUGINS Functionlity in Win32 build scripts

2009-01-07 Thread Peter Eisentraut
Tom Lane wrote: This is actually in direct contradiction to the original intent of the plugins/ subdirectory, which was that it only contain libraries that the local administrator had decided to consider safe and put there manually. Since the normal superuser-only restrictions for library loading

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

2009-01-07 Thread KaiGai Kohei
Markus Wanner wrote: Hi, KaiGai Kohei wrote: The attached patch is a proof of the concept. Awesome! I'll try to review during the day. I strongly want the Column-level privileges to be get merged as soon as possible, so I don't spare any possible assist for his works. +1 Can you quickly

Re: [HACKERS] Latest version of Hot Standby patch

2009-01-07 Thread Heikki Linnakangas
Simon Riggs wrote: * btree VACUUM code - must scan every block of index (v6) Need to unlock them too. --- a/src/backend/access/nbtree/nbtxlog.c +++ b/src/backend/access/nbtree/nbtxlog.c @@ -472,7 +472,7 @@ btree_xlog_vacuum(XLogRecPtr lsn, XLogRecord *record) xlrec = (xl_btree_vacuum

Re: [HACKERS] version() output vs. 32/64 bits

2009-01-07 Thread Peter Eisentraut
Greg Smith wrote: I think I'm now up to having wrote something to break apart the output from version() into individual fields for 3 different companies. If you're got a bunch of database servers on a network, it seems inevitable that eventually you'll end up collecting information about them

Re: [HACKERS] Latest version of Hot Standby patch

2009-01-07 Thread Simon Riggs
On Wed, 2009-01-07 at 11:35 +0200, Heikki Linnakangas wrote: > Simon Riggs wrote: > > * btree VACUUM code - must scan every block of index (v6) > > Need to unlock them too. Oh c**p. Thanks. -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training, Services and Support -- Sent vi

Re: [HACKERS] HAVE_FSEEKO for WIN32

2009-01-07 Thread Magnus Hagander
Bruce Momjian wrote: > Andrew Dunstan wrote: >> Cleaning up the parallel restore patch I came across a question I might >> have asked before, but one which in any case I worked around: >> >> Why do we carefully define fseeko() for WIN32 but then not define >> HAVE_FSEEKO, which makes doing the fo

Re: [HACKERS] reducing statistics write overhead

2009-01-07 Thread Martin Pihlak
Alvaro Herrera wrote: > Tom Lane escribió: > >> (In fact, maybe this patch ought to include some sort of maximum update >> rate tunable? The worst case behavior could actually be WORSE than now.) > > Some sort of "if stats were requested in the last 500 ms, just tell the > requester to read the

Re: [HACKERS] hist boundary duplicates bug in head and 8.3

2009-01-07 Thread Simon Riggs
On Tue, 2009-01-06 at 18:40 -0500, Tom Lane wrote: > "Nathan Boley" writes: > >> I don't think this is a bug. > > > hmmm... Well, I assumed it was a bug from a comment in analyze. > > > From ( near ) line 2130 in analyze.c > > > * least 2 instances in the sample. Also, we won't suppress valu

Re: [HACKERS] hist boundary duplicates bug in head and 8.3

2009-01-07 Thread Nathan Boley
> Surely the most important point in the OP was that ineqsel does not > correctly binary search in the presence of duplicates. > It would have been if I were correct :-( . Looking at it again, that was from a bug in my code. Thanks for your time, and sorry about the noise. -Nathan -- Sent via

Re: [HACKERS] Warning about the 8.4 release

2009-01-07 Thread Zdenek Kotala
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 which are probably unnecessary. sp

Re: [HACKERS] Latest version of Hot Standby patch

2009-01-07 Thread Heikki Linnakangas
There's still something wrong with the way subtransactions are handled. I got: postgres=# SELECT * FROM foo; ERROR: could not access status of transaction 118649 DETAIL: Could not open file "pg_subtrans/0001": No such file or directory. in the standby after some testing. I created a lot of s

Re: [HACKERS] new libpq SSL connection option

2009-01-07 Thread Magnus Hagander
Alex Hunsaker wrote: > On Fri, Jan 2, 2009 at 03:13, Magnus Hagander wrote: >> Andrew Chernow wrote: >>> Yes, the homedir variable is used again later in the function. homedir >>> could be invalid since pqGetHomeDirectory might not get called. Maybe >>> something like below would do the trick: >

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Robert Haas
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 pretty interesting and informa

Re: [HACKERS] Latest version of Hot Standby patch

2009-01-07 Thread Simon Riggs
On Wed, 2009-01-07 at 13:18 +0200, Heikki Linnakangas wrote: > There's still something wrong with the way subtransactions are handled. > I got: > > postgres=# SELECT * FROM foo; > ERROR: could not access status of transaction 118649 > DETAIL: Could not open file "pg_subtrans/0001": No such fil

Re: [HACKERS] Latest version of Hot Standby patch

2009-01-07 Thread Simon Riggs
On Wed, 2008-12-17 at 15:21 +, Simon Riggs wrote: > http://wiki.postgresql.org/wiki/Hot_Standby > > now contains a link to latest version of this patch. v6b now available via Wiki, fixes 5 reported issues. -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training, Services and Su

Re: [HACKERS] Including kerberos realm

2009-01-07 Thread Magnus Hagander
Tom Lane wrote: > Magnus Hagander writes: >> Alvaro Herrera wrote: >>> Not that this affects me in any way, but should there be a GUC variable >>> to set the default behavior system-wide? > >> I thought about that, but I don't want to add extra gucs without a good >> reason. You'd typically not h

Re: [HACKERS] dblink vs SQL/MED - security and implementation details

2009-01-07 Thread Peter Eisentraut
Martin Pihlak wrote: Usually it would have been the server owner who created those user mappings in the first place -- so the passwords are already known to him/her. Of course it is possible to create the mappings first and later change the ownership of the server, thus exposing the passwords to

Re: [HACKERS] dblink vs SQL/MED - security and implementation details

2009-01-07 Thread Peter Eisentraut
Joe Conway wrote: I don't see anything documented under GRANT which controls privileges on a mapping, and the USAGE on a server only controls what a user can see by query. I assume that if the superuser creates a mapping from user foo to server bar, foo can still use bar via the mapping, even i

[HACKERS] error code 25001

2009-01-07 Thread Tatsuo Ishii
Error code 25001 is used for "SET TRANSACTION ISOLATION LEVEL must be called before any query" when it's an ERROR. However, it also means "there is already a transaction in progress" when it's a NOTICE. So we cannot distinguish them just by checking the error code. So my question is, an error cod

Re: [HACKERS] incoherent view of serializable transactions

2009-01-07 Thread Peter Eisentraut
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 what you mean now, but you could write out that logi

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

2009-01-07 Thread Alvaro Herrera
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't thi

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

2009-01-07 Thread Magnus Hagander
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 p

Re: [HACKERS] error code 25001

2009-01-07 Thread Tom Lane
Tatsuo Ishii writes: > Error code 25001 is used for "SET TRANSACTION ISOLATION LEVEL must be > called before any query" when it's an ERROR. However, it also means > "there is already a transaction in progress" when it's a NOTICE. > So we cannot distinguish them just by checking the error code. >

Re: [HACKERS] Do we still need constraint_exclusion?

2009-01-07 Thread Stephen Frost
* Bruce Momjian (br...@momjian.us) wrote: > Based on the comments below, are we sure constraint_exclusion still > needs to be a parameter and can't be on by default? I'd like to get rid of the option and have it on by default. It's a bit frustrating to have to remember to turn it on with new inst

Re: [HACKERS] Latest version of Hot Standby patch

2009-01-07 Thread Heikki Linnakangas
Another annoyance I noticed while testing the case of a lot of subtransactions (overflowing the procarray cache) is that when you have a transaction with a lot of subtransactions open, getting the initial snapshot fails, and the standby doesn't open for read-only queries. Normally, GetRunningT

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

2009-01-07 Thread Alvaro Herrera
KaiGai Kohei wrote: > Alvaro Herrera wrote: >>> 3. Why the "StdRdOptions lopts;" is necessary? >> >> It is like this because the autovacuum patch adds a few more options and >> I want to have the chance to not allocate the part belonging to >> autovacuum when none of the options are present. > > W

Re: [HACKERS] HAVE_FSEEKO for WIN32

2009-01-07 Thread Andrew Dunstan
Magnus Hagander wrote: Bruce Momjian wrote: Andrew Dunstan wrote: Cleaning up the parallel restore patch I came across a question I might have asked before, but one which in any case I worked around: Why do we carefully define fseeko() for WIN32 but then not define HAVE_FSEEKO, whi

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

2009-01-07 Thread Magnus Hagander
Hiroshi Inoue wrote: > Hiroshi Inoue wrote: >> Hi, >> >> I posted a patch 18 days ago but have got no responce. >> Anyway I've simplified the patch by using an appropriate >> gettext module. >> >> Hiroshi Inoue wrote: >>> Bruce Momjian wrote: Tom Lane wrote: > Magnus Hagander writes: >>>

Re: [HACKERS] HAVE_FSEEKO for WIN32

2009-01-07 Thread Magnus Hagander
Andrew Dunstan wrote: > > > Magnus Hagander wrote: >> Bruce Momjian wrote: >> >>> Andrew Dunstan wrote: >>> Cleaning up the parallel restore patch I came across a question I might have asked before, but one which in any case I worked around: Why do we carefully define fs

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 (.

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] 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] 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] 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] 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

[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] 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; >

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 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] 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] 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] 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] 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] 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] [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] 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] 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] 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] 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] 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] 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] 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] 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 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 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] 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 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 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 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 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 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 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 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
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 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 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

[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] [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

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] 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

[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 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

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] 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] 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] 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

[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] 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

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] [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] 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] 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] 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] 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 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] 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 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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

  1   2   >