Re: [HACKERS] Mostly Harmless: Welcoming our C++ friends

2008-12-14 Thread James Mansion
Kurt Harriman wrote: B) let the build farm do a nightly build with a C++ compiler merely as a test to verify that no C++ compilation errors are introduced, but continue to use C 'officially' for builds and releases; or This was the intent of my suggestion. There can be

Re: [HACKERS] WIP: default values for function parameters

2008-12-14 Thread David E. Wheeler
On Dec 14, 2008, at 6:55 AM, Tom Lane wrote: The whole relabeling thing seems like a seriously silly idea. I wouldn't say that it's silly. What I do say is that it makes no sense to imagine that it would be used at the same time as named parameters. The entire point of something like

Re: [HACKERS] Sync Rep: First Thoughts on Code

2008-12-14 Thread Mark Mielke
Robert Haas wrote: On Sat, Dec 13, 2008 at 1:29 PM, Tom Lane t...@sss.pgh.pa.us wrote: We won't call it anything, because we never will or can implement that. See the theory of relativity: the notion of exactly simultaneous events OK, fine. I'll be more precise. I think we need to

Re: [HACKERS] Sync Rep: Second thoughts

2008-12-14 Thread Emmanuel Cecchet
Hi all, I just wanted to point out a detail that I have not seen mentioned in this thread (but I might have skipped some messages and I apologize in advance if this is a duplicate). What the application is going to see is a failure when the postmaster it is connected to is going down. If

Re: [HACKERS] Sync Rep: First Thoughts on Code

2008-12-14 Thread Emmanuel Cecchet
Robert Haas wrote: The term of art for making sure that transactions committed on the primary are visible on the secondary seems to be one-copy serializability (see, for example, a Google Books search on that term). Not exactly. 1-copy-serializability which is the standard for multi-master

[HACKERS] upper()/lower() truncates the result under Japanese Windows

2008-12-14 Thread Hiroshi Inoue
Hi, Upper(), lower() or initcap() function truncates the result under Japanese Windows with e.g. the server encoding=UTF-8 and the LC_CTYPE setting Japanese_japan.932 . Below is an example. $ psql psql (8.4devel) Type help for help. inoue=# \encoding sjis inoue=# show server_encoding;

Re: [HACKERS] Looking for someone with MinGW

2008-12-14 Thread Michael Meskes
Hello, Could anyone with a MinGW system please run the ecpg regression suite including tcp checks for the current CVS HEAD for me? I ran the test but got a segfault. I hope it can help you. Not really I'm afraid. Is there any way you could send me a backtrace? I guess this has to be

Re: [HACKERS] Stats target increase vs compute_tsvector_stats()

2008-12-14 Thread Jan Urbański
Tom Lane wrote: I started making the changes to increase the default and maximum stats targets 10X, as I believe was agreed to in this thread: http://archives.postgresql.org/pgsql-hackers/2008-12/msg00386.php I came across this bit in ts_typanalyze.c: /* We want statistic_target * 100

Re: [HACKERS] visibility map and reltuples

2008-12-14 Thread Heikki Linnakangas
Ned T. Crigler wrote: It appears that the visibility map patch is causing pg_class.reltuples to be set improperly after a vacuum. For example, it is set to 0 if the map indicated that no pages in the heap needed to be scanned. Perhaps reltuples should not be updated unless every page was

Re: [HACKERS] Sync Rep: First Thoughts on Code

2008-12-14 Thread Simon Riggs
On Sun, 2008-12-14 at 13:31 +0900, Tatsuo Ishii wrote: The point here is that synchronous replication, at least to some people, is going to imply that the user-visible states of the two copies are consistent. To other people, it is going to imply that committed transactions will never be

Re: [HACKERS] Looking for someone with MinGW

2008-12-14 Thread Andrew Dunstan
Michael Meskes wrote: Hello, Could anyone with a MinGW system please run the ecpg regression suite including tcp checks for the current CVS HEAD for me? I ran the test but got a segfault. I hope it can help you. Not really I'm afraid. Is there any way you could send me a

Re: [HACKERS] cvs head initdb hangs on unixware

2008-12-14 Thread ohp
Tom, On Wed, 10 Dec 2008, Tom Lane wrote: Date: Wed, 10 Dec 2008 12:17:18 -0500 From: Tom Lane t...@sss.pgh.pa.us To: o...@pyrenet.fr Cc: Heikki Linnakangas heikki.linnakan...@enterprisedb.com, Zdenek Kotala zdenek.kot...@sun.com, pgsql-hackers list pgsql-hackers@postgresql.org Subject:

Re: [HACKERS] upper()/lower() truncates the result under Japanese Windows

2008-12-14 Thread Tom Lane
Hiroshi Inoue in...@tpf.co.jp writes: Upper(), lower() or initcap() function truncates the result under Japanese Windows with e.g. the server encoding=UTF-8 and the LC_CTYPE setting Japanese_japan.932 . Hmm, I guess that makes sense, since the LC_CTYPE implies an encoding other than UTF-8;

Re: [HACKERS] Windowing Function Patch Review - Standard Conformance

2008-12-14 Thread Hitoshi Harada
2008/12/8 Heikki Linnakangas heikki.linnakan...@enterprisedb.com: That said, we should try to get this committed ASAP, so I think we can live without the trimming for 8.4. Just let me know. What is the current status... Is there something for me to do now? Or only wating? Regards, --

Re: [HACKERS] parallel restore vs. windows

2008-12-14 Thread Andrew Dunstan
Andrew Chernow wrote: If it previously worked without threads, than in theory a deep copy of the thread_arg should fix the core dump; especially if the non-windows fork() method works with this patch. Maybe you can get away with only copying some of the members (trial-n-error), I don't

Re: [HACKERS] Sync Rep: First Thoughts on Code

2008-12-14 Thread Mark Mielke
Simon Riggs wrote: I am truly lost to understand why the *name* synchronous replication causes so much discussion, yet nobody has discussed what they would actually like the software to *do* (this being a software discussion list...). AFAICS we can make the software behave like *any* of the

Re: [HACKERS] Sync Rep: First Thoughts on Code

2008-12-14 Thread Robert Haas
We can make the reply to a commit message when any of the following events have occurred 1. We sent the message to standby 2. We received the message on standby 3. We wrote the WAL to the WAL file 4. We fsync'd the WAL file 5. We CRC checked the WAL commit record 6. We applied the WAL

Re: [HACKERS] [SQL] array_to_string(anyarray, text) that was working in 8.1 is not working in 8.3

2008-12-14 Thread Tom Lane
I wrote: While we could probably revert just enough of the changes to enforce_generic_type_consistency to allow this case again, I wonder just how safe that'd really be. It would amount to expecting that functions that take anyarray but don't take or return anyelement to not only work on any

[HACKERS] Re: [SQL] array_to_string(anyarray, text) that was working in 8.1 is not working in 8.3

2008-12-14 Thread Corey Horton
Is there any known workaround to get this the elements of the histogram_bounds anyarray in 8.3.5. If not, when might I expect a fix? Just trying to plan our testing/release schedule of rolling out to 8.3 around this problem. Thanks, Corey Tom Lane wrote: I wrote: While we could

Re: [HACKERS] Sync Rep: First Thoughts on Code

2008-12-14 Thread Mark Mielke
Mark Mielke wrote: Forget replication - even for the exact same server - I don't expect that if I commit from one session, I will be able to see the change immediately from my other session or a new session that I just opened. Perhaps this is often stable to rely on this, and it is useful for

Re: [HACKERS] Re: [SQL] array_to_string(anyarray, text) that was working in 8.1 is not working in 8.3

2008-12-14 Thread Tom Lane
Corey Horton chort...@austin.rr.com writes: Is there any known workaround to get this the elements of the histogram_bounds anyarray in 8.3.5. It appears that you could explicitly cast to text and thence to text[]: select array_to_string(histogram_bounds::text::text[], '-') from ... but this

Re: [HACKERS] WIP: default values for function parameters

2008-12-14 Thread Pavel Stehule
2008/12/14 Greg Stark st...@enterprisedb.com: On Sun, Dec 14, 2008 at 1:42 AM, Robert Haas robertmh...@gmail.com wrote: What if relabeling support were to spread some more? The only example I can think of besides XML is JSON. There might be a few more. Basically, relabelling is a handy

Re: [HACKERS] Sync Rep: First Thoughts on Code

2008-12-14 Thread Heikki Linnakangas
Mark Mielke wrote: Mark Mielke wrote: Forget replication - even for the exact same server - I don't expect that if I commit from one session, I will be able to see the change immediately from my other session or a new session that I just opened. Perhaps this is often stable to rely on this,

Re: [HACKERS] So, why shouldn't SET CONSTRAINTS set a transaction snapshot?

2008-12-14 Thread Alvaro Herrera
Tom Lane wrote: Alvaro Herrera alvhe...@commandprompt.com writes: Tom Lane wrote: 1. Always set a snapshot for SET CONSTRAINTS. This is a minus-one-liner --- just remove it from the exclusion list in PortalRunUtility. 2. Have it set a snapshot only if it finds pending trigger events

Re: [HACKERS] So, why shouldn't SET CONSTRAINTS set a transaction snapshot?

2008-12-14 Thread Alvaro Herrera
Alvaro Herrera wrote: I don't like it just because it's another kludge in the way we set up ActiveSnapshot. I think it would be better if we were simplifying that code, not adding more kludges. I just saw your commits. It's nice that adding this kludge helped remove a previous one :-) --

Re: [HACKERS] Sync Rep: First Thoughts on Code

2008-12-14 Thread Dimitri Fontaine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Le 14 déc. 08 à 16:48, Simon Riggs a écrit : I am truly lost to understand why the *name* synchronous replication causes so much discussion, yet nobody has discussed what they would actually like the software to *do* (this being a software

[HACKERS] Bug in information_schema: FK constraint is defined as against referenced table only

2008-12-14 Thread Josh Berkus
Folks, I've been trying to extract some information about referencing tables from information_schema, and discovering that it isn't there. For example, take the following FK, from table Errors to table Files: CONSTRAINT errors_file_fkey FOREIGN KEY (file) REFERENCES files (id) MATCH

Re: [HACKERS] Block-level CRC checks

2008-12-14 Thread Jaime Casanova
On Thu, Nov 13, 2008 at 1:00 PM, Alvaro Herrera alvhe...@commandprompt.com This patch is also skipping pd_special and the unused area of the page. v11 doesn't apply to cvs head anymore -- Atentamente, Jaime Casanova Soporte y capacitación de PostgreSQL Asesoría y desarrollo de sistemas

Re: [HACKERS] Block-level CRC checks

2008-12-14 Thread Alvaro Herrera
Jaime Casanova wrote: On Thu, Nov 13, 2008 at 1:00 PM, Alvaro Herrera alvhe...@commandprompt.com This patch is also skipping pd_special and the unused area of the page. v11 doesn't apply to cvs head anymore I'm not currently working on this patch, sorry. -- Alvaro Herrera

Re: [HACKERS] Block-level CRC checks

2008-12-14 Thread Josh Berkus
Alvaro Herrera wrote: Jaime Casanova wrote: On Thu, Nov 13, 2008 at 1:00 PM, Alvaro Herrera alvhe...@commandprompt.com This patch is also skipping pd_special and the unused area of the page. v11 doesn't apply to cvs head anymore I'm not currently working on this patch, sorry. Should we

Re: [HACKERS] Sync Rep: First Thoughts on Code

2008-12-14 Thread Ron Mayer
Robert Haas wrote: We can make the reply to a commit message when any of the following events have occurred 1. We sent the message to standby 2. We received the message on standby 3. We wrote the WAL to the WAL file 4. We fsync'd the WAL file 5. We CRC checked the WAL commit record 6. We

Re: [HACKERS] Sync Rep: First Thoughts on Code

2008-12-14 Thread Mark Mielke
Heikki Linnakangas wrote: Mark Mielke wrote: FYI: I haven't been able to prove this. Multiple sessions running on my dual-core CPU seem to be able to see the latest commits before they begin executing. Am I wrong about this? Does PostgreSQL provide a intentional guarantee that a commit from

Re: [HACKERS] Sync Rep: First Thoughts on Code

2008-12-14 Thread Greg Stark
When the database says the data is committed it has to mean the data is really committed. Imagine if you looked at a bank account balance after withdrawing all the money and saw a balance which didn't reflect the withdrawal and allowed you to withdraw more money again... -- Greg On 14

Re: [HACKERS] Re: [SQL] array_to_string(anyarray, text) that was working in 8.1 is not working in 8.3

2008-12-14 Thread Corey Horton
Fantastic - I'll just if/else the query based on db version. Thanks! Corey Tom Lane wrote: Corey Horton chort...@austin.rr.com writes: Is there any known workaround to get this the elements of the histogram_bounds anyarray in 8.3.5. It appears that you could explicitly cast to text

Re: [HACKERS] So, why shouldn't SET CONSTRAINTS set a transaction snapshot?

2008-12-14 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Tom Lane wrote: Well, if you think there's a real backwards compatibility issue, we should just do #2 and be done with it. It's not like it's enough code to really matter in the big scheme of things. I don't like it just because it's another

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

2008-12-14 Thread KaiGai Kohei
Peter Eisentraut wrote: On Friday 12 December 2008 19:09:26 Alvaro Herrera wrote: I don't understand -- why wouldn't we just have two columns, one for plain row-level security and another for whatever security system the platforms happens to offer? If we were to follow that route, we could

Re: [HACKERS] Bug in information_schema: FK constraint is defined as against referenced table only

2008-12-14 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: By information_schema, you wouldn't have any idea that errors_file_fkey is defined on the table Errors, let alone what columns it's defined against. Look into key_column_usage. I'm happy to write some code to fix it, if we can agree what these views

Re: [HACKERS] Sync Rep: First Thoughts on Code

2008-12-14 Thread Robert Haas
If this is right, #2, #3, #4, and #6 feel similar except that they're protecting against failures of different (but still all incomplete) subsets of the hardware on the slave, right? Right. Actually, the biggest difference with #6 has nothing to do with protecting against failures. It has

Re: [HACKERS] Block-level CRC checks

2008-12-14 Thread Jonah H. Harris
On Sun, Dec 14, 2008 at 4:51 PM, Josh Berkus j...@agliodbs.com wrote: v11 doesn't apply to cvs head anymore I'm not currently working on this patch, sorry. Should we pull it from 8.4, then? Here's an updated patch against head. NOTE, it appears that this (and the previous) patch PANIC with

Re: [HACKERS] pre-MED

2008-12-14 Thread David Fetter
On Mon, Nov 17, 2008 at 10:37:41AM -0800, David Fetter wrote: On Tue, Nov 04, 2008 at 12:23:55PM -0500, Tom Lane wrote: Alex Hunsaker bada...@gmail.com writes: On Thu, Oct 30, 2008 at 05:16, Tom Lane t...@sss.pgh.pa.us wrote: which doesn't seem like it would amount to anything compared

Re: [HACKERS] Sync Rep: First Thoughts on Code

2008-12-14 Thread Mark Mielke
Greg Stark wrote: When the database says the data is committed it has to mean the data is really committed. Imagine if you looked at a bank account balance after withdrawing all the money and saw a balance which didn't reflect the withdrawal and allowed you to withdraw more money again...

[HACKERS] Restore enforce_generic_type_consistency's breaks a farms

2008-12-14 Thread Zdenek Kotala
Following commit: http://archives.postgresql.org/pgsql-committers/2008-12/msg00109.php breaks several farms. Is it know issue? I run test manually and it works. Zdenek Details: http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=gothic_mothdt=2008-12-14%2021:06:00

Re: [HACKERS] Sync Rep: First Thoughts on Code

2008-12-14 Thread Heikki Linnakangas
Mark Mielke wrote: When I asked for does PostgreSQL guarantee this? I didn't mean hand waving examples or hand waving expectations. I meant a pointer into the code that has some comment that says we want to guarantee that a commit in one session will be immediately visible to other sessions,