Re: [HACKERS] Benchmark for GiST index?

2007-12-20 Thread Oleg Bartunov
On Thu, 20 Dec 2007, Koichi Suzuki wrote: I'm trying to run some GiST activities and see XLOG record structure. Koichi, I tested update speed of GiST and GIN http://www.sai.msu.su/~megera/wiki/GinTestUpdate It should generate a lot XLOG traffic. README tells it runs PG8.2 or later.

Re: [HACKERS] pgwin32_open returning EINVAL

2007-12-20 Thread Magnus Hagander
On Wed, Dec 19, 2007 at 07:50:29PM -0500, Tom Lane wrote: Magnus Hagander [EMAIL PROTECTED] writes: Updated version attached. Comments on the wording of the messages are also welcome ;-) Well, since you asked ;-) ... I don't particularly like this. Well, it's better to have you say that

Re: [HACKERS] Proposal for Null Bitmap Optimization(for TrailingNULLs)

2007-12-20 Thread Gokulakannan Somasundaram
Thanks for the suggestions. I am re-submitting the patch in contextual diff format. As far as storage savings are concened, the patch claims whatever is stated. I checked it by creating a table with 10 columns on a 32 bit machine. i inserted 100,000 rows with trailing nulls and i observed savings

Re: [HACKERS] pgwin32_open returning EINVAL

2007-12-20 Thread Martijn van Oosterhout
On Thu, Dec 20, 2007 at 09:32:38AM +0100, Magnus Hagander wrote: (errmsg(could not open file \%s\: %s violation, fileName, (GetLastError() == ERROR_SHARING_VIOLATION)?_(sharing):_(lock)), Is _() the proper way to get a translatable string in like that, or is there a better way?

Re: [HACKERS] Sorting Improvements for 8.4

2007-12-20 Thread Martijn van Oosterhout
On Wed, Dec 19, 2007 at 07:17:21PM -0800, Ron Mayer wrote: but it doesn't follow that you will get 10X improvement with 10 threads, or even 4X with 4. Yeah - unless those 10 cores have additional I/O to the memories compared to a 1 core system (which I'd hope would be the case or else I'd

Re: [HACKERS] pgwin32_open returning EINVAL

2007-12-20 Thread Trevor Talbot
On 12/20/07, Magnus Hagander [EMAIL PROTECTED] wrote: ereport(WARNING, (errmsg(could not open file \%s\: %s violation, fileName, (GetLastError() == ERROR_SHARING_VIOLATION)?_(sharing):_(lock)), errdetail(Continuing to retry for 30 seconds.), errhint(You may

Re: [HACKERS] pgwin32_open returning EINVAL

2007-12-20 Thread Magnus Hagander
On Thu, Dec 20, 2007 at 04:39:55AM -0800, Trevor Talbot wrote: On 12/20/07, Magnus Hagander [EMAIL PROTECTED] wrote: ereport(WARNING, (errmsg(could not open file \%s\: %s violation, fileName, (GetLastError() == ERROR_SHARING_VIOLATION)?_(sharing):_(lock)),

Re: [HACKERS] pgwin32_open returning EINVAL

2007-12-20 Thread Trevor Talbot
On 12/20/07, Magnus Hagander [EMAIL PROTECTED] wrote: On Thu, Dec 20, 2007 at 04:39:55AM -0800, Trevor Talbot wrote: On 12/20/07, Magnus Hagander [EMAIL PROTECTED] wrote: ereport(WARNING, (errmsg(could not open file \%s\: %s violation, fileName, (GetLastError() ==

Re: [HACKERS] pgwin32_open returning EINVAL

2007-12-20 Thread Alvaro Herrera
Trevor Talbot escribió: Without looking myself, is it possible for errhint() or errdetail() to do something that affects GetLastError()? It's like errno, checking it very far away from the call site makes me nervous. Yeah, they call gettext(), palloc/pfree/pstrdup and various StringInfo

Re: [HACKERS] pgwin32_open returning EINVAL

2007-12-20 Thread Magnus Hagander
On Thu, Dec 20, 2007 at 04:47:33AM -0800, Trevor Talbot wrote: On 12/20/07, Magnus Hagander [EMAIL PROTECTED] wrote: On Thu, Dec 20, 2007 at 04:39:55AM -0800, Trevor Talbot wrote: On 12/20/07, Magnus Hagander [EMAIL PROTECTED] wrote: ereport(WARNING, (errmsg(could not open file

[HACKERS] duplicate columns with COPY

2007-12-20 Thread Peter Eisentraut
Is there a reason why COPY TO STDOUT does not allow columns to be specified more than once? pei=# copy test1 (a, a) to stdout; ERROR: 42701: column a specified more than once Or is this just an overly extensive check that is actually intended for COPY FROM STDIN? -- Peter Eisentraut

Re: [HACKERS] duplicate columns with COPY

2007-12-20 Thread Andrew Dunstan
Peter Eisentraut wrote: Is there a reason why COPY TO STDOUT does not allow columns to be specified more than once? pei=# copy test1 (a, a) to stdout; ERROR: 42701: column a specified more than once Or is this just an overly extensive check that is actually intended for COPY FROM STDIN?

Re: [HACKERS] duplicate columns with COPY

2007-12-20 Thread NikhilS
Hi, pei=# copy test1 (a, a) to stdout; ERROR: 42701: column a specified more than once Or is this just an overly extensive check that is actually intended for COPY FROM STDIN? This seems to be a common check in both COPY TO and COPY FROM cases source/destination being STDIN or

Re: [HACKERS] Benchmark for GiST index?

2007-12-20 Thread Koichi Suzuki
Oleg; Thanks for the information. I'll try your code. 2007/12/20, Oleg Bartunov [EMAIL PROTECTED]: On Thu, 20 Dec 2007, Koichi Suzuki wrote: I'm trying to run some GiST activities and see XLOG record structure. Koichi, I tested update speed of GiST and GIN

Re: [HACKERS] Sorting Improvements for 8.4

2007-12-20 Thread Greg Smith
On Thu, 20 Dec 2007, Martijn van Oosterhout wrote: The way around this is a NUMA architecture, but that's a whole other ball of wax. Quick note for those reading Ulrich's paper: he refers in a couple of places to Intel's upcoming CSI approach to NUMA. This has now been renamed QuickPath,

Re: [HACKERS] Sorting Improvements for 8.4

2007-12-20 Thread Brian Hurt
While we're blue skying things, I've had an idea for a sorting algorithm kicking around for a couple of years that might be interesting. It's a variation on heapsort to make it significantly more block-friendly. I have no idea if the idea would work, or how well it'd work, but it might be

Re: [HACKERS] pgwin32_open returning EINVAL

2007-12-20 Thread Magnus Hagander
On Thu, Dec 20, 2007 at 10:26:46AM -0500, Tom Lane wrote: Magnus Hagander [EMAIL PROTECTED] writes: On Wed, Dec 19, 2007 at 07:50:29PM -0500, Tom Lane wrote: 2. Do we really want this to be WARNING? LOG seems a better idea, since it's not warning about anything the client app did wrong.

Re: [HACKERS] pgwin32_open returning EINVAL

2007-12-20 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: On Wed, Dec 19, 2007 at 07:50:29PM -0500, Tom Lane wrote: 2. Do we really want this to be WARNING? LOG seems a better idea, since it's not warning about anything the client app did wrong. I put it as warning because I wanted to be sure the admin

Re: [HACKERS] pgwin32_open returning EINVAL

2007-12-20 Thread Magnus Hagander
On Thu, Dec 20, 2007 at 10:11:10AM -0500, Tom Lane wrote: Trevor Talbot [EMAIL PROTECTED] writes: Without looking myself, is it possible for errhint() or errdetail() to do something that affects GetLastError()? Hmm ... the macro framework is designed so that the arguments get evaluated

Re: [HACKERS] pgwin32_open returning EINVAL

2007-12-20 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: On Thu, Dec 20, 2007 at 10:11:10AM -0500, Tom Lane wrote: BTW, I concur with Martijn's comment to avoid constructing phrases from spare parts; it creates a translation problem, and in this case you'd only be saving a few bytes anyway. Ok. Are you

Re: [HACKERS] pgwin32_open returning EINVAL

2007-12-20 Thread Trevor Talbot
On 12/20/07, Magnus Hagander [EMAIL PROTECTED] wrote: On Thu, Dec 20, 2007 at 04:39:55AM -0800, Trevor Talbot wrote: On 12/20/07, Magnus Hagander [EMAIL PROTECTED] wrote: ereport(WARNING, (errmsg(could not open file \%s\: %s violation, fileName, (GetLastError() ==

Re: [HACKERS] pgwin32_open returning EINVAL

2007-12-20 Thread Tom Lane
Trevor Talbot [EMAIL PROTECTED] writes: Without looking myself, is it possible for errhint() or errdetail() to do something that affects GetLastError()? Hmm ... the macro framework is designed so that the arguments get evaluated before anything very interesting happens, but it might be better

Re: [HACKERS] pgwin32_open returning EINVAL

2007-12-20 Thread Magnus Hagander
On Thu, Dec 20, 2007 at 07:57:23AM -0800, Trevor Talbot wrote: I'd expect the compiler to optimize away those, but I'll make it a var anyawy. It can't; it's an opaque callout to kernel32.dll, and there's nothing that tells the optimizer when you can expect to get the same result. That

Re: [HACKERS] duplicate columns with COPY

2007-12-20 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: Is there a reason why COPY TO STDOUT does not allow columns to be specified more than once? pei=# copy test1 (a, a) to stdout; ERROR: 42701: column a specified more than once Or is this just an overly extensive check that is actually intended for

[HACKERS] query : max size Bytea

2007-12-20 Thread Arunachalam Parthasarathy
hi, i would request you to answer the following query: 1. What is the maximum size of data single Bytea entry in column? i would be thankful to you for the above request . P.S : my current reqirement is to add more that 1 gb of data in a single entry of type bytea column in each row. Thanks

Re: [HACKERS] query : max size Bytea

2007-12-20 Thread Pavel Stehule
Hello there are limits: Maximum size for a table?16 TB Maximum size for a row? 1.6TB Maximum size for a field?1 GB But my experience is, on older servers with RAM 2G is +/- 20M long bytea slow and it is better use BLOB,

Re: [HACKERS] query : max size Bytea

2007-12-20 Thread Andrew Chernow
Arunachalam Parthasarathy wrote: hi, i would request you to answer the following query: 1. What is the maximum size of data single Bytea entry in column? i would be thankful to you for the above request . P.S : my current reqirement is to add more that 1 gb of data in a single entry of type

Re: [HACKERS] query : max size Bytea

2007-12-20 Thread Merlin Moncure
On Dec 20, 2007 12:47 PM, Andrew Chernow [EMAIL PROTECTED] wrote: Arunachalam Parthasarathy wrote: bytea uses up to 4 bytes to represent the binary string length (signed 32-bit integer). So the max data size is 2G. max data size is 2g, but only large objects can hit that...1gb limit comes

Re: [HACKERS] query : max size Bytea

2007-12-20 Thread Andrew Chernow
Andrew Chernow wrote: Arunachalam Parthasarathy wrote: hi, i would request you to answer the following query: 1. What is the maximum size of data single Bytea entry in column? i would be thankful to you for the above request . P.S : my current reqirement is to add more that 1 gb of data in a

[HACKERS] Problem

2007-12-20 Thread Pedro Belmino
Hello, I am implementing some changes in structure of index from postgresql when run the command initdb gives the following error: Bogus pg_index tuple. What it may come to be? Thanks, -- Pedro Belmino. # Ciência da Computação

Re: [HACKERS] VLDB Features

2007-12-20 Thread Josh Berkus
Tom, Sure ... but you'll find that it's not large enough to be useful. Once you remove all the interesting consistency checks such as unique indexes and foreign keys, the COPY will tend to go through just fine, and then you're still stuck trying to weed out bad data without very good tools

Re: [HACKERS] pgwin32_open returning EINVAL

2007-12-20 Thread Magnus Hagander
Magnus Hagander wrote: On Thu, Dec 20, 2007 at 10:26:46AM -0500, Tom Lane wrote: Magnus Hagander [EMAIL PROTECTED] writes: On Wed, Dec 19, 2007 at 07:50:29PM -0500, Tom Lane wrote: 2. Do we really want this to be WARNING? LOG seems a better idea, since it's not warning about anything the

Re: [HACKERS] Sorting Improvements for 8.4

2007-12-20 Thread Dann Corbit
-Original Message- From: [EMAIL PROTECTED] [mailto:pgsql-hackers- [EMAIL PROTECTED] On Behalf Of Brian Hurt Sent: Thursday, December 20, 2007 6:42 AM To: pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Sorting Improvements for 8.4 While we're blue skying things, I've had an

Re: [HACKERS] Sorting Improvements for 8.4

2007-12-20 Thread Ron Mayer
Gregory Stark wrote: Note that speeding up a query from 20s to 5s isn't terribly useful. I disagree totally with that. That is the difference between no chance of someone waiting for a web page to load; vs. a good chance they'd wait. And 2s vs 0.5s is the difference between a web site that

Re: [HACKERS] Sorting Improvements for 8.4

2007-12-20 Thread Mark Mielke
Jeff Davis wrote: On Wed, 2007-12-19 at 15:51 -0500, Mark Mielke wrote: That sounds possible, but I still feel myself suspecting that disk reads will be much slower than localized text comparison. Perhaps I am overestimating the performance of the comparison function? I think this

Re: [HACKERS] Sorting Improvements for 8.4

2007-12-20 Thread Jeff Davis
On Thu, 2007-12-20 at 01:26 +, Gregory Stark wrote: I suspect most of that is spent just copying the data around. Which would not be helped by having multiple threads doing the copying -- and in fact might be exacerbated if it required an extra copy to consolidate all the data in the end.

Re: [HACKERS] Sorting Improvements for 8.4

2007-12-20 Thread Mark Mielke
Jeff Davis wrote: Where parallel processing like this becomes attractive is when you're running a 2 hour query on a machine sequentially running scheduled batch jobs which can be sped up to 30 minutes. But in that case you're almost certainly being limited by your disk bandwidth, not your cpu

Re: [HACKERS] pgwin32_open returning EINVAL

2007-12-20 Thread Jaime Casanova
On Dec 20, 2007 3:29 PM, Magnus Hagander [EMAIL PROTECTED] wrote: Magnus Hagander wrote: On Thu, Dec 20, 2007 at 10:26:46AM -0500, Tom Lane wrote: Magnus Hagander [EMAIL PROTECTED] writes: On Wed, Dec 19, 2007 at 07:50:29PM -0500, Tom Lane wrote: 2. Do we really want this to be WARNING?

Re: [HACKERS] pgwin32_open returning EINVAL

2007-12-20 Thread Alvaro Herrera
Jaime Casanova escribió: it doesn't compile on current head on mingw 5.1 and msys 1.0.10; of course, it doesn't compile on 8.2 neither in order to Alvaro's contact to test it Yeah, the buildfarm is failing in the same way.

Re: [HACKERS] pgwin32_open returning EINVAL

2007-12-20 Thread Alvaro Herrera
Jaime Casanova escribió: it doesn't compile on current head on mingw 5.1 and msys 1.0.10; of course, it doesn't compile on 8.2 neither in order to Alvaro's contact to test it I think this patch should fix it. I think win32.mak needs to be similarly patched. -- Alvaro Herrera

Re: [HACKERS] pgwin32_open returning EINVAL

2007-12-20 Thread Andrew Dunstan
Alvaro Herrera wrote: Jaime Casanova escribió: it doesn't compile on current head on mingw 5.1 and msys 1.0.10; of course, it doesn't compile on 8.2 neither in order to Alvaro's contact to test it I think this patch should fix it. I think win32.mak needs to be similarly patched.

Re: [HACKERS] function body actors (was: [PERFORM] viewing source code)

2007-12-20 Thread Tom Lane
Merlin Moncure [EMAIL PROTECTED] writes: On Dec 20, 2007 6:01 PM, Tom Lane [EMAIL PROTECTED] wrote: So if you want something other than endless arguments to happen, come up with a nice key-management design for encrypted function bodies. Maybe a key management solution isn't required. If,

[HACKERS] function body actors (was: [PERFORM] viewing source code)

2007-12-20 Thread Merlin Moncure
On Dec 20, 2007 6:01 PM, Tom Lane [EMAIL PROTECTED] wrote: Merlin Moncure [EMAIL PROTECTED] writes: I don't really agree that wrapping pl/pgsql with encryptor/decryptor is a bad idea. So if you want something other than endless arguments to happen, come up with a nice key-management design

Re: [HACKERS] pgwin32_open returning EINVAL

2007-12-20 Thread Jaime Casanova
On Dec 20, 2007 9:31 PM, Alvaro Herrera [EMAIL PROTECTED] wrote: Jaime Casanova escribió: it doesn't compile on current head on mingw 5.1 and msys 1.0.10; of course, it doesn't compile on 8.2 neither in order to Alvaro's contact to test it I think this patch should fix it. I think

Re: [HACKERS] function body actors (was: [PERFORM] viewing source code)

2007-12-20 Thread Merlin Moncure
On Dec 21, 2007 12:40 AM, Tom Lane [EMAIL PROTECTED] wrote: Merlin Moncure [EMAIL PROTECTED] writes: On Dec 20, 2007 6:01 PM, Tom Lane [EMAIL PROTECTED] wrote: So if you want something other than endless arguments to happen, come up with a nice key-management design for encrypted function