Re: [HACKERS] prefix btree implementation

2005-10-05 Thread Tom Lane
Qingqing Zhou [EMAIL PROTECTED] writes: 1/ What types of prefix compression shall we support? Given the requirement of datatype independence, this idea seems a complete nonstarter to me... regards, tom lane ---(end of

Re: [HACKERS] [pgadmin-hackers] pgAdmin guru hints

2005-10-05 Thread Bastiaan Wakkie
I noticed a typo in hints/conn-hba.html The second internal ip adres missed a '.' You're invited to make your comments on the hints: are these correct, is there something missing or misleading? Cheers, -- ^(B(astia{2}n)?)(\s)?(W(ak{2}ie)?)$

Re: [HACKERS] [PERFORM] A Better External Sort?

2005-10-05 Thread Michael Stone
On Mon, Oct 03, 2005 at 01:34:01PM -0700, Josh Berkus wrote: Realistically, you can't do better than about 25MB/s on a single-threaded I/O on current Linux machines, What on earth gives you that idea? Did you drop a zero? Nope, LOTS of testing, at OSDL, GreenPlum and Sun. For comparison, A

Re: [HACKERS] Vacuum and Transactions

2005-10-05 Thread Hannu Krosing
On T, 2005-10-04 at 11:10 -0400, Tom Lane wrote: Rod Taylor [EMAIL PROTECTED] writes: The catch is that there are some other very active structures (like pg_listener for Slony) which after a couple of hours without vacuuming will quickly have the DB at an unreasonably high load (low tens)

Re: [HACKERS] Vacuum and Transactions

2005-10-05 Thread Hannu Krosing
On T, 2005-10-04 at 00:26 -0400, Rod Taylor wrote: As I understand it vacuum operates outside of the regular transaction and if you stop it (SIGTERM, or pg_cancel_backend()) some of the work it accomplished will be kept when it rolls back. For large structures with a ton of dead entries

Re: [HACKERS] Vacuum and Transactions

2005-10-05 Thread Zeugswetter Andreas DAZ SD
Is it reasonable to cancel and restart the vacuum process periodically (say every 12 hours) until it manages to complete the work? It takes about 2 hours to do the table scan, and should get in about 10 hours of index work each round. If we started the vacuum with the indexes,

[HACKERS] Slony RPM issue

2005-10-05 Thread Philip Yarra
Hi Devrim, I ran into another RPM issue, this time with Slony. I grabbed the RPM from http://developer.postgresql.org/~devrim/slony/1.1.0/rpms/PG8.0.3/ Trying to run slon_start, I got errors such as: $ slon_start --config /etc/slon_tools.conf 2 Invoke slon for node 2 - @@@/slon -s 1000 -d2 -g

Re: [HACKERS] [PERFORM] Query in SQL statement

2005-10-05 Thread R, Rajesh (STSD)
Thanks. I've already understood that I need to post it in another list. Sorry for wasting your precious time. -- Rajesh R -Original Message- From: Richard Huxton [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 05, 2005 2:24 PM To: R, Rajesh (STSD) Cc:

Re: [HACKERS] [PERFORM] Query in SQL statement

2005-10-05 Thread Richard Huxton
R, Rajesh (STSD) wrote: Am trying to port a mysql statement to postgres. Please help me in finding the error in this, Can I recommend the reference section of the manuals for this sort of thing? There is an excellent section detailing the valid SQL for the CREATE TABLE command. Also -

Re: [HACKERS] [PERFORM] A Better External Sort?

2005-10-05 Thread Martijn van Oosterhout
On Wed, Oct 05, 2005 at 05:41:25AM -0400, Michael Stone wrote: On Sat, Oct 01, 2005 at 06:19:41PM +0200, Martijn van Oosterhout wrote: COPY TO /dev/null WITH binary 13MB/s55% user 45% system (ergo, CPU bound) [snip] the most expensive. But it does point out that the whole process is

Re: [HACKERS] Vacuum and Transactions

2005-10-05 Thread Gaetano Mendola
Rod Taylor wrote: I have maintenace_work_mem set to about 1GB in size. Isn't a bit too much ? Regards Gaetano Mendola ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command

Re: [HACKERS] prefix btree implementation

2005-10-05 Thread Alvaro Herrera
On Wed, Oct 05, 2005 at 12:50:41AM -0400, Tom Lane wrote: Qingqing Zhou [EMAIL PROTECTED] writes: 1/ What types of prefix compression shall we support? Given the requirement of datatype independence, this idea seems a complete nonstarter to me... How about having each type optionally

Re: [HACKERS] Vacuum and Transactions

2005-10-05 Thread Rod Taylor
The vacuum ignores vacuum transaction concept looks handy right now. There is a patch for 8.1 in PATCHES list (postponed to 8.2 :( ). This can be backported to 8.0 quite easily. Understood. I've seen them, but until they're well tested in the newest version I won't be using them in a

Re: [HACKERS] Vacuum and Transactions

2005-10-05 Thread Rod Taylor
On Wed, 2005-10-05 at 09:53 +0300, Hannu Krosing wrote: On T, 2005-10-04 at 11:10 -0400, Tom Lane wrote: Rod Taylor [EMAIL PROTECTED] writes: The catch is that there are some other very active structures (like pg_listener for Slony) which after a couple of hours without vacuuming will

[HACKERS] current_user versus current_role

2005-10-05 Thread Pavel Stehule
hello I used info from current_user for log. about some operations (who, when, ..). What I can see, current_user is equal current_role function. I had problem with it, because user (if is member of any group role) can change his identity. example: peter is member of role users. But peter can

Re: [HACKERS] current_user versus current_role

2005-10-05 Thread Alvaro Herrera
On Wed, Oct 05, 2005 at 03:17:25PM +0200, Pavel Stehule wrote: Hi, I used info from current_user for log. about some operations (who, when, ..). What I can see, current_user is equal current_role function. I had problem with it, because user (if is member of any group role) can change his

Re: [HACKERS] [PERFORM] A Better External Sort?

2005-10-05 Thread Michael Stone
On Sat, Oct 01, 2005 at 06:19:41PM +0200, Martijn van Oosterhout wrote: COPY TO /dev/null WITH binary 13MB/s55% user 45% system (ergo, CPU bound) [snip] the most expensive. But it does point out that the whole process is probably CPU bound more than anything else. Note that 45% of that

Re: [HACKERS] [PERFORM] A Better External Sort?

2005-10-05 Thread Michael Stone
On Tue, Oct 04, 2005 at 12:43:10AM +0300, Hannu Krosing wrote: Just FYI, I run a count(*) on a 15.6GB table on a lightly loaded db and it run in 163 sec. (Dual opteron 2.6GHz, 6GB RAM, 6 x 74GB 15k disks in RAID10, reiserfs). A little less than 100MB sec. And none of that 15G table is in the

[HACKERS] Interesting optimizer's supposition in 8.1

2005-10-05 Thread Teodor Sigaev
Tsearch2 has function to_tsquery defined as: CREATE FUNCTION to_tsquery(oid, text) RETURNS tsquery AS '$libdir/tsearch2' LANGUAGE 'c' with (isstrict,iscachable); And let we take 2 essential equivalent queries: # explain select book.id from to_tsquery('foo') as t, book where book.fts @@ t;

Re: [HACKERS] Slony RPM issue

2005-10-05 Thread Devrim GUNDUZ
Hi, On Wed, 5 Oct 2005, Philip Yarra wrote: Hi Devrim, I ran into another RPM issue, this time with Slony. :-) I grabbed the RPM from http://developer.postgresql.org/~devrim/slony/1.1.0/rpms/PG8.0.3/ Trying to run slon_start, I got errors such as: $ slon_start --config

Re: [HACKERS] prefix btree implementation

2005-10-05 Thread Bricklen Anderson
Qingqing Zhou wrote: I am not sure if this idea was mentioned before. The basic prefix btree idea is quite straightforward, i.e., try to compress the key items within a data page by sharing the common prefix. Thus the fanout of the page is increased and the benefits is obvious

Re: [HACKERS] [PERFORM] A Better External Sort?

2005-10-05 Thread Luke Lonergan
Nope - it would be disk wait. COPY is CPU bound on I/O subsystems faster that 50 MB/s on COPY (in) and about 15 MB/s (out). - Luke -Original Message- From: Michael Stone [mailto:[EMAIL PROTECTED] Sent: Wed Oct 05 09:58:41 2005 To: Martijn van Oosterhout Cc:

Re: [HACKERS] Announcing Veil

2005-10-05 Thread Marc Munro
Tom, Thanks for your reponse. Unless I am missing your point, to add more locks we require a minor code change to the postgres server. I am happy to submit a patch but this will not help Veil work with existing versions of Postgres. I am aiming for compatibility with 7.4 onward. Your views on

[HACKERS] wrong optimization ( postgres 8.0.3 )

2005-10-05 Thread Gaetano Mendola
Hi all, take a look at this simple function and view: CREATE OR REPLACE FUNCTION sp_connected_test ( INTEGER ) RETURNS BOOLEAN AS' DECLARE a_id_user ALIAS FOR $1; BEGIN PERFORM * FROM v_current_connection WHERE id_user = a_id_user; IF NOT FOUND THEN RETURN FALSE; END IF;

Re: [HACKERS] Interesting optimizer's supposition in 8.1

2005-10-05 Thread Tom Lane
Teodor Sigaev [EMAIL PROTECTED] writes: Why planner suppose that t 'table' will return 1000 rows? Because set_function_size_estimates() is only a stub :-( regards, tom lane ---(end of broadcast)--- TIP 2: Don't 'kill -9'

Re: [HACKERS] [PERFORM] A Better External Sort?

2005-10-05 Thread Ron Peacetree
I've now gotten verification from multiple working DBA's that DB2, Oracle, and SQL Server can achieve ~250MBps ASTR (with as much as ~500MBps ASTR in setups akin to Oracle RAC) when attached to a decent (not outrageous, but decent) HD subsystem... I've not yet had any RW DBA verify Jeff Baker's

Re: [HACKERS] prefix btree implementation

2005-10-05 Thread Qingqing Zhou
Bricklen Anderson [EMAIL PROTECTED] wrote Oracle implements something similar called index compression, but I believe it is only for common column values. I haven't checked in versions9r1 so maybe there are other options implemented by now. Jonathan Lewis describes some pros and cons

Re: [HACKERS] [PERFORM] A Better External Sort?

2005-10-05 Thread Joshua D. Drake
We have to fix this. Ron The source is freely available for your perusal. Please feel free to point us in specific directions in the code where you may see some benefit. I am positive all of us that can, would put resources into fixing the issue had we a specific direction to attack.

Re: [HACKERS] [PERFORM] A Better External Sort?

2005-10-05 Thread Ron Peacetree
First I wanted to verify that pg's IO rates were inferior to The Competition. Now there's at least an indication that someone else has solved similar problems. Existence proofs make some things easier ;-) Is there any detailed programmer level architectual doc set for pg? I know the best doc is

Re: [HACKERS] wrong optimization ( postgres 8.0.3 )

2005-10-05 Thread Tom Lane
Gaetano Mendola [EMAIL PROTECTED] writes: What I'm experiencing is a problem ( I upgraded today from 7.4.x to 8.0.3 ) that I explain here: The following function just return how many records there are inside the view v_current_connection CREATE OR REPLACE FUNCTION sp_count ( ) RETURNS

Re: [HACKERS] [PERFORM] A Better External Sort?

2005-10-05 Thread Michael Stone
On Wed, Oct 05, 2005 at 11:24:07AM -0400, Luke Lonergan wrote: Nope - it would be disk wait. I said I/O overhead; i.e., it could be the overhead of calling the kernel for I/O's. E.g., the following process is having I/O problems: time dd if=/dev/sdc of=/dev/null bs=1 count=1000

Re: [HACKERS] Fwd: 8.1beta2 vacuum analyze hanging on idle database

2005-10-05 Thread Kevin Grittner
I see that my initial post never made it through to the list. I assume this was some technical failure, so I'm adding it back for this reply. It doesn't appear that we did stop postmaster between incidents. We have now done so. The software we are running is a build from the beta2 release,

Re: [HACKERS] Fwd: 8.1beta2 vacuum analyze hanging on idle database

2005-10-05 Thread Tom Lane
Kevin Grittner [EMAIL PROTECTED] writes: The software we are running is a build from the beta2 release, with no special options specified at ./configure time. Would you expect such a build to include the debug info you wanted? No, you need configure --enable-debug, which is not the default.

Re: [HACKERS] [PERFORM] A Better External Sort?

2005-10-05 Thread Jeffrey W. Baker
On Wed, 2005-10-05 at 12:14 -0400, Ron Peacetree wrote: I've now gotten verification from multiple working DBA's that DB2, Oracle, and SQL Server can achieve ~250MBps ASTR (with as much as ~500MBps ASTR in setups akin to Oracle RAC) when attached to a decent (not outrageous, but decent) HD

Re: [HACKERS] Fwd: 8.1beta2 vacuum analyze hanging on idle database

2005-10-05 Thread Alvaro Herrera
On Wed, Oct 05, 2005 at 02:27:32PM -0400, Tom Lane wrote: Kevin Grittner [EMAIL PROTECTED] writes: The software we are running is a build from the beta2 release, with no special options specified at ./configure time. Would you expect such a build to include the debug info you wanted?

Re: [HACKERS] Fwd: 8.1beta2 vacuum analyze hanging on idle database

2005-10-05 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: On Wed, Oct 05, 2005 at 02:27:32PM -0400, Tom Lane wrote: For working with a beta release, --enable-cassert isn't a bad idea either, though it is probably not relevant to your problem. Also, note that --enable-cassert will reduce performance somewhat,

Re: [Slony1-general] Re: [HACKERS] Slony RPM issue

2005-10-05 Thread elein
On Wed, Oct 05, 2005 at 05:32:40PM +0300, Devrim GUNDUZ wrote: Hi, On Wed, 5 Oct 2005, Philip Yarra wrote: Hi Devrim, I ran into another RPM issue, this time with Slony. :-) I grabbed the RPM from http://developer.postgresql.org/~devrim/slony/1.1.0/rpms/PG8.0.3/ Trying to run

Re: [HACKERS] [DOCS] Updated documentation for new sequence binding

2005-10-05 Thread Jim C. Nasby
On Sun, Oct 02, 2005 at 10:54:10PM -0400, Bruce Momjian wrote: pgman wrote: I have marged Tom's description of the new sequence binding with text I was working on. I modified it to follow the existing we used to do X, now we do Y pattern in the surrounding entries:

Re: [HACKERS] prefix btree implementation

2005-10-05 Thread Qingqing Zhou
Alvaro Herrera [EMAIL PROTECTED] wrote On Wed, Oct 05, 2005 at 12:50:41AM -0400, Tom Lane wrote: Qingqing Zhou [EMAIL PROTECTED] writes: 1/ What types of prefix compression shall we support? Given the requirement of datatype independence, this idea seems a complete nonstarter to me...

[HACKERS] [EMAIL PROTECTED]: [BUGS] Race condition in dropdb;createdb]

2005-10-05 Thread Jim C. Nasby
Never got a reply on -bugs... do people think this is an issue? - Forwarded message from Jim C. Nasby [EMAIL PROTECTED] - [EMAIL PROTECTED]:32]~:1%createdb test; CREATE DATABASE [EMAIL PROTECTED]:32]~:2%dropdb test; createdb test; DROP DATABASE createdb: database creation failed: ERROR:

Re: [HACKERS] [PERFORM] A Better External Sort?

2005-10-05 Thread Andrej Ricnik-Bay
On 10/6/05, Michael Stone [EMAIL PROTECTED] wrote: On Wed, Oct 05, 2005 at 11:24:07AM -0400, Luke Lonergan wrote: Nope - it would be disk wait. I said I/O overhead; i.e., it could be the overhead of calling the kernel for I/O's. E.g., the following process is having I/O problems: time dd

Re: [HACKERS] [EMAIL PROTECTED]: [BUGS] Race condition in dropdb;createdb]

2005-10-05 Thread Tom Lane
Jim C. Nasby [EMAIL PROTECTED] writes: Never got a reply on -bugs... do people think this is an issue? Not really. The only way to fix it would be to make PQfinish do a synchronous close, which seems like more of a performance loss than it's worth. regards, tom lane

Re: [HACKERS] [PERFORM] A Better External Sort?

2005-10-05 Thread Jonah H. Harris
Ron, This thread is getting on my nerves. Your tone in some of the other posts (as-well-as this one) is getting very annoying. Yes, PostgreSQL's storage manager (like all other open source databases), lacks many of the characteristics and enhancements of the commercial databases. Unlike

Re: [HACKERS] [DOCS] Updated documentation for new sequence binding

2005-10-05 Thread Bruce Momjian
Jim C. Nasby wrote: On Sun, Oct 02, 2005 at 10:54:10PM -0400, Bruce Momjian wrote: pgman wrote: I have marged Tom's description of the new sequence binding with text I was working on. I modified it to follow the existing we used to do X, now we do Y pattern in the surrounding entries:

Re: [HACKERS] wrong optimization ( postgres 8.0.3 )

2005-10-05 Thread Gaetano Mendola
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tom Lane wrote: Gaetano Mendola [EMAIL PROTECTED] writes: What I'm experiencing is a problem ( I upgraded today from 7.4.x to 8.0.3 ) that I explain here: The following function just return how many records there are inside the view

Resultset duplicates (was Re: [HACKERS] prefix btree implementation)

2005-10-05 Thread Richard Huxton
Qingqing Zhou wrote: Oracle 9 uses the grammar like this: CREATE INDEX ... [ COMPRESS number_of_first_columns ] So it gives the flexibility of choosing optimal number of coulumns to the user. The script mentioned in the article guesses the optimal number by estimating the size of each

Re: [HACKERS] [PERFORM] A Better External Sort?

2005-10-05 Thread Ron Peacetree
I'm putting in as much time as I can afford thinking about pg related performance issues. I'm doing it because of a sincere desire to help understand and solve them, not to annoy people. If I didn't believe in pg, I would't be posting thoughts about how to make it better. It's probably worth

Re: [HACKERS] [PERFORM] A Better External Sort?

2005-10-05 Thread Luke Lonergan
Michael, On 10/5/05 8:33 AM, Michael Stone [EMAIL PROTECTED] wrote: real0m8.889s user0m0.877s sys 0m8.010s it's not in disk wait state (in fact the whole read was cached) but it's only getting 1MB/s. You've proven my point completely. This process is bottlenecked in the

Re: [HACKERS] Slony RPM issue

2005-10-05 Thread Philip Yarra
Hi Devrim, On Thu, 6 Oct 2005 12:32 am, Devrim GUNDUZ wrote: Thanks for the report. It will fixed in CVS and all the RPM sets later today. Always feel free to send me a patch if you want, I can apply your patch, too. OK, you got my previous email about why pgsql-libs was dependent on

Re: [HACKERS] Vacuum and Transactions

2005-10-05 Thread Chris Browne
[EMAIL PROTECTED] (Hannu Krosing) writes: It also seems that Slony can be modified to not use LISTEN/NOTIFY in high load situations (akin to high performance network cards, which switch from interrupt driven mode to polling mode if number of packets per second reaches certain thresolds).

Re: [HACKERS] prefix btree implementation

2005-10-05 Thread Junji TERAMOTO
Hello all, I also was examining a similar compression method just. Qingqing Zhou wrote: We can find a way to handle the above case, but it is better to find a general way to handle any data types(include UDT). Each type optionally provide the required routines could be a way, more details?

Re: [HACKERS] Bitmap scans vs. the statistics views

2005-10-05 Thread Tom Lane
Quite some time ago I complained about the fact that bitmap index scans weren't being counted sanely by the statistics mechanism: http://archives.postgresql.org/pgsql-hackers/2005-04/msg00675.php That discussion trailed off without deciding how to fix it, but we really can't let this go without

[HACKERS] fixing LISTEN/NOTIFY

2005-10-05 Thread Neil Conway
Applications that frequently use LISTEN/NOTIFY can suffer from performance problems because of the MVCC bloat created by frequent insertions into pg_listener. A solution to this has been suggested in the past: rewrite LISTEN/NOTIFY to use shared memory rather than system catalogs. The problem is

Re: [HACKERS] fixing LISTEN/NOTIFY

2005-10-05 Thread Tom Lane
Neil Conway [EMAIL PROTECTED] writes: [ various ideas about reimplementing LISTEN/NOTIFY ] I really dislike the idea of pushing notifies out to the shared queue before commit. That essentially turns forever do notify foo into a global DOS tool: you can drive everybody else's backend into swap

Re: [HACKERS] fixing LISTEN/NOTIFY

2005-10-05 Thread Neil Conway
On Thu, 2005-06-10 at 01:14 -0400, Tom Lane wrote: The idea of blocking during commit until shmem becomes available might work. There's some issues here about transaction atomicity, though: how do you guarantee that all or none of your notifies get sent? (Actually, supposing that the notifies