Re: [HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread Myron Scott
> But note that Myron did a number of things that are (IMHO) orthogonal yes, I did :) > to process-to-thread conversion, such as adding prepared statements, > a separate thread/process/whateveryoucallit for buffer writing, ditto > for vacuuming, etc. I think his results cannot be taken as in

[HACKERS] multibyte performance

2001-09-26 Thread Tatsuo Ishii
I did some benchmarking with/without multibyte support using current. (1) regression test With multibyte support: 9.52user 3.38system 0:59.27elapsed 21%CPU (0avgtext+0avgdata 0maxresident)k Without multibyte support: 8.97user 4.84system 1:00.85elapsed 22%CPU (0avgtext+0avgdata 0maxresident)k

Re: [HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread Tom Lane
"D. Hageman" <[EMAIL PROTECTED]> writes: > If you look at Myron Scott's post today you will see that it had other > advantages going for it (like auto-vacuum!) and disadvantages ... rogue > thread corruption (already debated today). But note that Myron did a number of things that are (IMHO) ort

Re: [HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread Alex Pilosov
On Wed, 26 Sep 2001, D. Hageman wrote: > Oh, man ... am I reading stuff into what you are writing or are you > reading stuff into what I am writing? Maybe a little bit of both? My > original contention is that I think that the best way to get the full > potential out of SMP machines is to us

Re: [HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread D. Hageman
On Wed, 26 Sep 2001, Alex Pilosov wrote: > On Wed, 26 Sep 2001, D. Hageman wrote: > > > When you need data that is specific to a thread you use a TSD (Thread > > Specific Data). > Which Linux does not support with a vengeance, to my knowledge. I am not sure what that means. If it works it

Re: [HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread Alex Pilosov
On Wed, 26 Sep 2001, D. Hageman wrote: > > > Save for the fact that the kernel can switch between threads faster then > > > it can switch processes considering threads share the same address space, > > > stack, code, etc. If need be sharing the data between threads is much > > > easier then s

Re: [HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread Thomas Lockhart
> ... Thomas still has his date/time stuff > to finish off, now that CVSup is fixed ... I'm now getting clean runs through the regression tests on a freshly merged cvs tree. I'd like to look at it a little more to adjust pg_proc.h attributes before I commit the changes. There was a bit of a hicc

Re: [HACKERS] [BUGS] PostgreSQL / PHP Overrun Error

2001-09-26 Thread Mike Rogers
There is a problem in PHP-4.0.6. Please use PHP4.0.7 or 4.0.8 and the problem will be solved. This can be obtained from CVS -- Mike - Original Message - From: "Christopher Kings-Lynne" <[EMAIL PROTECTED]> To: "Mike Rogers" <[EMAIL PROTECTED]>; "mlw" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTE

Re: [HACKERS] [BUGS] PostgreSQL / PHP Overrun Error

2001-09-26 Thread Christopher Kings-Lynne
Have you recompiled PHP to link against the new postgres libraries? Chris > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Mike Rogers > Sent: Thursday, 27 September 2001 1:07 AM > To: mlw > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; > [EMAIL PROTECT

Re: [HACKERS] casting for dates

2001-09-26 Thread Vince Vielhaber
On Wed, 26 Sep 2001, Mitch Vincent wrote: > Will > > SELECT now() - 'nummonths months'::interval ; > > work? Unfortunately no. Vince. -- == Vince Vielhaber -- KA8CSHemail: [EMAIL PROTECTED]http://www.pop4.net

Re: [HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread Tom Lane
Ian Lance Taylor <[EMAIL PROTECTED]> writes: > (Actually, though, Postgres is already vulnerable to erratic behaviour > because any backend process can corrupt the shared buffer pool.) Not to mention the other parts of shared memory. Nonetheless, our experience has been that cross-backend failur

Re: [HACKERS] pg_dump bug

2001-09-26 Thread Tom Lane
=?iso-8859-1?q?Mart=EDn=20Marqu=E9s?= <[EMAIL PROTECTED]> writes: > PostgreSQL version: 7.1.3 > The dump puts first the permissions and after that the view creation, Are you certain you are using the 7.1.3 version of pg_dump, and not something older? This was fixed in 7.1.3 according to the CVS

Re: [HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread D. Hageman
On 26 Sep 2001, Doug McNaught wrote: > This depends on your system. Solaris has a huge difference between > thread and process context switch times, whereas Linux has very little > difference (and in fact a Linux process context switch is about as > fast as a Solaris thread switch on the same h

Re: [HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread D. Hageman
On 26 Sep 2001, Ian Lance Taylor wrote: > > > Save for the fact that the kernel can switch between threads faster then > > it can switch processes considering threads share the same address space, > > stack, code, etc. If need be sharing the data between threads is much > > easier then sharing

Re: [HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread Doug McNaught
"D. Hageman" <[EMAIL PROTECTED]> writes: > Save for the fact that the kernel can switch between threads faster then > it can switch processes considering threads share the same address space, > stack, code, etc. If need be sharing the data between threads is much > easier then sharing between

[HACKERS] pg_dump bug

2001-09-26 Thread Martín Marqués
Short! :-) PostgreSQL version: 7.1.3 I do I dump of a database which has some views, rules, and different permissions on each view. The dump puts first the permissions and after that the view creation, so when I import the dump back to the server (or another server) I get lts of errors, and

Re: [HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread Myron Scott
On Wed, 26 Sep 2001, mlw wrote: > I can only think of two objectives for threading. (1) running the various > connections in their own thread instead of their own process. (2) running > complex queries across multiple threads. > I did a multi-threaded version of 7.0.2 using Solaris threads ab

Re: [HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread Ian Lance Taylor
"D. Hageman" <[EMAIL PROTECTED]> writes: > > you have a newer kernel scheduled implementation, then you will have the same > > scheduling as separate processes. The only thing you will need to do is > > switch your brain from figuring out how to share data, to trying to figure > > out how to isol

Re: [HACKERS] casting for dates

2001-09-26 Thread Vince Vielhaber
On 27 Sep 2001, Andrew McMillan wrote: > On Thu, 2001-09-27 at 08:30, Vince Vielhaber wrote: > > > > I'm trying to use an integer from a table to add/subtract time in months. > > IOW: > > > > create table foo(nummonths int); > > > > select now() - nummonths months; > > newsroom=# select now() - i

Re: [HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread D. Hageman
On Wed, 26 Sep 2001, mlw wrote: > > I can only think of two objectives for threading. (1) running the various > connections in their own thread instead of their own process. (2) running > complex queries across multiple threads. > > For item (1) I see no value to this. It is a lot of work with

Re: [HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread Tom Lane
Neil Padgett <[EMAIL PROTECTED]> writes: > Well. Currently the runs are the typical pg_bench runs. With what parameters? If you don't initialize the pg_bench database with "scale" proportional to the number of clients you intend to use, then you'll naturally get huge lock contention. For exampl

Re: [HACKERS] casting for dates

2001-09-26 Thread Ryan Mahoney
Haven't tried yet, but perhaps casting nummonths to an interval datatype would do the trick. -r At 04:30 PM 9/26/01 -0400, Vince Vielhaber wrote: >I'm trying to use an integer from a table to add/subtract time in months. >IOW: > >create table foo(nummonths int); > >select now() - nummonths mo

Re: [HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread mlw
"D. Hageman" wrote: > The plan for the new spinlocks does look like it has some potential. My > only comment in regards to permformance when we start looking at SMP > machines is ... it is my belief that getting a true threaded backend may > be the only way to get the full potential out of SMP m

Re: [HACKERS] casting for dates

2001-09-26 Thread Mitch Vincent
Will SELECT now() - 'nummonths months'::interval ; work? - Original Message - From: "Vince Vielhaber" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 26, 2001 4:30 PM Subject: [HACKERS] casting for dates > > I'm trying to use an integer from a table to add/subt

Re: [HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread Neil Padgett
Tom Lane wrote: > > Neil Padgett <[EMAIL PROTECTED]> writes: > > Initial results (top five -- if you would like a complete profile, let > > me know): > > Each sample counts as 1 samples. > > % cumulative self self total > > time samples samplescalls T1/call T1/ca

Re: [HACKERS] casting for dates

2001-09-26 Thread Andrew McMillan
On Thu, 2001-09-27 at 08:30, Vince Vielhaber wrote: > > I'm trying to use an integer from a table to add/subtract time in months. > IOW: > > create table foo(nummonths int); > > select now() - nummonths months; newsroom=# select now() - interval( text(3) || ' months'); ?column?

[HACKERS] casting for dates

2001-09-26 Thread Vince Vielhaber
I'm trying to use an integer from a table to add/subtract time in months. IOW: create table foo(nummonths int); select now() - nummonths months; So far nothing I've tried will work - short of a function. Is there a way to do this? Vince. -- ==

Re: [HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread D. Hageman
On 26 Sep 2001, Doug McNaught wrote: > "D. Hageman" <[EMAIL PROTECTED]> writes: > > > The plan for the new spinlocks does look like it has some potential. My > > only comment in regards to permformance when we start looking at SMP > > machines is ... it is my belief that getting a true thread

Re: [HACKERS] LOCAL_CREDS -> SCM_CREDS in src/backend/libpq/auth.c:535

2001-09-26 Thread Bruce Momjian
> For OpenBSD to work, we need a change from LOCAL_CREDS to SCM_CREDS. > Bruce, I think you are familure with this one. Care to make the change? > (I have no idea where to make it!). OK, I have applied the following patch that fixes the problem on OpenBSD. In my reading of the OpenBSD kernel,

Re: [HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread Tom Lane
Neil Padgett <[EMAIL PROTECTED]> writes: > Initial results (top five -- if you would like a complete profile, let > me know): > Each sample counts as 1 samples. > % cumulative self self total > time samples samplescalls T1/call T1/call name > 26.5

Re: [HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread Doug McNaught
"D. Hageman" <[EMAIL PROTECTED]> writes: > The plan for the new spinlocks does look like it has some potential. My > only comment in regards to permformance when we start looking at SMP > machines is ... it is my belief that getting a true threaded backend may > be the only way to get the ful

Re: [HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread Neil Padgett
Tom Lane wrote: > > At the just-past OSDN database conference, Bruce and I were annoyed by > some benchmark results showing that Postgres performed poorly on an > 8-way SMP machine. Based on past discussion, it seems likely that the > culprit is the known inefficiency in our spinlock implementat

Re: [HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread D. Hageman
The plan for the new spinlocks does look like it has some potential. My only comment in regards to permformance when we start looking at SMP machines is ... it is my belief that getting a true threaded backend may be the only way to get the full potential out of SMP machines. I see that is

[HACKERS] Combining chars in psql (pre-patch)

2001-09-26 Thread Patrice Hédé
Hi, I have been working a bit at a patch for that problem in psql. The patch is far from being ready for inclusion or whatever, it's just for comments... By the way, someone can tell me how to generate nice patches showing the difference between one's version and the cvs code that has been downl

Re: [HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread Tom Lane
"Marc G. Fournier" <[EMAIL PROTECTED]> writes: > Let''s try and target Monday for Beta then? Sounds like a plan. regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister comman

Re: [HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread Marc G. Fournier
Sounds cool to me ... definitely something to fix before v7.2, if its as "easy" as you make it sound ... I'm expecting the new drive to be installed today (if all goes well ... Thomas still has his date/time stuff to finish off, now that CVSup is fixed ... Let''s try and target Monday for Beta t

Re: [HACKERS] [BUGS] PostgreSQL / PHP Overrun Error

2001-09-26 Thread mlw
Interesting. I am using that same configuration. We are using the same thing on our website as well. I have never seen this problem. Weird. My guess is that you are getting an error. The PHP code is some how mucking this up. But I would try executing the query in psql and see what comes up. The

Re: [HACKERS] [BUGS] PostgreSQL / PHP Overrun Error

2001-09-26 Thread Mike Rogers
Sorry: PHP 4.0.6 (with memory leak patch [download listed right below php-4.0.6.tar.gz download- It was a problem]) PostgreSQL 7.1.3 Apache 1.3.20 (with mod_ssl- but it does the same thing without mod_ssl) -- Mike - Original Message - From: "mlw" <[EMAIL PROTECTED]> To: "Mike

Re: [HACKERS] [BUGS] PostgreSQL / PHP Overrun Error

2001-09-26 Thread mlw
Mike Rogers wrote: > Well it really isn't your code (true), but the only thing that is changed is > the 7.0-7.1- Was a data length changed on the return or something that > could affect this? What version of PHP are you using? ---(end of broadcast)

Re: [HACKERS] [BUGS] PostgreSQL / PHP Overrun Error

2001-09-26 Thread Mike Rogers
Well it really isn't your code (true), but the only thing that is changed is the 7.0-7.1- Was a data length changed on the return or something that could affect this? -- Mike - Original Message - From: "Tom Lane" <[EMAIL PROTECTED]> To: "Mike Rogers" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTE

Re: [HACKERS] [BUGS] PostgreSQL / PHP Overrun Error

2001-09-26 Thread Tom Lane
"Mike Rogers" <[EMAIL PROTECTED]> writes: > This problem is of great concern to me and I have been working for days > trying to debug it myself and find other reports, with little success. The > line it claims to be failing on is PHP's ext/pgsql/pgsql.c on line 167 (by > what this claims) which i

[HACKERS] Spinlock performance improvement proposal

2001-09-26 Thread Tom Lane
At the just-past OSDN database conference, Bruce and I were annoyed by some benchmark results showing that Postgres performed poorly on an 8-way SMP machine. Based on past discussion, it seems likely that the culprit is the known inefficiency in our spinlock implementation. After chewing on it fo

[HACKERS] PostgreSQL / PHP Overrun Error

2001-09-26 Thread Mike Rogers
I have just upgraded to the new PostgreSQL 7.1.3 (from 7.0.3) and have been experiencing a pretty serious problem: On one particular page, in what seems to be completely random instances, I get buffer overruns and either 0-rows or a crashed apache child. Turning on PHP's --enable-debug, I rec

Re: [HACKERS] optimizer question

2001-09-26 Thread Tom Lane
"Reinoud van Leeuwen" <[EMAIL PROTECTED]> writes: > I have a table that contains almost 8 milion rows. The primary key is a > sequence, so the index should have a good distribution. Why does the > optimizer refuse to use the index for getting the maximum value? The optimizer has no idea that ma

Re: [HACKERS] PERFORMANCE IMPROVEMENT by mapping WAL FILES

2001-09-26 Thread Tom Lane
Janardhana Reddy <[EMAIL PROTECTED]> writes: > By mapping the WAL files by each backend in to its address > space using "mmap" system call , There are a lot of problems with trying to use mmap for Postgres. One is portability: not all platforms have mmap, so we'd still have to su

Re: [HACKERS] iscacheable for date/time?

2001-09-26 Thread Tom Lane
Thomas Lockhart <[EMAIL PROTECTED]> writes: > ... and how about the istrusted attribute for various routines? Should > it be always false or always true for C builtin functions? At the moment it seems to be true for every pg_proc entry in template1. AFAIK the attribute is not actually being looke

Re: [HACKERS] iscacheable for date/time?

2001-09-26 Thread Tom Lane
Thomas Lockhart <[EMAIL PROTECTED]> writes: > Can anyone recall why the interval data type would have been > considered non-cacheable? I believe I made all functions for all datetime-related types noncacheable, simply because I wasn't sure which of them had the "current" behavior. > For timestam

Re: [HACKERS] PERFORMANCE IMPROVEMENT by mapping WAL FILES

2001-09-26 Thread Bruce Momjian
> Hi all, > By mapping the WAL files by each backend in to its address > space using "mmap" system call , there will be big > improvements in performance from the following point of view: > 1. Each backend directly writes in to the address > space which is o

Re: [HACKERS] Converting from pgsql to sqlserver?

2001-09-26 Thread Justin Clift
Hi Armindo, Ian Harding has written a guide for converting from MS SQL Server to PostgreSQL. I know this is the opposite of what you want, but it might be useful as it highlights some of the areas of difference between these products : http://techdocs.postgresql.org/techdocs/sqlserver2pgsql.php

Re: [HACKERS] iscacheable for date/time?

2001-09-26 Thread mlw
Thomas Lockhart wrote: > ... and how about the istrusted attribute for various routines? Should > it be always false or always true for C builtin functions? How about for > builtin SQL functions which are built on top of trusted C functions? Are > we guarding against catalog changes on the underl

Re: [HACKERS] iscacheable for date/time?

2001-09-26 Thread Thomas Lockhart
... and how about the istrusted attribute for various routines? Should it be always false or always true for C builtin functions? How about for builtin SQL functions which are built on top of trusted C functions? Are we guarding against catalog changes on the underlying C routines?

Re: [HACKERS] iscacheable for date/time?

2001-09-26 Thread Thomas Lockhart
How about iscacheable for the to_char() functions? Can we recall why those are not cacheable, even for non-date/time types? - Thomas ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropri

[HACKERS] iscacheable for date/time?

2001-09-26 Thread Thomas Lockhart
I'm looking at pg_proc.h to adjust the cacheable attribute for date/time functions. Can anyone recall why the interval data type would have been considered non-cacheable? I didn't make internal changes to that type, but istm that it should be cacheable already. For timestamp and timestamptz, I've

[HACKERS] optimizer question

2001-09-26 Thread Reinoud van Leeuwen
Hi, I have a table that contains almost 8 milion rows. The primary key is a sequence, so the index should have a good distribution. Why does the optimizer refuse to use the index for getting the maximum value? (even after a vacuum analyze of the table) radius=# explain select max(radiuspk) fr

Re: [HACKERS] Unicode combining characters

2001-09-26 Thread Thomas Lockhart
> BTW, I see "CHARACTER SET" in gram.y. Does current already support > that syntax? Yes and no. gram.y knows about CHARACTER SET, but only for the long form, the clause is in the wrong position (it preceeds the length specification) and it does not do much useful (generates a data type based on t

Re: [HACKERS] tuple statistics function

2001-09-26 Thread Jan Wieck
Tatsuo Ishii wrote: > Here is a revised version of pg_stattuple, which shows how many tuples > are "dead" etc. Per Tom's suggestion, a statistic of free/resuable > space is now printed. > > test=# select pgstattuple('accounts'); > NOTICE: physical length: 39.06MB live tuples: 10 (12.59MB, 32.

Re: [HACKERS] Converting from pgsql to sqlserver?

2001-09-26 Thread mlw
[EMAIL PROTECTED] wrote: > > Greetings. > I don´t know if this is the right place to ask this, sorry if this don't > belong here. > I begun this week working in a new firm. They use linux and PostgreSQL as > the database for the Intranet site and for the management of CV's and > Knowledge Managem

[HACKERS] PERFORMANCE IMPROVEMENT by mapping WAL FILES

2001-09-26 Thread Janardhana Reddy
Hi all, By mapping the WAL files by each backend in to its address space using "mmap" system call , there will be big improvements in performance from the following point of view: 1. Each backend directly writes in to the address space which is obtained by

[HACKERS] Converting from pgsql to sqlserver?

2001-09-26 Thread armindo . dias
Greetings. I don´t know if this is the right place to ask this, sorry if this don't belong here. I begun this week working in a new firm. They use linux and PostgreSQL as the database for the Intranet site and for the management of CV's and Knowledge Management (they have an on-line system to mana

[HACKERS] time without time zone

2001-09-26 Thread Christopher Kings-Lynne
Gah. Ignore my previous email - I read the docs further and it turns out that "time" and "time without time zone" are synonymns. Chris ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

[HACKERS] time without time zone

2001-09-26 Thread Christopher Kings-Lynne
In 7.1.3, you can create a column as "time without time zone", but it doesn't seem to show as such in psql... eg: test=# alter table chat_meetings add column timeofday time without time zone; ALTER test=# \d chat_meetings Table "chat_meetings" Attribute

Re: [HACKERS] anoncvs failure...

2001-09-26 Thread Bruce Momjian
> On Mon, Sep 24, 2001 at 10:22:28AM -0400, Marc G. Fournier wrote: > > > > okay, somehow you have two different CVSROOT's configured? > > /home/projects/pgsql/cvsroot was the old server, /projects/cvsroot is the > > new one > > Any hints? I had done a (csh) > cd /usr/src/local/pgsql > find

Re: [HACKERS] Unicode combining characters

2001-09-26 Thread Tatsuo Ishii
> > I would like to see SQL99's charset, collate functionality for 7.3 (or > > later). If this happens, current multibyte implementation would be > > dramatically changed... > > I'm *still* interested in working on this (an old story I know). I'm > working on date/time stuff for 7.2, but hopefull