[HACKERS] re:tsearch2 problem

2005-10-17 Thread 沈一枫
Thanks VERY VERY much for Teodor Sigaev help,and my next problem is which  is more suitable   for index chinese words, TSearch2 OR Lucene? My mates said to me that Lucene is more effifent because of its way of "Inverse Order OF Idexing",and "The GiST Tree is well for larting lan but doesn't for

Re: [HACKERS] Seeing context switch storm with 10/13 snapshot of

2005-10-17 Thread Simon Riggs
On Thu, 2005-10-13 at 21:20 -0600, Robert Creager wrote: > When grilled further on (Thu, 13 Oct 2005 22:44:54 -0400), > Tom Lane <[EMAIL PROTECTED]> confessed: > > > Robert Creager <[EMAIL PROTECTED]> writes: > > > I've been having this problem since trying to upgrade from 7.4.1 to 8.03, > and > >

Re: [HACKERS] [COMMITTERS] pgsql: Do all accesses to shared buffer headers through

2005-10-17 Thread Jim C. Nasby
On Wed, Oct 12, 2005 at 10:46:14PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > Does any of this need to be backpatched? > > No --- we didn't have any per-buffer spinlocks before 8.1. > > It's possible that at some point we'll need to start thinking about > applying volatile-pointer coding

Re: [HACKERS] A costing analysis tool

2005-10-17 Thread Jim C. Nasby
On Fri, Oct 14, 2005 at 03:34:43PM -0500, Kevin Grittner wrote: > of the two times as a reliability factor. Unfortunately, that > means doubling the number of cache flushes, which is likely > to be the most time-consuming part of running the tests. On > the bright side, we would capture the top l

Re: [HACKERS] A costing analysis tool

2005-10-17 Thread Jim C. Nasby
On Sat, Oct 15, 2005 at 04:04:52PM +0200, Martijn van Oosterhout wrote: > On Fri, Oct 14, 2005 at 03:34:43PM -0500, Kevin Grittner wrote: > > Of course, if running with EXPLAIN ANALYZE significantly > > distorts the run time, the whole effort is doomed at the outset. > > Can you quantify the distor

Re: [HACKERS] A costing analysis tool

2005-10-17 Thread Jim C. Nasby
On Fri, Oct 14, 2005 at 02:37:37PM -0400, Tom Lane wrote: > "Kevin Grittner" <[EMAIL PROTECTED]> writes: > > I propose capturing only three values from the output of explain > > analyze, and saving it with many columns of context information. > > You really have to capture the rowcounts (est and a

Re: [HACKERS] A costing analysis tool

2005-10-17 Thread Jim C. Nasby
On Sun, Oct 16, 2005 at 02:23:41PM -0700, Josh Berkus wrote: > Greg, > > > Or something like that. It might require breaking random_page_cost into two > > or three different parameters that would normally have the same cost but > > aren't handled the same, like random_heap_cost, random_leaf_cost,

Re: [HACKERS] A costing analysis tool

2005-10-17 Thread Jim C. Nasby
On Fri, Oct 14, 2005 at 05:14:43PM +0200, Martijn van Oosterhout wrote: > On Thu, Oct 13, 2005 at 05:39:32PM -0500, Kevin Grittner wrote: > > That said, there's certainly overlap between your effort and > > what I'm going to be developing. Do you have anything from > > your work which might save m

Re: [HACKERS] slower merge join on sorted data chosen over

2005-10-17 Thread Simon Riggs
On Mon, 2005-10-17 at 14:55 -0500, Jim C. Nasby wrote: > On Tue, Oct 11, 2005 at 10:58:58AM +0100, Simon Riggs wrote: > > On Mon, 2005-10-10 at 15:14 -0500, Kevin Grittner wrote: > > > We are looking at doing much more with PostgreSQL over the > > > next two years, and it seems likely that this iss

Re: [HACKERS] slower merge join on sorted data chosen over

2005-10-17 Thread Jim C. Nasby
On Tue, Oct 11, 2005 at 10:58:58AM +0100, Simon Riggs wrote: > On Mon, 2005-10-10 at 15:14 -0500, Kevin Grittner wrote: > > We are looking at doing much more with PostgreSQL over the > > next two years, and it seems likely that this issue will come up > > again where it is more of a problem. It so

Re: [HACKERS] PostgreSQL roadmap for 8.2 and beyond.

2005-10-17 Thread Jonah H. Harris
/me has started working on hierarchical query support that I'd like to get into 8.2.On 10/17/05, Tom Lane <[EMAIL PROTECTED] > wrote:Dave Cramer <[EMAIL PROTECTED] > writes:> On 17-Oct-05, at 1:43 PM, Martijn van Oosterhout wrote:>> ISTM them that the RETURNING patch as given solves your problem>>

Re: [HACKERS] slower merge join on sorted data chosen over nested loop

2005-10-17 Thread Jim C. Nasby
On Mon, Oct 10, 2005 at 09:10:38PM -0400, Tom Lane wrote: > I recall thinking about changing the formula to more accurately count > the number of pages touched; but I desisted when I realized that it > would drastically increase the cost estimates for index searches, and > that's surely the wrong d

Re: [HACKERS] Spinlocks, yet again: analysis and proposed patches

2005-10-17 Thread Jim C. Nasby
On Wed, Oct 12, 2005 at 03:07:23PM -0400, Emil Briggs wrote: > > where the number of padding locks is determined by how many lock > > structures fit within a 128 byte cache line. > > > > This isn't exactly elegant coding, but it provides a useful improvement > > on an 8-way SMP box when run on 8.0

Re: [HACKERS] Bug 1473, pthread python on FreeBSD

2005-10-17 Thread Jim C. Nasby
On Thu, Oct 13, 2005 at 04:40:39PM -0400, Bruce Momjian wrote: > Jim C. Nasby wrote: > > http://archives.postgresql.org/pgsql-bugs/2005-02/msg00135.php > > > > I think it may have been a bit early to disable pthread python support > > (http://archives.postgresql.org/pgsql-hackers/2005-09/msg01136.

Re: [HACKERS] More problems with the win32 installer for 8.1 beta3

2005-10-17 Thread Dave Page
-Original Message- From: [EMAIL PROTECTED] on behalf of Tony Caduto Sent: Mon 10/17/2005 5:43 PM Cc: pgsql-hackers@postgresql.org Subject: Re: [HACKERS] More problems with the win32 installer for 8.1 beta3 > Is there anyway to get a libpq that does not depend on libintl-2.dll and > li

Re: [HACKERS] PostgreSQL roadmap for 8.2 and beyond.

2005-10-17 Thread Tom Lane
Dave Cramer <[EMAIL PROTECTED]> writes: > On 17-Oct-05, at 1:43 PM, Martijn van Oosterhout wrote: >> ISTM them that the RETURNING patch as given solves your problem >> nicely. > Well, the driver still needs to know ahead of time which columns are > going to be autogenerated. Possibly you coul

Re: [HACKERS] PostgreSQL roadmap for 8.2 and beyond.

2005-10-17 Thread Tom Lane
Patrick Bakker <[EMAIL PROTECTED]> writes: > It would be useful if you could toggle SQL statement logging without > restarting PostgreSQL and additionally if you could turn on selective SQL > logging. Additionally, it would be great if you could log SQL statements to > a separate file from the main

Re: [HACKERS] PostgreSQL roadmap for 8.2 and beyond.

2005-10-17 Thread Patrick Bakker
It would be useful if you could toggle SQL statement logging without restarting PostgreSQL and additionally if you could turn on selective SQL logging. Additionally, it would be great if you could log SQL statements to a separate file from the main log and in such a way that the statements are sepe

Re: [HACKERS] libpq's pollution of application namespace

2005-10-17 Thread Martijn van Oosterhout
On Mon, Oct 17, 2005 at 01:32:47PM -0400, Tom Lane wrote: > (a) This problem is really not worth the trouble. > > (b) I dislike portability approaches that try to enumerate supported > cases, rather than being general in the first place. Especially when > we can be pretty certain that this area i

Re: [HACKERS] PostgreSQL roadmap for 8.2 and beyond.

2005-10-17 Thread Dave Cramer
On 17-Oct-05, at 1:43 PM, Martijn van Oosterhout wrote: On Mon, Oct 17, 2005 at 01:32:22PM -0400, Dave Cramer wrote: The JDBC problem at hand is there is a method which allows one to retrieve the autogenerated keys from an insert. I can understand Tom's argument here. It should be possible fo

Re: [HACKERS] PostgreSQL roadmap for 8.2 and beyond.

2005-10-17 Thread Martijn van Oosterhout
On Mon, Oct 17, 2005 at 01:32:22PM -0400, Dave Cramer wrote: > The JDBC problem at hand is there is a method which allows one to > retrieve the > autogenerated keys from an insert. I can understand Tom's argument > here. It should > be possible for the driver to build a query from the meta data

Re: [HACKERS] PostgreSQL roadmap for 8.2 and beyond.

2005-10-17 Thread Andrew Dunstan
Dave Cramer wrote: On the other hand given that all of the serial increments are stored in the session is it possible to get the results of the last insert on the session ? If we can avoid the extra query so much the better, but either way is better than what we have ? Would that no

Re: [HACKERS] libpq's pollution of application namespace

2005-10-17 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> (I'm already desperately unhappy about the thin representation of >> non-GNU toolchains in the build farm...) > Me too. If you provide a list of the most important platforms/toolsets > missing I will see if I can talk some people in

Re: [HACKERS] libpq's pollution of application namespace

2005-10-17 Thread Tom Lane
Martijn van Oosterhout writes: > I can see a list of supported platforms [1], but not a list of > supported compilers/linkers. If it's just a matter of reasearching the > command-line options that can be done fairly easily, if anyone's > interested... (a) This problem is really not worth the trou

Re: [HACKERS] PostgreSQL roadmap for 8.2 and beyond.

2005-10-17 Thread Dave Cramer
On 17-Oct-05, at 12:43 PM, Tom Lane wrote: Martijn van Oosterhout writes: On Mon, Oct 17, 2005 at 09:12:35AM -0400, Dave Cramer wrote: AFAIKS, the protocol needs to be tweaked to return at a minimum the currval for the first serial in the row, but more correctly all of the modified currval

Re: [HACKERS] libpq's pollution of application namespace

2005-10-17 Thread Martijn van Oosterhout
On Mon, Oct 17, 2005 at 12:20:06PM -0400, Tom Lane wrote: > Martijn van Oosterhout writes: > > What other linkers do we need to support? > > All the non-GNU ones. > > (I'm already desperately unhappy about the thin representation of > non-GNU toolchains in the build farm...) Ok, so it's a matt

Re: [HACKERS] PostgreSQL roadmap for 8.2 and beyond.

2005-10-17 Thread Tom Lane
Martijn van Oosterhout writes: > On Mon, Oct 17, 2005 at 09:12:35AM -0400, Dave Cramer wrote: >> AFAIKS, the protocol needs to be tweaked to return at a minimum the >> currval for the first serial in the row, but more correctly all of >> the modified currval's for an insert > In what sense? It s

Re: [HACKERS] libpq's pollution of application namespace

2005-10-17 Thread Andrew Dunstan
Tom Lane wrote: Martijn van Oosterhout writes: What other linkers do we need to support? All the non-GNU ones. (I'm already desperately unhappy about the thin representation of non-GNU toolchains in the build farm...) Me too. If you provide a list of the most important pl

Re: [HACKERS] More problems with the win32 installer for 8.1 beta3

2005-10-17 Thread Tony Caduto
Magnus Hagander wrote: Hi all, I sent out a message about this before, but for reasons beyond my control, I could not continue that thread. Anyway, not only does the installer blow away libpq.dll, it also removes all the Open SSL dlls, this is even more troubling because LOTS of other apps

Re: [HACKERS] Something wrong after file system level backup

2005-10-17 Thread Tom Lane
[EMAIL PROTECTED] writes: > If in two words - i have file system level backup and i can see manually > all the data in it, but PostreSQL doesn`t. What can i do? You messed up the backup/restore somehow: the system is running with a transaction counter much less than what it was when you took the b

Re: [HACKERS] libpq's pollution of application namespace

2005-10-17 Thread Tom Lane
Martijn van Oosterhout writes: > What other linkers do we need to support? All the non-GNU ones. (I'm already desperately unhappy about the thin representation of non-GNU toolchains in the build farm...) regards, tom lane ---(end of broadcast)--

Re: [HACKERS] libpq's pollution of application namespace

2005-10-17 Thread Martijn van Oosterhout
On Sun, Oct 16, 2005 at 06:21:37PM -0400, Tom Lane wrote: > I find that libpq.so exports the following symbols that have neither > PQ, pq, pg, nor lo_ as a prefix: > It'd be nicer if we could filter out all exported symbols that don't > appear in exports.txt, but I don't know any portable way to

Re: [HACKERS] Possible issue with win32 installer(8.1beta 3)...

2005-10-17 Thread Andrew Dunstan
Magnus Hagander wrote: If this were true it would break a huge number of apps, including buildfarm, which relies on DLLs in the .exe directory being found. The difference in the latest servicepacks is that no longer is the *current directory* searched first for DLL files. However, *the

Re: [HACKERS] dynamic loading of .so (originally from pgsql-general)

2005-10-17 Thread Marc Munro
Tom, My project, Veil, steals some of this shared memory for itself. I wan't aware of the "slop factor" and was pleased that it just worked. I guess I should have been asking questions of this group. Sorry. I would like Veil to be a good citizen and place a legitimate request for its shared mem

Re: [HACKERS] PostgreSQL roadmap for 8.2 and beyond.

2005-10-17 Thread Martijn van Oosterhout
On Mon, Oct 17, 2005 at 09:12:35AM -0400, Dave Cramer wrote: > I fail to see how this solves the problem of getting auto generated > keys. > > AFAIKS, the protocol needs to be tweaked to return at a minimum the > currval for the first serial in the row, but more correctly all of > the modifi

Re: [HACKERS] PostgreSQL roadmap for 8.2 and beyond.

2005-10-17 Thread Kevin McArthur
I've not actually looked in the source but i presume that insert returning would work internally similar to a select in an update_after or insert_after trigger. If so then it should not care that an entry is a sequence or otherwise, it should care what the actual data in the table is. It must wo

Re: [HACKERS] More problems with the win32 installer for 8.1 beta3

2005-10-17 Thread Magnus Hagander
> Hi all, > > I sent out a message about this before, but for reasons > beyond my control, I could not continue that thread. > > Anyway, not only does the installer blow away libpq.dll, it > also removes all the Open SSL dlls, this is even more > troubling because LOTS of other apps depend on

[HACKERS] Something wrong after file system level backup

2005-10-17 Thread alex
The situation is like that: [19:24] Who can help with file system level backup? [19:24] Press_Enter: shut down postgres, tar the data dir [19:25] Press_Enter: apparently filesystem snapshots might work as well [19:25] Press_Enter: you're supposed to use pg_dumpall [19:25] KL, my question is so

Re: [HACKERS] Possible issue with win32 installer(8.1beta 3)...

2005-10-17 Thread Magnus Hagander
> >>I would normally just have a copy of libpq.dll in the same > dir as my > >>exe, but with the latest XP service packs this does not > work anymore, > >> > >> > > > >It should do - in fact we package 8.1 in exactly that way after > >extensive testing on XP SP2 as well as 2K3 SP1 (not to m

Re: [HACKERS] More problems with the win32 installer for 8.1 beta3

2005-10-17 Thread Dave Page
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Tony Caduto > Sent: 17 October 2005 15:53 > To: pgsql-hackers@postgresql.org > Subject: [HACKERS] More problems with the win32 installer for > 8.1 beta3 > > Hi all, > > I sent out a message about

Re: [HACKERS] MemoryContext and NodeTags

2005-10-17 Thread Thomas Hallgren
[EMAIL PROTECTED] wrote: Not much of an extension mechanism, is it? Yes it is. If you are a module writer and want to define your own tag, the chances are pretty hight that you would look for available tags in the current CVS HEAD before you go ahead, thus avoiding any collision. First co

[HACKERS] More problems with the win32 installer for 8.1 beta3

2005-10-17 Thread Tony Caduto
Hi all, I sent out a message about this before, but for reasons beyond my control, I could not continue that thread. Anyway, not only does the installer blow away libpq.dll, it also removes all the Open SSL dlls, this is even more troubling because LOTS of other apps depend on OpenSSL. This

Re: [HACKERS] MemoryContext and NodeTags

2005-10-17 Thread Tom Lane
Thomas Hallgren <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: >> No. Define 'em yourself. >> > OK, I can do that. But I have a couple of reasons why I think that it > would be a good idea to get my definitions into node.h: > - If more module authors want to do similar things, they would

Re: [HACKERS] MemoryContext and NodeTags

2005-10-17 Thread Thomas Hallgren
[EMAIL PROTECTED] wrote: Thomas Hallgren <[EMAIL PROTECTED]> writes: I have a proposal: The NodeTag T_MemoryContext has the value of 600 and the next occupied entry is T_Value which is 650. - Reserve half of that range for PostgreSQL specific contexts (today you only use one), and the other

Re: [HACKERS] MemoryContext and NodeTags

2005-10-17 Thread Tom Lane
Thomas Hallgren <[EMAIL PROTECTED]> writes: > I have a proposal: > The NodeTag T_MemoryContext has the value of 600 and the next occupied > entry is T_Value which is 650. > - Reserve half of that range for PostgreSQL specific contexts (today you > only use one), and the other half for custom cont

Re: [HACKERS] Possible issue with win32 installer(8.1beta 3)...

2005-10-17 Thread Andrew Dunstan
Dave Page wrote: I would normally just have a copy of libpq.dll in the same dir as my exe, but with the latest XP service packs this does not work anymore, It should do - in fact we package 8.1 in exactly that way after extensive testing on XP SP2 as well as 2K3 SP1 (not to mention

[HACKERS] MemoryContext and NodeTags

2005-10-17 Thread Thomas Hallgren
I'm rewriting parts of PL/Java to be more secure. One of the areas where I'd like to improve things concerns ownership of allocated structures. Many structures, such as TupleDesc, HeapTuple, ErrorData, etc. can be copied into another MemoryContext for safe keeping. PL/Java uses this when creati

Re: [HACKERS] PostgreSQL roadmap for 8.2 and beyond.

2005-10-17 Thread Dave Cramer
I fail to see how this solves the problem of getting auto generated keys. AFAIKS, the protocol needs to be tweaked to return at a minimum the currval for the first serial in the row, but more correctly all of the modified currval's for an insert if we had that then we could correctly imp

Re: [HACKERS] Possible issue with win32 installer(8.1beta 3)...

2005-10-17 Thread Dave Page
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Tony Caduto > Sent: 17 October 2005 06:43 > To: pgsql-hackers@postgresql.org > Subject: [HACKERS] Possible issue with win32 installer(8.1beta 3)... > > Hi, > I just installed the win32 8.1beta 3 ins

Re: [HACKERS] slow IN() clause for many cases

2005-10-17 Thread Simon Riggs
On Fri, 2005-10-14 at 19:09 -0400, Tom Lane wrote: > I wrote: > > I'm thinking that IN should be > > converted to a ScalarArrayOpExpr, ie > > > x = ANY (ARRAY[val1,val2,val3,val4,...]) > > Actually, there is one little thing in the way of doing this: it'll > fail if any of the IN-list element

Re: [HACKERS] PostgreSQL roadmap for 8.2 and beyond.

2005-10-17 Thread Bruce Momjian
Neil Conway wrote: > On Sun, 2005-16-10 at 01:20 -0700, Kevin McArthur wrote: > > Don't forget insert/update returning. > > Omar Kilani has a patch for this: > > http://archives.postgresql.org/pgsql-patches/2005-07/msg00568.php > > I would like to see it get into 8.2 Yes, this is in the 8.2 pat

[HACKERS] Vacuum only a Schema ?

2005-10-17 Thread Hervé Piedvache
Hi, What about only vacuum a schema ? Is it a stupid idea or is it plannified in futur release ... ? What about also give the ability to vacuum all tables except some big one ? Regards, -- Hervé Piedvache ---(end of broadcast)--- TIP 1: if postin

[HACKERS] Possible issue with win32 installer(8.1beta 3)...

2005-10-17 Thread Tony Caduto
Hi, I just installed the win32 8.1beta 3 installer on the same PC as my client, and I selected not to install PGAdmin III for obvious reasons and the installer seemed to remove my existing libpq.dll, I went to start up Delphi, and got tons of errors saying "could not load libpq.dll" did a sear

Re: [HACKERS] Missing files on Postgres8.0.4 Win32 Installation

2005-10-17 Thread Magnus Hagander
> Hi all, > I installed postgres 8.0.4 on a win32 box and I found out: > libpq-fe.h and libpqdll.lib are missing. > > Is that normal? This sounds like you didn't include the development files. They are not installed by defauly, you have to select it on the feature selection screen. //Magnus -

[HACKERS] Missing files on Postgres8.0.4 Win32 Installation

2005-10-17 Thread Gaetano Mendola
Hi all, I installed postgres 8.0.4 on a win32 box and I found out: libpq-fe.h and libpqdll.lib are missing. Is that normal? Regards Gaetano Mendola ---(end of broadcast)--- TIP 6: explain analyze is your friend