Re: [HACKERS] INSERT INTO ... SELECT problem

2000-12-04 Thread Tom Lane
Alex Perel <[EMAIL PROTECTED]> writes: > CREATE RULE ip_allocated_rule AS > ON INSERT > TO ips_used > DO DELETE FROM ips_free > WHERE ips_free.block_id = NEW.block_id > AND ips_free.ip = NEW.ip; > INSERT INTO ips_used > (

Re: [HACKERS] beta testing version

2000-12-04 Thread Thomas Lockhart
> This paragraph from erserver.com: > eRServer development is currently concentrating on core, universal > functions that will enable individuals and IT professionals > to implement PostgreSQL ORDBMS solutions for mission critical > datawarehousing, datamining, and

Re: [HACKERS] Using Threads?

2000-12-04 Thread Tom Samplonius
On Mon, 4 Dec 2000, Junfeng Zhang wrote: > All the major operating systems should have POSIX threads implemented. > Actually this can be configurable--multithreads or one thread. I don't understand this. The OS can be configured for one thread? How would that be any of use? > Thread-only s

Re: [HACKERS] Using Threads?

2000-12-04 Thread Tom Lane
Bruce Guenter <[EMAIL PROTECTED]> writes: > [ some very interesting datapoints ] > > So, forking a process with lots of data is expensive. However, most of > the PostgreSQL data is in a SysV IPC shared memory segment, which > shouldn't affect the fork numbers. I believe (but don't have numbers t

RE: [HACKERS] SQL to retrieve FK's, Update/Delete action, etc. (fwd)

2000-12-04 Thread Michael Fork
There ya go, I figured it out :) Given the name a table, this query will return all foreign keys in that table, the table the primary key is in, the name of the primary key, if the are deferrable, if the are initially deffered, and the action to be performed (RESTRICT, SET NULL, etc.). To get th

Re: [HACKERS] Using Threads?

2000-12-04 Thread Myron Scott
I would love to distribute this code to anybody who wants it. Any suggestions for a good place? However, calling the work a code redesign is a bit generous. This was more like a brute force hack. I just moved all the connection related global variables to a thread local "environment variable"

Re: [HACKERS] Bitmap index

2000-12-04 Thread Nathan Myers
On Mon, Dec 04, 2000 at 04:28:47PM +0100, [EMAIL PROTECTED] wrote: > > on other RDBMS (Oracle,etc...),there is an index called bitmap index > that greatly improve performance compared to btree index for boolean > value (such as for a sex value,it's either M or F),i would like to > know if such in

Re: [HACKERS] Using Threads?

2000-12-04 Thread Lamar Owen
Matthew wrote: > The primary advantage that I see is that a single postgres process > can benefit from multiple processors. I see little advantage to using thread > for client connections. Multiprocessors best benefit multiple backends. And the current forked model lends itself admirably

Re: [HACKERS] Using Threads?

2000-12-04 Thread Bruce Guenter
On Mon, Dec 04, 2000 at 02:30:31PM -0800, Dan Lyke wrote: > Adam Haberlach writes: > > Typically (on a well-written OS, at least), the spawning of a thread > > is much cheaper then the creation of a new process (via fork()). > This would be well worth testing on some representative sample > system

RE: [HACKERS] Using Threads?

2000-12-04 Thread Matthew
*snip* > > > > Once all the questions regarding "why not" have been answered, it would > > be good to also ask "why use threads?" Do they simplify the code? Do > > they offer significant performance or efficiency gains? What do they > > give, other than being buzzword compliant? >

Re: [HACKERS] Using Threads?

2000-12-04 Thread Bruce Guenter
On Mon, Dec 04, 2000 at 03:17:00PM -0800, Adam Haberlach wrote: > Typically (on a well-written OS, at least), the spawning of a thread > is much cheaper then the creation of a new process (via fork()). Unless I'm mistaken, the back-end is only forked when starting a new connection, in which

Re: [HACKERS] 8192 BLCKSZ ?]

2000-12-04 Thread Jan Wieck
Don Baccus wrote: > > ... > I expect TOAST to work even better). Users will still be able change to > larger blocksizes (perhaps a wise thing to do if a large percentage of their > data won't fit into a single PG block). Users using the default will > be able to store rows of *awesome* length,

Re: [HACKERS] Using Threads?

2000-12-04 Thread Dan Lyke
Adam Haberlach writes: > Typically (on a well-written OS, at least), the spawning of a thread > is much cheaper then the creation of a new process (via fork()). This would be well worth testing on some representative sample systems. Within the past year and a half at one of my gigs some coworker

[HACKERS] INSERT INTO ... SELECT problem

2000-12-04 Thread Alex Perel
Hi everyone, I've recently encountered a bizzare problem that manifests itself reliably on my running copy of postgres. I have a system set up to track IPs. The arrangement uses two mutually-exclusive buckets, one for free IPs and the other for used ones. There are rules set up on the used pool

Re: [HACKERS] Using Threads?

2000-12-04 Thread Adam Haberlach
On Mon, Dec 04, 2000 at 02:28:10PM -0600, Bruce Guenter wrote: > On Mon, Nov 27, 2000 at 11:42:24PM -0600, Junfeng Zhang wrote: > > I am new to postgreSQL. When I read the documents, I find out the Postmaster > > daemon actual spawns a new backend server process to serve a new client > > request.

Re: [HACKERS] Wrong FOR UPDATE lock type

2000-12-04 Thread Tom Lane
Jan Wieck <[EMAIL PROTECTED]> writes: > Tom, > IIRC the "Deadlock risk" debug message is from you. I think > it must get a little smarter. IMHO an application that want's > to UPDATE something in a transaction but must SELECT the > row(s) first to do it's own calculation

[HACKERS] Debian build failing...

2000-12-04 Thread Thomas Good
Hi. Could any kind soul tell me what's amiss here. I'm trying to build pg7.0.3 on a friend's box - over the net. Kind of like driving from the backseat. ;-) My src builds but the linker barfs with: make[2]: Leaving directory `/usr/local/postgresql-7.0.3/src/backend/utils' gcc -I../include -I.

Re: postgres docs (was Re: [HACKERS] Crash during WAL recovery?)

2000-12-04 Thread Peter Eisentraut
Norman Clarke writes: > I am interested in volunteering some time to helping with the documentation Good. Not sure exactly what you want to do, but we need help in just about every area, including proof-reading/copy-editing sort of stuff, markup/consistency improvements, verification of example

Re: [HACKERS] Using Threads?

2000-12-04 Thread Junfeng Zhang
All the major operating systems should have POSIX threads implemented. Actually this can be configurable--multithreads or one thread. Thread-only server is unsafe, I agree. Maybe the following model can be a little better. Several servers, each is multi-threaded. Every server can support a maximu

Re: AW: AW: [HACKERS] broken locale in 7.0.2 without multibyte suppor t (F reeBSD 4.1-RELEASE) ?

2000-12-04 Thread Tom Lane
Zeugswetter Andreas SB <[EMAIL PROTECTED]> writes: > But don't they in general obfuscate cases where the callee does want > unsigned/signed chars ? Well, it's ugly, but I don't think we have much choice. Seems to me that changing to "unsigned char" throughout the backend would obfuscate things *

Re: [HACKERS] broken locale in 7.0.2 without multibyte support (FreeBSD 4.1-RELEASE) ?

2000-12-04 Thread Oleg Bartunov
On Sun, 3 Dec 2000, Tom Lane wrote: > Date: Sun, 03 Dec 2000 18:13:47 -0500 > From: Tom Lane <[EMAIL PROTECTED]> > To: Oleg Bartunov <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED] > Subject: Re: [HACKERS] broken locale in 7.0.2 without multibyte support (FreeBSD >4.1-RELEASE) ? > > Oleg Bartunov

Re: [HACKERS] Using Threads?

2000-12-04 Thread Bruce Guenter
On Mon, Nov 27, 2000 at 11:42:24PM -0600, Junfeng Zhang wrote: > I am new to postgreSQL. When I read the documents, I find out the Postmaster > daemon actual spawns a new backend server process to serve a new client > request. Why not use threads instead? Is that just for a historical reason, > or

Re: [HACKERS] Using Threads?

2000-12-04 Thread Tom Lane
The Hermit Hacker <[EMAIL PROTECTED]> writes: >> Why not use threads instead? Is that just for a >> historical reason, or some performance/implementation concern? > Several reasons, 'historical' probably being the strongest right now > ... since PostgreSQL was never designed for threading, its ab

Re: [HACKERS] Wrong FOR UPDATE lock type

2000-12-04 Thread Tom Lane
Jan Wieck <[EMAIL PROTECTED]> writes: > I'm about 99.67% sure that the lock type choosen in the > FOR UPDATE case (line 511 of parse_relation.c) should be > RowExclusiveLock instead of RowShareLock. Actually I get > "Deadlock risk" debug messages when selecting FOR

Re: [HACKERS] beta testing version

2000-12-04 Thread bpalmer
Can we PLEASE kill this thread? There are only a handful of people who are making contributions here and nothing really new is being said. I agree that the issue should be discussed, but this does not seem like the right forum. Thanks. - brandon b. palmer, [EMAIL PROTECTED] pgp: www.crimel

Re: [HACKERS] beta testing version

2000-12-04 Thread Don Baccus
At 02:47 PM 12/1/00 -0500, Tom Lane wrote: >All we can do is the best we can ;-). In that light, I think it's >reasonable for Postgres to proceed on the assumption that fsync does >what it claims to do, ie, all blocks are written when it returns. >We can't realistically expect to persuade a disk

Re: [HACKERS] [Fwd: Re: [CORE] Going Beta on Monday ...]

2000-12-04 Thread Larry Rosenman
Macaddr manufacturer table update now in SQL table syslog configurability improvements. * Thomas Lockhart <[EMAIL PROTECTED]> [001204 13:42]: > > I browsed through the CVS logs and made this list of the important > > stuff. There's a ton of less important stuff... > > Shall we consider this the

Re: [HACKERS] Wrong FOR UPDATE lock type

2000-12-04 Thread Jan Wieck
Mikheev, Vadim wrote: > > I'm about 99.67% sure that the lock type choosen in the > > FOR UPDATE case (line 511 of parse_relation.c) should be > > RowExclusiveLock instead of RowShareLock. Actually I get > > "Deadlock risk" debug messages when selecting FOR UPDATE

[HACKERS] [Fwd: Re: [CORE] Going Beta on Monday ...]

2000-12-04 Thread Thomas Lockhart
> I browsed through the CVS logs and made this list of the important > stuff. There's a ton of less important stuff... Shall we consider this the start of the list then? I think there may be a couple of things already mentioned in the release note stubs for 7.1 too. - Thoma

Re: [HACKERS] Using Threads?

2000-12-04 Thread The Hermit Hacker
if we were to do this in steps, I beliee that one of the major problems irght now is that we have global variables up the wazoo ... my 'thread-awareness' is limited, as I've yet to use them, so excuse my ignorance ... if we got patches that cleaned up the code in stages, moving towards a cleaner

Re: [HACKERS] Postgresql on dynix/ptx system

2000-12-04 Thread Peter Eisentraut
Radek Fleks writes: > I'm compiling (not, I'm trying to compile) last version of Postgresql on > Sequent Dynix/ptx ver 4.4.7 system. Under compilation process with gcc (ver > 2.7.2 ported on dynix/pt) is reporting several errors. It's not so interesting at this point to port PostgreSQL 7.0.*, gi

AW: AW: [HACKERS] broken locale in 7.0.2 without multibyte support (F reeBSD 4.1-RELEASE) ?

2000-12-04 Thread Zeugswetter Andreas SB
> > I am a sceptic to the many casts. Would'nt the clean > solution be, to use > > unsigned char througout the code ? > > No; see the prior discussion. > > > The casts only help to avoid compiler > > warnings or errors. They do not solve the underlying problem. > > You are mistaken. You are

Re: [HACKERS] compiling pg 7.0.3 on sco 5.0.5

2000-12-04 Thread Peter Eisentraut
Tom Lane writes: > I ask because we recently pulled "#define DISABLE_COMPLEX_MACRO" from > port/sco.h, on the grounds that various people were seeing more harm > than good from it. But I'm suddenly wondering whether those people > might've been using gcc. We can be fairly certain that they were

[HACKERS] update on compiling postgres on sco

2000-12-04 Thread Arno A. Karner
posting for others who may need, hopfuly the searchable mail list works in the future commenting out the define complex macro allowed me to compile on sco 5.0.5 using udk compiler on sco, without the c++ stuff. but scos udk solution breaks almost every thing else i compile on sco 5.0.5 when u ins

Re: [HACKERS] Using Threads?

2000-12-04 Thread Ross J. Reedstrom
Myron - Putting aside the fork/threads discussion for a moment (the reasons, both historical and other, such as inter-backend protection, are well covered in the archives), the work you did sounds like an interesting experiment in code redesign. Would you be willing to release the hacked code som

Re: [HACKERS] redundancy and disk i/o

2000-12-04 Thread Thomas Lockhart
> If you're talking about replication, PostgreSQL, Inc. will be offering a > solution to its $19,000/yr Platinum Partners shortly. It will be released > in open source form no more than two years after its release in proprietary > form. > Check out http://www.erserver.com for more details, and ht

RE: [HACKERS] Wrong FOR UPDATE lock type

2000-12-04 Thread Mikheev, Vadim
> I'm about 99.67% sure that the lock type choosen in the > FOR UPDATE case (line 511 of parse_relation.c) should be > RowExclusiveLock instead of RowShareLock. Actually I get > "Deadlock risk" debug messages when selecting FOR UPDATE and > then really UPDATE.

Re: [HACKERS] compiling pg 7.0.3 on sco 5.0.5

2000-12-04 Thread Dave Smith
Tom Lane wrote: > "Billy G. Allie" <[EMAIL PROTECTED]> writes: > >> ... The DISABLE_COMPLEX_MACRO definition was originally put in to work >> around a macro size limitation of the UnixWare 2.1 C compiler (and >> later the SCO UDK (Universal Development Kit)). If the gnu C compiler >> is being u

Re: [HACKERS] redundancy and disk i/o

2000-12-04 Thread Dominic J. Eidson
On Tue, 28 Nov 2000, Sandeep Joshi wrote: > 1. Is it possible to set up a set of redundant disks for a database? one > of them being remote from the database? Call IBM Global Services, and tell them you are interested in purchasing an RS/6000 with a 7133 SSA drives, one tray off-site using the

Re: [HACKERS] compiling pg 7.0.3 on sco 5.0.5

2000-12-04 Thread Larry Rosenman
* Tom Lane <[EMAIL PROTECTED]> [001204 09:27]: > "Billy G. Allie" <[EMAIL PROTECTED]> writes: > > ... The DISABLE_COMPLEX_MACRO definition was originally put in to work > > around a macro size limitation of the UnixWare 2.1 C compiler (and > > later the SCO UDK (Universal Development Kit)). If th

Re: [HACKERS] beta testing version

2000-12-04 Thread Vince Vielhaber
On Thu, 30 Nov 2000, Nathan Myers wrote: > Second, the transaction log is not, as has been noted far too frequently > for Vince's comfort, really written atomically. The OS has promised > to write it atomically, and given the opportunity, it will. If you pull > the plug, all promises are broken

[HACKERS] Bitmap index

2000-12-04 Thread pejac
Hi, on other RDBMS (Oracle,etc...),there is an index called bitmap index that greatly improve performance compared to btree index for boolean value (such as for a sex value,it's either M or F),i would like to know if such index will be implemented inside PostgreSQL. Best regards, PEJAC Pascal

re : Re: [HACKERS] Add-on

2000-12-04 Thread pejac
Ean13 and ean8 are bar codes for european. You can convert an ISBN or iSSN to Ean13. My addon add a new type and can convert isbn to an EAN and calculate th key of ean. More over in few day add on can store the png or jpg images of bar codes in blob type or TODO: add upc-A upc-E ean128 and other

[HACKERS] triggers and actions tree

2000-12-04 Thread Fabio Nanni
Hello all, I am new to postgreSQL. When I perform an action on a psql database (e.g. insert into a table), some more action could be induced, via trigger firing: - is it possible to know at any time the exact action chain? - is it possible to know at any time if the control is inside a trigge

[HACKERS] Wrong FOR UPDATE lock type

2000-12-04 Thread Jan Wieck
Hi, I'm about 99.67% sure that the lock type choosen in the FOR UPDATE case (line 511 of parse_relation.c) should be RowExclusiveLock instead of RowShareLock. Actually I get "Deadlock risk" debug messages when selecting FOR UPDATE and then really UPDATE.

[HACKERS] EAN13 for postgresql

2000-12-04 Thread pejac
i have wrote an application dealing with ean13 and ean8 type,how can i submit it ??

Re: [HACKERS] beta testing version

2000-12-04 Thread The Hermit Hacker
On Mon, 4 Dec 2000, Don Baccus wrote: > >A recent example of non-sinister change in another area is the work done > >to release 7.0.3. This is a release which would not have happened in > >previous cycles, since we are so close to beta on 7.1. But GB paid Tom > >Lane to work on it as part of *the

Re: [HACKERS] redundancy and disk i/o

2000-12-04 Thread Don Baccus
At 07:30 PM 11/28/00 -0800, Sandeep Joshi wrote: >Hi, >I have two questions > >1. Is it possible to set up a set of redundant disks for a database? one >of them being remote from the database? If you're talking about replication, PostgreSQL, Inc. will be offering a solution to its $19,000/yr

RE: [HACKERS] 8192 BLCKSZ ?]

2000-12-04 Thread Don Baccus
At 10:52 AM 12/2/00 +1100, Andrew Snow wrote: > > >> The cost difference between 32K vs 8K disk reads/writes are so small >> these days when compared with overall cost of the disk operation itself, >> that you can even measure it, well below 1%. Remember seek times >> advertised on disks are an av

Re: [HACKERS] Using Threads?

2000-12-04 Thread The Hermit Hacker
On Mon, 27 Nov 2000, Junfeng Zhang wrote: > Hello all, > > I am new to postgreSQL. When I read the documents, I find out the > Postmaster daemon actual spawns a new backend server process to serve > a new client request. Why not use threads instead? Is that just for a > historical reason, or som

[HACKERS] Bitmap index

2000-12-04 Thread pejac
Hi, on other RDBMS (Oracle,etc...),there is an index called bitmap index that greatly improve performance compared to btree index for boolean value (such as for a sex value,it's either M or F),i would like to know if such index will be implemented inside PostgreSQL.

AW: [HACKERS] broken locale in 7.0.2 without multibyte support (FreeBSD 4.1-RELEASE) ?

2000-12-04 Thread Zeugswetter Andreas SB
> Today I inserted (unsigned char) casts into all the function > calls I could find. This issue should be fixed as of current cvs. > Please try it again when you have time. I am a sceptic to the many casts. Would'nt the clean solution be, to use unsigned char througout the code ? The casts onl

Re: [HACKERS] beta testing version

2000-12-04 Thread The Hermit Hacker
On Sun, 3 Dec 2000, Don Baccus wrote: > At 11:59 PM 12/3/00 -0400, The Hermit Hacker wrote: > > the sanctity of the *core* server is *always* > >foremost in our minds, no matter what other projects we are working on ... > > What happens if financially things aren't entirely rosy with your > comp

Re: [HACKERS] beta testing version

2000-12-04 Thread Ron Chmara
Horst Herb wrote: > > > Branding. Phone support lines. Legal departments/Lawsuit prevention. > Figuring > > > out how to prevent open source from stealing the thunder by duplicating > ^^ > > > features. And building a _product_. > Oops.

Re: [HACKERS] Using Threads?

2000-12-04 Thread Myron Scott
I maybe wrong but I think that PGSQL is not threaded mostly due to historical reasons. It looks to me like the source has developed over time where much of the source is not reentrant with many global variables throughout. In addition, the parser is generated by flex which can be made to generat

Re: AW: [HACKERS] broken locale in 7.0.2 without multibyte support (F reeBSD 4.1-RELEASE) ?

2000-12-04 Thread Tom Lane
Zeugswetter Andreas SB <[EMAIL PROTECTED]> writes: >> Today I inserted (unsigned char) casts into all the function >> calls I could find. This issue should be fixed as of current cvs. >> Please try it again when you have time. > I am a sceptic to the many casts. Would'nt the clean solution be,

Re: [HACKERS] beta testing version

2000-12-04 Thread Thomas Lockhart
> In fact, it might seem to be common courtesy... An odd choice of words coming from you Don. We are offering our services and expertise to a community outside -hackers, as a business formed in a way that this new community expects to see. Nothing special or sinister here. Other than it seems to

Re: [HACKERS] beta testing version

2000-12-04 Thread Don Baccus
At 07:11 AM 12/4/00 +, Thomas Lockhart wrote: >We are offering our services and expertise to a community outside >-hackers, as a business formed in a way that this new community expects >to see. Nothing special or sinister here. Other than it seems to have >raised the point that you expected

Re: [HACKERS] beta testing version

2000-12-04 Thread Michael Fork
Judging by the information below, taken *directly* from PostgreSQL, Inc. website, it appears that they will be releasing all code into the main source code branch -- with the exception of "Advanced Replication and Distributed Information capabilities" (to which capabilities they are referring is n

Re: [HACKERS] Using Threads?

2000-12-04 Thread Karel Zak
On Mon, 27 Nov 2000, Junfeng Zhang wrote: > Hello all, > > I am new to postgreSQL. When I read the documents, I find out the Postmaster > daemon actual spawns a new backend server process to serve a new client > request. Why not use threads instead? Is that just for a historical reason, > or som

[HACKERS] Add-on

2000-12-04 Thread pejac
i have wrote an application dealing with ean13 and ean8 type,how can i submit it ??

RE: [HACKERS] SQL 'in' vs join.

2000-12-04 Thread Andrew Snow
> Now, given the two components, each with very low costs, it chooses to > do a sequential scan on the table. I don't get it. Read the FAQ? http://www.postgresql.org/docs/faq-english.html#4.23 "4.23) Why are my subqueries using IN so slow?") - Andrew

Re: [HACKERS] compiling pg 7.0.3 on sco 5.0.5

2000-12-04 Thread Tom Lane
"Billy G. Allie" <[EMAIL PROTECTED]> writes: > ... The DISABLE_COMPLEX_MACRO definition was originally put in to work > around a macro size limitation of the UnixWare 2.1 C compiler (and > later the SCO UDK (Universal Development Kit)). If the gnu C compiler > is being used it should not be defin

[HACKERS] Re: beta testing version

2000-12-04 Thread xuyifeng
Hi, how long is PG7.1 already in beta testing? can it be released before Christmas day? can PG7.1 will recover database from system crash? Thanks, XuYifeng

Re: [HACKERS] beta testing version

2000-12-04 Thread Don Baccus
At 09:42 PM 12/3/00 -0600, Ross J. Reedstrom wrote: >This paragraph from erserver.com: > >eRServer development is currently concentrating on core, universal >functions that will enable individuals and IT professionals >to implement PostgreSQL ORDBMS solutions for mission c

Re: [HACKERS] beta testing version

2000-12-04 Thread Don Baccus
At 11:59 PM 12/3/00 -0400, The Hermit Hacker wrote: > the sanctity of the *core* server is *always* >foremost in our minds, no matter what other projects we are working on ... What happens if financially things aren't entirely rosy with your company? The problem in taking itty-bitty steps in this