Re: [HACKERS] text search vs schemas

2007-08-16 Thread Trevor Talbot
On 8/16/07, Tom Lane [EMAIL PROTECTED] wrote: Actually ... I'm suddenly not happy about the choice to put text search configurations etc. into schemas at all. We've been sitting here and assuming that to_tsvector('english', my_text_col) has a well defined meaning --- but as the patch stands,

Re: [HACKERS] text search vs schemas

2007-08-18 Thread Trevor Talbot
Tom Lane [EMAIL PROTECTED] wrote: Gregory Stark [EMAIL PROTECTED] writes: Tom Lane [EMAIL PROTECTED] writes: Uh, no. Function names for example are subject to search-path confusion. Wait, are they? They are in PL languages but only because most languages store their source code as

Re: [HACKERS] text search vs schemas

2007-08-18 Thread Trevor Talbot
On 8/17/07, Tom Lane [EMAIL PROTECTED] wrote: At the moment I feel our thoughts have to revolve not around adding complexity to tsearch, but taking stuff out. If we ship it with no schema support for TS objects in 8.3, we can always add that later, if there proves to be real demand for that

Re: [HACKERS] tsearch2 in PostgreSQL 8.3?

2007-08-18 Thread Trevor Talbot
Digging through the simple vs advanced user discussion, I don't think expression indexes are really the right idea. It seems a bit fragile, you need a certain amount of knowledge about the optimizer to figure out if your queries can even use the index, and it's just plain ugly. It also seems like

Re: [HACKERS] tsearch2 in PostgreSQL 8.3?

2007-08-18 Thread Trevor Talbot
On 8/18/07, Bruce Momjian [EMAIL PROTECTED] wrote: Remember an expression index can be a user-created function so you can embed whatever you want in your function and just index it's output, just like you would with a trigger creating a separate column. Well, you could create a function that

Re: [HACKERS] tsearch2 in PostgreSQL 8.3?

2007-08-18 Thread Trevor Talbot
On 8/18/07, Bruce Momjian [EMAIL PROTECTED] wrote: Trevor Talbot wrote: Well, you could create a function that returns a tsvector, but how do you get that to work with queries? I've been under the impression the expressions need to match (in the normal case, be the same function

Re: [HACKERS] text search vs schemas

2007-08-18 Thread Trevor Talbot
On 8/18/07, Tom Lane [EMAIL PROTECTED] wrote: As my copy of the patch currently stands, there are two built-in trigger functions, tsvector_update_trigger and tsvector_update_trigger_column. The first expects trigger arguments name of tsvector col, name of tsconfig to use, name(s) of text

Re: [HACKERS] [GENERAL] Undetected corruption of table files

2007-08-27 Thread Trevor Talbot
On 8/27/07, Jonah H. Harris [EMAIL PROTECTED] wrote: On 8/27/07, Tom Lane [EMAIL PROTECTED] wrote: that and the lack of evidence that they'd actually gain anything I find it somewhat ironic that PostgreSQL strives to be fairly non-corruptable, yet has no way to detect a corrupted page. The

Re: [HACKERS] tsearch filenames unlikes special symbols and numbers

2007-09-03 Thread Trevor Talbot
On 9/2/07, Gregory Stark [EMAIL PROTECTED] wrote: Right, traditionally the only characters forbidden in filenames in Unix are / and nul. If we want the files to play nice in Gnome etc then we should restrict them to ascii since we don't know what encoding the gui expects. Actually I think in

Re: [HACKERS] tsearch filenames unlikes special symbols and numbers

2007-09-03 Thread Trevor Talbot
On 9/3/07, Mark Mielke [EMAIL PROTECTED] wrote: Tom Lane wrote: Also, says that Windows throws an error for : in the filename, which means we needn't. Windows doesn't fail - but it can do odd things. For example, try: C:\ echo hi foo:bar If one then checks the directory, one

Re: [HACKERS] [FEATURE REQUEST] Streaming Onlinebackup (Maybe OFFTOPIC)

2007-09-06 Thread Trevor Talbot
On 9/6/07, apoc9009 [EMAIL PROTECTED] wrote: Backup 12/24/2008 Version 2 /pg/backup/12_24_2008/base/rcvry.rcv --- Basebackup /pg/backup/12_24_2008/changes/0001.chg --- Changed Data /changes/0002.chg --- Changed Data

[HACKERS] Win32 build Large Address Aware?

2007-09-06 Thread Trevor Talbot
While reading one of the recent -perform threads, it occurred to me to check, and the 8.2.4 Win32 release binaries aren't marked large address aware. This means the process gets a 2GB VM space, which is normal for 32bit Windows. On x64, my understanding is that each 32 bit process can actually

Re: [HACKERS] Latest ecpg patch broke MSVC build

2007-10-03 Thread Trevor Talbot
Note that unless there's some tools issue, DllMain doesn't need to be exported to function properly. A DLL's initialization routine is marked as the entry point in the PE header, same as main() in classic C. It might be simpler to just get rid of the export. ---(end of

Re: [HACKERS] Timezone database changes

2007-10-09 Thread Trevor Talbot
On 10/8/07, Bruce Momjian [EMAIL PROTECTED] wrote: I had a thought a week ago. If we update the time zone database for future dates, and you have a future date/time stored, doesn't the time change when the time zone database changes. For example if I schedule an appointment in New Zealand

Re: [HACKERS] Timezone database changes

2007-10-09 Thread Trevor Talbot
I wrote: On 10/8/07, Bruce Momjian [EMAIL PROTECTED] wrote: I had a thought a week ago. If we update the time zone database for future dates, and you have a future date/time stored, doesn't the time change when the time zone database changes. For example if I schedule an appointment in

Re: [HACKERS] Timezone database changes

2007-10-09 Thread Trevor Talbot
On 10/9/07, Peter Eisentraut [EMAIL PROTECTED] wrote: Independent of what any specification might say, however, the currently implemented behavior is clearly wrong in my mind and needs to be fixed. I don't think it's wrong, just a particular choice. As an example, consider an interval

Re: [HACKERS] Timezone database changes

2007-10-10 Thread Trevor Talbot
On 10/10/07, Tom Lane [EMAIL PROTECTED] wrote: The arguments that have been made for storing a zone along with the UTC value seem to mostly boil down to it should present the value the same way I entered it, but if you accept that argument then why do we have DateStyle? If it's OK to

Re: [HACKERS] Timezone database changes

2007-10-11 Thread Trevor Talbot
On 10/10/07, Tom Lane [EMAIL PROTECTED] wrote: Trevor Talbot [EMAIL PROTECTED] writes: Actually, what I meant at least (not sure if others meant it), is storing the value in the timezone it was entered, along with what zone that was. That makes the value stable with respect to the zone

Re: [HACKERS] Timezone database changes

2007-10-11 Thread Trevor Talbot
On 10/11/07, Magne Mæhre [EMAIL PROTECTED] wrote: Trevor Talbot wrote: Thinking that it might have had out of date zone rules brings up an interesting scenario though. Consider a closed (no networking or global interest) filing system in a local organization's office, where it's used

Re: [HACKERS] Timezone database changes

2007-10-11 Thread Trevor Talbot
On 10/11/07, Gregory Stark [EMAIL PROTECTED] wrote: Tom Lane [EMAIL PROTECTED] writes: Trevor Talbot [EMAIL PROTECTED] writes: On 10/11/07, Magne Mæhre [EMAIL PROTECTED] wrote: Trevor Talbot wrote: That situation might sound a bit contrived, but I think the real point is that even

Re: [HACKERS] Timezone database changes

2007-10-11 Thread Trevor Talbot
On 10/11/07, Gregory Stark [EMAIL PROTECTED] wrote: Trevor Talbot [EMAIL PROTECTED] writes: While I agree that UTC storage is definitely a needed option, I was trying to point out in the scenario above that sometimes an event recorded at a specific moment in time *is* local time. Birth

Re: [HACKERS] Timezone database changes

2007-10-11 Thread Trevor Talbot
On 10/11/07, Tom Lane [EMAIL PROTECTED] wrote: Trevor Talbot [EMAIL PROTECTED] writes: Neither is the birth certificate. The recorded, legal time of the birth is the one that was written down. If it doesn't happen to match an international notion of current time, that's unfortunate

Re: [HACKERS] Locale + encoding combinations

2007-10-12 Thread Trevor Talbot
On 10/12/07, Dave Page [EMAIL PROTECTED] wrote: Tom Lane wrote That still leaves us with the problem of how to tell whether a locale spec is bad on Windows. Judging by your example, Windows checks whether the code page is present but not whether it is sane for the base locale. What

Re: [HACKERS] Including Snapshot Info with Indexes

2007-10-14 Thread Trevor Talbot
On 10/14/07, Gokulakannan Somasundaram [EMAIL PROTECTED] wrote: http://www.databasecolumn.com/2007/09/one-size-fits-all.html The Vertica database(Monet is a open source version with the same principle) makes use of the very same principle. Use more disk space, since they are less

Re: [HACKERS] [GENERAL] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-10-22 Thread Trevor Talbot
On 10/21/07, Magnus Hagander [EMAIL PROTECTED] wrote: I tried generating idle connections in an effort to reproduce Laurent's problem, but I ran into a local limit instead: for each backend, postmaster creates a thread and burns 4MB of its 2GB address space. It fails around 490. Oh,

Re: [HACKERS] [GENERAL] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-10-22 Thread Trevor Talbot
On 10/22/07, Magnus Hagander [EMAIL PROTECTED] wrote: Trevor Talbot wrote: I'd probably take the approach of combining win32_waitpid() and threads. You'd end up with 1 thread per 64 backends; when something interesting happens the thread could push the info onto a queue, which the new

Re: [HACKERS] [GENERAL] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-10-22 Thread Trevor Talbot
On 10/22/07, Tom Lane [EMAIL PROTECTED] wrote: Magnus Hagander [EMAIL PROTECTED] writes: I was planning to make it even easier and let Windows do the job for us, just using RegisterWaitForSingleObject(). Does the same - one thread per 64 backends, but we don't have to deal with the queueing

Re: [HACKERS] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-10-26 Thread Trevor Talbot
On 10/26/07, Magnus Hagander [EMAIL PROTECTED] wrote: Can you try the attached patch? See how many backends you can get up to. This patch changes from using a single thread for each backend started to using the builtin threadpool functionality. It also replaces the pid/handle arrays with an

Re: [HACKERS] New tzdata available

2007-11-08 Thread Trevor Talbot
On 11/8/07, Magnus Hagander [EMAIL PROTECTED] wrote: Andrew Dunstan wrote: Tom Lane wrote: Are Windows users accustomed to having up-to-the-minute timezone information? Maybe there's something I don't know about Microsoft's update practices, but I would have thought that the

[HACKERS] Win32 shared memory speed

2007-11-10 Thread Trevor Talbot
I've seen several comments about shared memory under Windows being slow, but I haven't had much luck finding info in the archives. What are the details of this? How was it determined and is there a straightforward test/benchmark? ---(end of

Re: [HACKERS] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-11-10 Thread Trevor Talbot
On 10/26/07, I wrote: On 10/26/07, Magnus Hagander [EMAIL PROTECTED] wrote: Can you try the attached patch? See how many backends you can get up to. This patch changes from using a single thread for each backend started to using the builtin threadpool functionality. It also replaces the

Re: [HACKERS] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-11-12 Thread Trevor Talbot
On 11/12/07, Magnus Hagander [EMAIL PROTECTED] wrote: On Sat, Nov 10, 2007 at 03:17:13PM -0800, Trevor Talbot wrote: As for desktop heap, only 65KB of the service heap was allocated, or about 80 bytes per connection. No danger of hitting limits in the kernel memory pools either. As Dave

Re: [HACKERS] Clarification reqeusted for select * from a huge table

2007-11-12 Thread Trevor Talbot
On 11/12/07, Richard Huxton [EMAIL PROTECTED] wrote: Gokulakannan Somasundaram wrote: I also noticed that it doesn't crash with psql, but it takes a long time to show the first set of records. It takes a long time, even to quit after i pressed 'q'. With oracle SQLPlus, it is quite

Re: [HACKERS] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-11-12 Thread Trevor Talbot
On 11/12/07, Magnus Hagander [EMAIL PROTECTED] wrote: On Mon, Nov 12, 2007 at 04:00:04AM -0800, Trevor Talbot wrote: On 11/12/07, Magnus Hagander [EMAIL PROTECTED] wrote: On Sat, Nov 10, 2007 at 03:17:13PM -0800, Trevor Talbot wrote: As for desktop heap, only 65KB of the service heap

Re: [HACKERS] Simplifying Text Search

2007-11-13 Thread Trevor Talbot
On 11/13/07, Peter Eisentraut [EMAIL PROTECTED] wrote: Am Dienstag, 13. November 2007 schrieb Gregory Stark: Peter Eisentraut [EMAIL PROTECTED] writes: What we'd need is a way to convert a LIKE pattern into a tsquery ('%foo%bar%' = 'foo bar'). Then you might even be able to sneak

Re: [HACKERS] Spinlock backoff algorithm

2007-11-14 Thread Trevor Talbot
On 11/14/07, Tom Lane [EMAIL PROTECTED] wrote: The other problem with using modulo is that it makes the result depend mostly on the low-order bits of the random() result, rather than mostly on the high-order bits; with lower-grade implementations of random(), the lower bits are materially

Re: [HACKERS] Simplifying Text Search

2007-11-14 Thread Trevor Talbot
On 11/14/07, Peter Eisentraut [EMAIL PROTECTED] wrote: I wrote: What we'd need is a way to convert a LIKE pattern into a tsquery ('%foo%bar%' = 'foo bar'). Then you might even be able to sneak index-optimized text search into existing applications. Might be worth a try. Here is how

Re: [HACKERS] Simplifying Text Search

2007-11-15 Thread Trevor Talbot
On 11/15/07, Peter Eisentraut [EMAIL PROTECTED] wrote: In practice, the search pattern will mostly be provided dynamically from some user input, so you could conceivably be able to modify the search patterns more readily than the entire queries in your application. Anyway, it's just an idea

Re: [HACKERS] String encoding during connection handshake

2007-11-28 Thread Trevor Talbot
On 11/28/07, Martijn van Oosterhout [EMAIL PROTECTED] wrote: On Wed, Nov 28, 2007 at 05:54:05PM +0200, [EMAIL PROTECTED] wrote: Regarding the problem of One True Encoding, the answer seems obvious to me: use only one encoding per database cluster, either UTF-8 or UTF-16 or another

Re: [HACKERS] String encoding during connection handshake

2007-11-28 Thread Trevor Talbot
On 11/28/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Wednesday 28 November 2007, Trevor Talbot wrote: I'm not entirely sure how that's supposed to solve the client authentication issue though. Demanding that clients present auth data in UTF-8 is no different than demanding

Re: [HACKERS] String encoding during connection handshake

2007-11-28 Thread Trevor Talbot
On 11/28/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Yes, you support (and worry about) encodings simply because of a C limitation dating from 1974, if I recall correctly... In Java, for example, a char is a very well defined datum, namely a Unicode point. While in C it can be some char or

Re: [HACKERS] Problem with ControlFileData structure being ABI dependent

2007-12-07 Thread Trevor Talbot
On 12/7/07, Dave Page [EMAIL PROTECTED] wrote: Tom Lane wrote: AFAIK, time_t is a Unix-ism, so it's pretty unlikely to be used in the APIs of anything on Windows. Oh, it is. It's confined to the C Runtime libraries, not part of the Windows API proper. (Three exceptions: IP Helper uses the

Re: [HACKERS] WORM and Read Only Tables (v0.1)

2007-12-11 Thread Trevor Talbot
On 12/11/07, Simon Riggs [EMAIL PROTECTED] wrote: Compressed Tablespaces Using a streaming library like zlib, it will be easy to read/write data files into a still-usable form but with much reduced size. Access to a compressed table only makes sense as a SeqScan. That would be handled by

Re: [HACKERS] [EMAIL PROTECTED]: Re: [pgsql-es-ayuda] SLL error 100% cpu]

2007-12-11 Thread Trevor Talbot
On 12/11/07, Tom Lane [EMAIL PROTECTED] wrote: Alvaro Herrera [EMAIL PROTECTED] writes: I dunno anything about how to fix the real problem (what's winsock error 10004?), but I don't think he'd be seeing full speed log filling in 8.2.5. WSAEINTR, A blocking operation was interrupted by a call

Re: [HACKERS] EXPLAIN ANALYZE printing logical and hardware I/O per-node

2007-12-17 Thread Trevor Talbot
On 12/17/07, Decibel! [EMAIL PROTECTED] wrote: Also, has anyone looked into adding a class of system calls that would actually tell us if the kernel issued physical IO? I find it hard to believe that other RDBMSes wouldn't like to have that info... Non-blocking style interfaces can help here.

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 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 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] Spoofing as the postmaster

2007-12-23 Thread Trevor Talbot
On 12/23/07, Tomasz Ostrowski [EMAIL PROTECTED] wrote: On Sun, 23 Dec 2007, Magnus Hagander wrote: I'm just surprised that people are actually surprised by this. To me, it's just a natural fact that happens to pretty much all systems. And a good reason not to let arbitrary users run

Re: [HACKERS] Spoofing as the postmaster

2007-12-28 Thread Trevor Talbot
On 12/28/07, Andrew Sullivan [EMAIL PROTECTED] wrote: On Sat, Dec 29, 2007 at 02:09:23AM +1100, Naz Gassiep wrote: In the web world, it is the client's responsibility to ensure that they check the SSL cert and don't do their banking at www.bankofamerica.hax0r.ru and there is nothing that

Re: [HACKERS] Spoofing as the postmaster

2007-12-28 Thread Trevor Talbot
On 12/28/07, Tom Lane [EMAIL PROTECTED] wrote: Trevor Talbot [EMAIL PROTECTED] writes: There's a fundamental problem that you can't make someone else do authentication if they don't want to, and that's exactly the situation clients are in. I don't see how this can possibly be fixed

Re: [HACKERS] concurrency in psql

2008-01-01 Thread Trevor Talbot
On 1/1/08, kenneth d'souza [EMAIL PROTECTED] wrote: I am trying to understand concurrency and mvcc with a small example in psql. Note that the big advantage to MVCC is that writers do not block readers. Since your example consists of all writers, MVCC isn't doing much for you.

Re: [HACKERS] Some notes about the index-functions security vulnerability

2008-01-13 Thread Trevor Talbot
On 1/8/08, Tom Lane [EMAIL PROTECTED] wrote: The other issue that ought to be on the TODO radar is that we've only plugged the hole for the very limited case of maintenance operations that are likely to be executed by superusers. If user A modifies user B's table (via INSERT/UPDATE/DELETE),