Return-Path: owner-postman
Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id RAA16307 for postgres-redist; Tue, 21 Jun 1994 17:22:14 -0700
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199406220022.RAA16307@nobozo.CS.Berkeley.EDU>
X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost didn't use HELO protocol
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from ists.ists.ca (ists.ists.ca [132.251.1.2]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id RAA16297 for <postgres@postgres.berkeley.edu>; Tue, 21 Jun 1994 17:22:11 -0700
Received: from [132.251.1.48] ([132.251.1.48]) by ists.ists.ca with SMTP id <98717>; Tue, 21 Jun 1994 20:21:53 -0400
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Tue, 21 Jun 1994 20:21:46 -0400
To: postgres@postgres.Berkeley.EDU
From: dunlop@ists.ists.ca (J. Douglas Dunlop)
Subject: Re: pgperl for 4.2?
Message-Id: <94Jun21.202153edt.98717@ists.ists.ca>
Resent-To: postgres-redist@postgres.Berkeley.EDU
Resent-Date: Tue, 21 Jun 94 17:22:13 -0700
Resent-XMts: smtp

Postgres users:

rj@rainbow.in-berlin.de (Robert Joop) writes:
>> the code that's in 4.2's contrib can't be compiled because a symbol's
>> name (and meaning) has changed (it is commented out in a header file,
>> and substituting it with another #define that appears to have a similar
>> meaning, PORTALS_INITIAL_SIZE, leads to a pgperl that gets a SEGVIOL
>> during the `bmake runtest`.

And Paul M. Aoki replies:
>this is my cheap hack for dealing with it.  your actual mileage, as
>always, may vary.

Sorry to say that my mileage did vary. I didn't have the problem that
Robert Joop had running under HP-UX 9.03 with postgres v4r2beta. What
follows are 2 versions of the output from testlibpg.pl.

First I did substitute PORTALS_INITIAL_SIZE for MAXPORTALS as Robert tried
and things seems to work fine. (I arrived at this work-around even before I
saw Robert's post.) Next I applied Paul Aoki's patch and then I did have
the exact problem that Robert describes. And no I don't have the 2 results
mixed up.

Notice that where the error occurs following "Portal names:" I do get a
bunch of extra commas, but the test seems to pass. Am I missing something?

So you might ask if you weren't having a problem then why try to fix it.
Well it did strike me that the MAXPORTALS being dynamic now should not be
set to a fixed value even if it did pass this fairly simple test. I figured
that pgperl was likely to break if a gave it some real work to do. Paul's
patch seemed to address this issue.

Regards,
Doug

---- Output from pgperl testlibpq.pl using MAXPORTALS -> PORTALS_INITIAL_SIZE
eol 48: testlibpq.pl
Destroying database pgperltest
Creating database pgperltest
Accessing database pgperltest

Creating relation person:
query = create person (name = char16, age = int4, location = point)

Relation person before appends:
New tuple group:
name           age            location

Appending to relation person:
query = append person (name = "fred", age = 50, location = "(50,10)"::point)
query = append person (name = "fred", age = 60, location = "(60,10)"::point)
query = append person (name = "fred", age = 70, location = "(70,10)"::point)
query = append person (name = "fred", age = 80, location = "(80,10)"::point)
query = append person (name = "fred", age = 90, location = "(90,10)"::point)
query = append person (name = "fred", age = 100, location = "(100,10)"::point)
query = append person (name = "fred", age = 110, location = "(110,10)"::point)
query = append person (name = "fred", age = 120, location = "(120,10)"::point)
query = append person (name = "fred", age = 130, location = "(130,10)"::point)
query = append person (name = "fred", age = 140, location = "(140,10)"::point)
query = append person (name = "fred", age = 150, location = "(150,10)"::point)

Relation person after appends:
New tuple group:
name           age            location
fred           50             (50,10)
fred           60             (60,10)
fred           70             (70,10)
fred           80             (80,10)
fred           90             (90,10)
fred           100            (100,10)
fred           110            (110,10)
fred           120            (120,10)
fred           130            (130,10)
fred           140            (140,10)
fred           150            (150,10)

Testing copy:

Relation person after copy:
New tuple group:
name           age            location
fred           50             (50,10)
fred           60             (60,10)
fred           70             (70,10)
fred           80             (80,10)
fred           90             (90,10)
fred           100            (100,10)
fred           110            (110,10)
fred           120            (120,10)
fred           130            (130,10)
fred           140            (140,10)
fred           150            (150,10)
bill           21             (1,2)
bob            61             (3,4)
sally          39             (5,6)

Testing other things:
Opening 2 portals:
Number of portals open: 2
Portal names: eportal, fportal, , , , , , , , , , , , , , , , , , , , , , , , ,
, , , , , .
Portal eportal is not asynchronous.
Portal eportal has 14 tuples.
Portal eportal has 14 instances.
Portal eportal has 1 groups.
Portal eportal group 0 has 14 instances.
Portal eportal tuple 0 has 3 fields.
Portal eportal tuple 0 field 2 is 7 bytes long.
Portal eportal tuple 0 field 2 is type 600.
Portal eportal tuple 0 is in group 0.
Portal eportal tuple 0 field "location" is index 2.
Portal eportal tuple 0 field 1 is name "age".
Portal eportal tuples 0 and 1 are the same type.
Portal eportal group 0 field "location" is index 2.
Closing 2 portals:
Number of portals open: 0
Portal names: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , .

Removing from relation person:
query = delete person where person.age = 50
query = delete person where person.age = 60
query = delete person where person.age = 70
query = delete person where person.age = 80
query = delete person where person.age = 90
query = delete person where person.age = 100
query = delete person where person.age = 110
query = delete person where person.age = 120
query = delete person where person.age = 130
query = delete person where person.age = 140
query = delete person where person.age = 150

Relation person after removes:
New tuple group:
name           age            location
bill           21             (1,2)
bob            61             (3,4)
sally          39             (5,6)

Printing values of global variables:
PQhost = "localhost"
PQport = "4321"
PQtty = "/dev/null"
PQoption = ""
PQdatabase = "pgperltest"
PQportset = 1
PQxactid = 0
PQtracep = 0
PQerrormsg = ""

Tests complete!

---- Output from pgperl testlibpq.pl after applying Paul's patch ---
eol 58: testlibpq.pl
Destroying database pgperltest
Creating database pgperltest
Accessing database pgperltest

Creating relation person:
query = create person (name = char16, age = int4, location = point)

Relation person before appends:
New tuple group:
name           age            location

Appending to relation person:
query = append person (name = "fred", age = 50, location = "(50,10)"::point)
query = append person (name = "fred", age = 60, location = "(60,10)"::point)
query = append person (name = "fred", age = 70, location = "(70,10)"::point)
query = append person (name = "fred", age = 80, location = "(80,10)"::point)
query = append person (name = "fred", age = 90, location = "(90,10)"::point)
query = append person (name = "fred", age = 100, location = "(100,10)"::point)
query = append person (name = "fred", age = 110, location = "(110,10)"::point)
query = append person (name = "fred", age = 120, location = "(120,10)"::point)
query = append person (name = "fred", age = 130, location = "(130,10)"::point)
query = append person (name = "fred", age = 140, location = "(140,10)"::point)
query = append person (name = "fred", age = 150, location = "(150,10)"::point)

Relation person after appends:
New tuple group:
name           age            location
fred           50             (50,10)
fred           60             (60,10)
fred           70             (70,10)
fred           80             (80,10)
fred           90             (90,10)
fred           100            (100,10)
fred           110            (110,10)
fred           120            (120,10)
fred           130            (130,10)
fred           140            (140,10)
fred           150            (150,10)

Testing copy:

Relation person after copy:
New tuple group:
name           age            location
fred           50             (50,10)
fred           60             (60,10)
fred           70             (70,10)
fred           80             (80,10)
fred           90             (90,10)
fred           100            (100,10)
fred           110            (110,10)
fred           120            (120,10)
fred           130            (130,10)
fred           140            (140,10)
fred           150            (150,10)
bill           21             (1,2)
bob            61             (3,4)
sally          39             (5,6)

Testing other things:
Opening 2 portals:
Number of portals open: 2
Segmentation fault (core dumped)

---- End of output ----


Doug
________
                       Earth Observations Lab
    _/_/_/ _/_/_/ _/   Institute for Space and Terrestrial Sciences
   _/     _/  _/ _/    4850 Keele St.,2nd Floor
  _/_/   _/  _/ _/     North York, Ontario
 _/     _/  _/ _/      Canada,M3J-3K1           dunlop@ists.ists.ca
_/_/_/ _/_/_/ _/_/_/   W:416-665-5411 H:705-445-9320 F:416-665-2032
                       http://www.eol.ists.ca/~dunlop/dunlop.html



==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"

   If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================
