Re: [GENERAL] Foreign Keys in PostgreSQL

Lists: pgsql-docspgsql-general
From: "Tiago Hermans" <thermans(at)hawaii(dot)rr(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Multi-threading on PostgreSQL?
Date: 1999-07-15 06:13:35
Message-ID: 000701bece89$2c094900$07581f18@tiago-s-dell.hawaii.rr.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs pgsql-general

Hi,

I am really impressed with the features of PostgreSQL but am wondering if we
should use this product for our project. We have tried several databases
(MySQL, Sybase ASE, Sybase ASA) and we are now looking at PostgreSQL before
releasing our service on the Internet.

My concern comes from the fact that there's no multi-threading support in
PostgreSQL and since we expect many customers to be connected at the same
time on multiple connections, I am afraid the time to perform the SQL
statements will be much longer, since they'll all be queued one after the
other. Therefore, if one query takes a long time, all the other queries have
to wait behind before being executed.

Am I missing something or are my assumptions correct?
Also, does PostgreSQL supports international characters?

Thank you for any info this.

Tiago Hermans
thermans(at)hawaii(dot)rr(dot)com


From: Chris Bitmead <chris(at)tech(dot)com(dot)au>
To: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Multi-threading on PostgreSQL?
Date: 1999-07-15 06:31:11
Message-ID: 378D802F.8FDD2726@tech.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs pgsql-general

I think you are missing something. Threads and processes, to a great
extent are 6 of one and half a dozen of the other. Postgres uses
multiple processes accessing a shared memory area. A multithreaded
database would use multiple threads accessing a shared memory area. In
most OSes, threads and processes are treated very much the same way.
Threads and processes don't necessarily have to "wait". Both threads and
processes use locks. A good multi-process implementation will beat a bad
threaded one every time.

A threaded implementation can be more efficient, specifically when
you've got hundreds of simultaneous connections, but we're not talking
about some giant leap here.

That's not to say Sybase isn't faster than PostgreSQL (or slower for
that matter. I wouldn't know). But I'd advise against putting any stock
into whether it's threaded or not. As always, do your own testing.

Tiago Hermans wrote:
>
> Hi,
>
> I am really impressed with the features of PostgreSQL but am wondering if we
> should use this product for our project. We have tried several databases
> (MySQL, Sybase ASE, Sybase ASA) and we are now looking at PostgreSQL before
> releasing our service on the Internet.
>
> My concern comes from the fact that there's no multi-threading support in
> PostgreSQL and since we expect many customers to be connected at the same
> time on multiple connections, I am afraid the time to perform the SQL
> statements will be much longer, since they'll all be queued one after the
> other. Therefore, if one query takes a long time, all the other queries have
> to wait behind before being executed.
>
> Am I missing something or are my assumptions correct?
> Also, does PostgreSQL supports international characters?
>
> Thank you for any info this.
>
> Tiago Hermans
> thermans(at)hawaii(dot)rr(dot)com


From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Tiago Hermans <thermans(at)hawaii(dot)rr(dot)com>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Multi-threading on PostgreSQL?
Date: 1999-07-15 13:34:53
Message-ID: 199907151334.JAA07774@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs pgsql-general

[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hi,
>
> I am really impressed with the features of PostgreSQL but am wondering if we
> should use this product for our project. We have tried several databases
> (MySQL, Sybase ASE, Sybase ASA) and we are now looking at PostgreSQL before
> releasing our service on the Internet.
>
> My concern comes from the fact that there's no multi-threading support in
> PostgreSQL and since we expect many customers to be connected at the same
> time on multiple connections, I am afraid the time to perform the SQL
> statements will be much longer, since they'll all be queued one after the
> other. Therefore, if one query takes a long time, all the other queries have
> to wait behind before being executed.
>
> Am I missing something or are my assumptions correct?
> Also, does PostgreSQL supports international characters?

We certainly process multiple queries at the same time. We are not
multi-threaded in the sense we don't run multiple queries inside the
same process. Each connection gets its own process.

I am interested to hear why you thought we only do one query at a time.
Is there some information we published or someone else published that
lead you to that conclusion.

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026


From: "Tiago Hermans" <thermans(at)hawaii(dot)rr(dot)com>
To: "Bruce Momjian" <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: RE: [GENERAL] Multi-threading on PostgreSQL?
Date: 1999-07-15 19:29:16
Message-ID: 001a01becef8$538b4540$07581f18@tiago-s-dell.hawaii.rr.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs pgsql-general

> > My concern comes from the fact that there's no multi-threading
> support in
> > PostgreSQL and since we expect many customers to be connected
> at the same
> > time on multiple connections, I am afraid the time to perform the SQL
> > statements will be much longer, since they'll all be queued one
> after the
> > other. Therefore, if one query takes a long time, all the other
> queries have
> > to wait behind before being executed.
> >
> > Am I missing something or are my assumptions correct?
> > Also, does PostgreSQL supports international characters?
>
> We certainly process multiple queries at the same time. We are not
> multi-threaded in the sense we don't run multiple queries inside the
> same process. Each connection gets its own process.
>
> I am interested to hear why you thought we only do one query at a time.
> Is there some information we published or someone else published that
> lead you to that conclusion.

In the URL: http://www.postgresql.org/doxlist.html
the "Multi-threaded" and "Parallel Query" bullets are not active. I guess
these words should be explained with a hyperlink to avoid confusion. You
have such a great product, if I didn't register on the mailing list and
posted this message, I would have been totally wrong in my assumptions, and
looking at the history of the list, I am not the only one.

Anyway, we are downloading PostgreSQL today and will port our SQL code to
try it out.

Thank you for your reply and clarification on this.

Tiago


From: Simeó <simeo(at)nil(dot)fut(dot)es>
To: pgsql-general(at)postgreSQL(dot)org
Subject: Foreign Keys in PostgreSQL
Date: 1999-07-15 20:21:34
Message-ID: XFMail.990715222134.simeo@tinet.fut.es
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs pgsql-general

How can I implement foreign Keys with postgres? thanks.

----------------
Simeó Reig
simeo(at)tinet(dot)org
Barcelona (SPAIN)
-----------------


From: Howie <caffeine(at)toodarkpark(dot)org>
To: Simeó <simeo(at)nil(dot)fut(dot)es>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Foreign Keys in PostgreSQL
Date: 1999-07-16 01:47:26
Message-ID: Pine.LNX.3.96.990716014630.175D-100000@rabies.toodarkpark.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs pgsql-general

On Thu, 15 Jul 1999, [iso-8859-1] Sime wrote:

> How can I implement foreign Keys with postgres? thanks.

pgsql/contrib/spi has refint.c. you'd want to compile that and execute
refint.sql. it also comes with documentation.

refit is, for now, the way postgres handles foreign keys. two functions
are involved, check_foreign_key() and check_primary_key().

---
Howie <caffeine(at)toodarkpark(dot)org> URL: http://www.toodarkpark.org
"The distance between insanity and genius is measured only by success."


From: Simeó <simeo(at)nil(dot)fut(dot)es>
To: Howie <caffeine(at)toodarkpark(dot)org>
Cc: pgsql-general(at)postgreSQL(dot)org, Simeó <simeo(at)nil(dot)fut(dot)es>
Subject: Re: [GENERAL] Foreign Keys in PostgreSQL
Date: 1999-07-17 18:07:24
Message-ID: XFMail.990717200724.simeo@tinet.fut.es
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs pgsql-general

El dia 16-Jul-99 en Howie va escriure :
> refit is, for now, the way postgres handles foreign keys. two functions
> are involved, check_foreign_key() and check_primary_key().

Hello Howie, thanks for your help.I have a problem I don't Have any refi*.c.
Where I can find it ?. Thanks again

.~. ----------------
< Simeó Reig
// \\ simeo(at)tinet(dot)org
/( 0 )\ Tarragona (SPAIN)
^ ^ -----------------


From: Howie <caffeine(at)toodarkpark(dot)org>
To: Simeó <simeo(at)nil(dot)fut(dot)es>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Foreign Keys in PostgreSQL
Date: 1999-07-18 20:57:43
Message-ID: Pine.LNX.3.96.990718205658.25413A-100000@rabies.toodarkpark.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs pgsql-general

On Sat, 17 Jul 1999, [iso-8859-1] Sime wrote:

> El dia 16-Jul-99 en Howie va escriure :
> > refit is, for now, the way postgres handles foreign keys. two functions
> > are involved, check_foreign_key() and check_primary_key().
>
> Hello Howie, thanks for your help.I have a problem I don't Have any refi*.c.
> Where I can find it ?. Thanks again

should be in pgsql_src_root/contrib/spi/. im not sure if it comes with
non-source distributions ( yet another reason to get source tarballs and
not rely on package management ).

---
Howie <caffeine(at)toodarkpark(dot)org> URL: http://www.toodarkpark.org
"The distance between insanity and genius is measured only by success."


From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Tiago Hermans <thermans(at)hawaii(dot)rr(dot)com>
Cc: webmaster(at)postgresql(dot)org, PostgreSQL-documentation <docs(at)postgresql(dot)org>
Subject: Re: [GENERAL] Multi-threading on PostgreSQL?
Date: 1999-09-23 17:36:42
Message-ID: 199909231736.NAA20278@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs pgsql-general

Vince, can you please make this change for me?

[Charset iso-8859-1 unsupported, filtering to ASCII...]
> > > My concern comes from the fact that there's no multi-threading
> > support in
> > > PostgreSQL and since we expect many customers to be connected
> > at the same
> > > time on multiple connections, I am afraid the time to perform the SQL
> > > statements will be much longer, since they'll all be queued one
> > after the
> > > other. Therefore, if one query takes a long time, all the other
> > queries have
> > > to wait behind before being executed.
> > >
> > > Am I missing something or are my assumptions correct?
> > > Also, does PostgreSQL supports international characters?
> >
> > We certainly process multiple queries at the same time. We are not
> > multi-threaded in the sense we don't run multiple queries inside the
> > same process. Each connection gets its own process.
> >
> > I am interested to hear why you thought we only do one query at a time.
> > Is there some information we published or someone else published that
> > lead you to that conclusion.
>
>
> In the URL: http://www.postgresql.org/doxlist.html
> the "Multi-threaded" and "Parallel Query" bullets are not active. I guess
> these words should be explained with a hyperlink to avoid confusion. You
> have such a great product, if I didn't register on the mailing list and
> posted this message, I would have been totally wrong in my assumptions, and
> looking at the history of the list, I am not the only one.
>
> Anyway, we are downloading PostgreSQL today and will port our SQL code to
> try it out.
>
> Thank you for your reply and clarification on this.
>
> Tiago
>
>

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026