summaryrefslogtreecommitdiff
path: root/doc/TODO.detail/pool
blob: 0a809e148ff9b0c215534d0a31b9ca472e4c4485 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
From pgsql-hackers-owner+M4897@hub.org Wed Jul 12 00:15:33 2000
Received: from hub.org (root@hub.org [216.126.84.1])
	by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id AAA06129
	for <pgman@candle.pha.pa.us>; Wed, 12 Jul 2000 00:15:32 -0400 (EDT)
Received: from hub.org (majordom@localhost [127.0.0.1])
	by hub.org (8.10.1/8.10.1) with SMTP id e6C4FiW14410;
	Wed, 12 Jul 2000 00:15:44 -0400 (EDT)
Received: from onyx-technologies.com (iron.onyx-technologies.com [216.205.44.194] (may be forged))
	by hub.org (8.10.1/8.10.1) with ESMTP id e6C4ECW07902
	for <pgsql-hackers@hub.org>; Wed, 12 Jul 2000 00:14:12 -0400 (EDT)
Received: from onyx-technologies.com (collins.onyx-technologies.com [192.168.188.10])
	by onyx-technologies.com (8.9.2/8.9.0) with ESMTP id AAA14868
	for <pgsql-hackers@hub.org>; Wed, 12 Jul 2000 00:11:43 -0400 (EDT)
Message-ID: <396BE1B6.F755C5CE@onyx-technologies.com>
Date: Tue, 11 Jul 2000 23:10:46 -0400
From: Jeffery Collins <collins@onyx-technologies.com>
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.14-15mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-hackers@hub.org
Subject: Re: [HACKERS] Connection pooling.
References: <20000711185318.W25571@fw.wintelcom.net> <396BEA84.1A06F51F@nimrod.itg.telecom.com.au>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailing-List: pgsql-hackers@postgresql.org
Precedence: bulk
Sender: pgsql-hackers-owner@hub.org
Status: ORr

It seems like a first step would be to just have postmaster cache unused
connections.  In other words if a client closes a connection, postmaster
keeps the connection and the child process around for the next connect
request.  This has many of your advantages, but not all.  However, it seems
like it would be simpler than attempting to multiplex a connection between
multiple clients.

Jeff

>
> Alfred Perlstein wrote:
> >
> > In an effort to complicate the postmaster beyond recognition I'm
> > proposing an idea that I hope can be useful to the developers.
> >
> > Connection pooling:
> >
> > The idea is to have the postmaster multiplex and do hand-offs of
> > database connections to other postgresql processes when the max
> > connections has been exceeded.
> >
> > This allows several gains:
> >
> > 1) Postgresql can support a large number of connections without
> > requiring a large amount of processes to do so.
> >
> > 2) Connection startup/finish will be cheaper because Postgresql
> > processes will not exit and need to reninit things such as shared
> > memory attachments and file opens.  This will also reduce the load
> > on the supporting operating system and make postgresql much 'cheaper'
> > to run on systems that don't support the fork() model of execution
> > gracefully.
> >
> > 3) Long running connections can be preempted at transaction boundries
> > allowing other connections to gain process timeslices from the
> > connection pool.
> >
> > The idea is to make the postmaster that accepts connections a broker
> > for the connections.  It will dole out descriptors using file
> > descriptor passing to children.  If there's a demand for connections
> > meaning that all the postmasters are busy and there are pending
> > connections the postmaster can ask for a yeild on one of the
> > connections.
> >
> > A yeild involves the child postgresql process passing back the
> > client connection at a transaction boundry (between transactions)
> > so it can later be given to another (perhaps the same) child process.
> >
> > I spoke with Bruce briefly about this and he suggested that system
> > tables containing unique IDs could be used to identify passed
> > connections to the children and back to the postmaster.
> >
> > When a handoff occurs, the descriptor along with an ID referencing
> > things like temp tables and enviornment variables and authentication
> > information could be handed out as well allowing the child to resume
> > service to the interrupted connection.
> >
> > I really don't have the knowledge of Postgresql internals to
> > accomplish this, but the concepts are simple and the gains would
> > seem to be very high.
> >
> > Comments?
> >
> > --
> > -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
> > "I have the heart of a child; I keep it in a jar on my desk."


From pgsql-hackers-owner+M4904@hub.org Wed Jul 12 01:24:09 2000
Received: from hub.org (root@hub.org [216.126.84.1])
	by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id BAA06757
	for <pgman@candle.pha.pa.us>; Wed, 12 Jul 2000 01:24:08 -0400 (EDT)
Received: from hub.org (majordom@localhost [127.0.0.1])
	by hub.org (8.10.1/8.10.1) with SMTP id e6C5OLW65679;
	Wed, 12 Jul 2000 01:24:21 -0400 (EDT)
Received: from fw.wintelcom.net (bright@ns1.wintelcom.net [209.1.153.20])
	by hub.org (8.10.1/8.10.1) with ESMTP id e6C5MkW61040
	for <pgsql-hackers@hub.org>; Wed, 12 Jul 2000 01:22:46 -0400 (EDT)
Received: (from bright@localhost)
	by fw.wintelcom.net (8.10.0/8.10.0) id e6C5Md429901;
	Tue, 11 Jul 2000 22:22:39 -0700 (PDT)
Date: Tue, 11 Jul 2000 22:22:39 -0700
From: Alfred Perlstein <bright@wintelcom.net>
To: Chris Bitmead <chrisb@nimrod.itg.telstra.com.au>
Cc: pgsql-hackers@hub.org
Subject: Re: [HACKERS] Connection pooling.
Message-ID: <20000711222239.X25571@fw.wintelcom.net>
References: <20000711185318.W25571@fw.wintelcom.net> <396BEA84.1A06F51F@nimrod.itg.telecom.com.au>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2i
In-Reply-To: <396BEA84.1A06F51F@nimrod.itg.telecom.com.au>; from chrisb@nimrod.itg.telstra.com.au on Wed, Jul 12, 2000 at 01:48:20PM +1000
X-Mailing-List: pgsql-hackers@postgresql.org
Precedence: bulk
Sender: pgsql-hackers-owner@hub.org
Status: OR

* Chris Bitmead <chrisb@nimrod.itg.telstra.com.au> [000711 20:53] wrote:
> 
> Seems a lot trickier than you think. A backend can only be running
> one transaction at a time, so you'd have to keep track of which backends
> are in the middle of a transaction. I can imagine race conditions here.
> And backends can have contexts that are set by various clients using
> SET and friends. Then you'd have to worry about authentication each
> time. And you'd have to have algorithms for cleaning up old processes
> and/or dead processes. It all really sounds a bit hard. 

The backends can simply inform the postmaster when they are ready
either because they are done with a connection or because they
have just closed a transaction.

All the state (auth/temp tables) can be held in the system tables.

It's complicated, but no where on the order of something like
a new storage manager.

-Alfred

From bright@fw.wintelcom.net Wed Jul 12 01:34:30 2000
Received: from fw.wintelcom.net (bright@ns1.wintelcom.net [209.1.153.20])
	by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id BAA06793
	for <pgman@candle.pha.pa.us>; Wed, 12 Jul 2000 01:34:29 -0400 (EDT)
Received: (from bright@localhost)
	by fw.wintelcom.net (8.10.0/8.10.0) id e6C5Z1f00384;
	Tue, 11 Jul 2000 22:35:01 -0700 (PDT)
Date: Tue, 11 Jul 2000 22:35:00 -0700
From: Alfred Perlstein <bright@wintelcom.net>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Jeffery Collins <collins@onyx-technologies.com>, pgsql-hackers@hub.org
Subject: Re: [HACKERS] Connection pooling.
Message-ID: <20000711223500.Z25571@fw.wintelcom.net>
References: <396BE1B6.F755C5CE@onyx-technologies.com> <200007120428.AAA06357@candle.pha.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2i
In-Reply-To: <200007120428.AAA06357@candle.pha.pa.us>; from pgman@candle.pha.pa.us on Wed, Jul 12, 2000 at 12:28:46AM -0400
Status: OR

* Bruce Momjian <pgman@candle.pha.pa.us> [000711 21:31] wrote:
> > It seems like a first step would be to just have postmaster cache unused
> > connections.  In other words if a client closes a connection, postmaster
> > keeps the connection and the child process around for the next connect
> > request.  This has many of your advantages, but not all.  However, it seems
> > like it would be simpler than attempting to multiplex a connection between
> > multiple clients.
> > 
> 
> This does seem like a good optimization.

I'm not sure if the postmaster is needed besideds just to fork/exec
the backend, if so then when a backend finishes it can just call
accept() on the listening socket inherited from the postmaster to
get the next incomming connection.

-Alfred

From pgsql-hackers-owner+M4906@hub.org Wed Jul 12 01:36:44 2000
Received: from hub.org (root@hub.org [216.126.84.1])
	by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id BAA06806
	for <pgman@candle.pha.pa.us>; Wed, 12 Jul 2000 01:36:44 -0400 (EDT)
Received: from hub.org (majordom@localhost [127.0.0.1])
	by hub.org (8.10.1/8.10.1) with SMTP id e6C5akW94517;
	Wed, 12 Jul 2000 01:36:46 -0400 (EDT)
Received: from fw.wintelcom.net (bright@ns1.wintelcom.net [209.1.153.20])
	by hub.org (8.10.1/8.10.1) with ESMTP id e6C5ZCW88503
	for <pgsql-hackers@hub.org>; Wed, 12 Jul 2000 01:35:12 -0400 (EDT)
Received: (from bright@localhost)
	by fw.wintelcom.net (8.10.0/8.10.0) id e6C5Z1f00384;
	Tue, 11 Jul 2000 22:35:01 -0700 (PDT)
Date: Tue, 11 Jul 2000 22:35:00 -0700
From: Alfred Perlstein <bright@wintelcom.net>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Jeffery Collins <collins@onyx-technologies.com>, pgsql-hackers@hub.org
Subject: Re: [HACKERS] Connection pooling.
Message-ID: <20000711223500.Z25571@fw.wintelcom.net>
References: <396BE1B6.F755C5CE@onyx-technologies.com> <200007120428.AAA06357@candle.pha.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2i
In-Reply-To: <200007120428.AAA06357@candle.pha.pa.us>; from pgman@candle.pha.pa.us on Wed, Jul 12, 2000 at 12:28:46AM -0400
X-Mailing-List: pgsql-hackers@postgresql.org
Precedence: bulk
Sender: pgsql-hackers-owner@hub.org
Status: OR

* Bruce Momjian <pgman@candle.pha.pa.us> [000711 21:31] wrote:
> > It seems like a first step would be to just have postmaster cache unused
> > connections.  In other words if a client closes a connection, postmaster
> > keeps the connection and the child process around for the next connect
> > request.  This has many of your advantages, but not all.  However, it seems
> > like it would be simpler than attempting to multiplex a connection between
> > multiple clients.
> > 
> 
> This does seem like a good optimization.

I'm not sure if the postmaster is needed besideds just to fork/exec
the backend, if so then when a backend finishes it can just call
accept() on the listening socket inherited from the postmaster to
get the next incomming connection.

-Alfred

From pgsql-hackers-owner+M4907@hub.org Wed Jul 12 01:55:39 2000
Received: from hub.org (root@hub.org [216.126.84.1])
	by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id BAA06881
	for <pgman@candle.pha.pa.us>; Wed, 12 Jul 2000 01:55:38 -0400 (EDT)
Received: from hub.org (majordom@localhost [127.0.0.1])
	by hub.org (8.10.1/8.10.1) with SMTP id e6C5tnW34576;
	Wed, 12 Jul 2000 01:55:49 -0400 (EDT)
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
	by hub.org (8.10.1/8.10.1) with ESMTP id e6C5rfW28119
	for <pgsql-hackers@hub.org>; Wed, 12 Jul 2000 01:53:42 -0400 (EDT)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
	by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id BAA21895;
	Wed, 12 Jul 2000 01:52:56 -0400 (EDT)
To: Chris Bitmead <chrisb@nimrod.itg.telstra.com.au>
cc: Alfred Perlstein <bright@wintelcom.net>, pgsql-hackers@hub.org
Subject: Re: [HACKERS] Connection pooling. 
In-reply-to: <396BEA84.1A06F51F@nimrod.itg.telecom.com.au> 
References: <20000711185318.W25571@fw.wintelcom.net> <396BEA84.1A06F51F@nimrod.itg.telecom.com.au>
Comments: In-reply-to Chris Bitmead <chrisb@nimrod.itg.telstra.com.au>
	message dated "Wed, 12 Jul 2000 13:48:20 +1000"
Date: Wed, 12 Jul 2000 01:52:56 -0400
Message-ID: <21892.963381176@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
X-Mailing-List: pgsql-hackers@postgresql.org
Precedence: bulk
Sender: pgsql-hackers-owner@hub.org
Status: OR

Chris Bitmead <chrisb@nimrod.itg.telstra.com.au> writes:
> Seems a lot trickier than you think. A backend can only be running
> one transaction at a time, so you'd have to keep track of which backends
> are in the middle of a transaction. I can imagine race conditions here.

Aborting out of a transaction is no problem; we have code for that
anyway.  More serious problems:

* We have no code for reassigning a backend to a different database,
  so the pooling would have to be per-database.

* AFAIK there is no portable way to pass a socket connection from the
  postmaster to an already-existing backend process.  If you do a
  fork() then the connection is inherited ... otherwise you've got a
  problem.  (You could work around this if the postmaster relays
  every single byte in both directions between client and backend,
  but the performance problems with that should be obvious.)

> And backends can have contexts that are set by various clients using
> SET and friends.

Resetting SET variables would be a problem, and there's also the
assigned user name to be reset.  This doesn't seem impossible, but
it does seem tedious and error-prone.  (OTOH, Peter E's recent work
on guc.c might have unified option-handling enough to bring it
within reason.)

The killer problem here is that you can't hand off a connection
accepted by the postmaster to a backend except by fork() --- at least
not with methods that work on a wide variety of Unixen.  Unless someone
has a way around that, I think the idea is dead in the water; the lesser
issues don't matter.

			regards, tom lane

From pgsql-hackers-owner+M4910@hub.org Wed Jul 12 02:24:16 2000
Received: from hub.org (root@hub.org [216.126.84.1])
	by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id CAA11184
	for <pgman@candle.pha.pa.us>; Wed, 12 Jul 2000 02:24:15 -0400 (EDT)
Received: from hub.org (majordom@localhost [127.0.0.1])
	by hub.org (8.10.1/8.10.1) with SMTP id e6C6OAW98187;
	Wed, 12 Jul 2000 02:24:10 -0400 (EDT)
Received: from acheron.rime.com.au (root@albatr.lnk.telstra.net [139.130.54.222])
	by hub.org (8.10.1/8.10.1) with ESMTP id e6C6MZW95741
	for <pgsql-hackers@hub.org>; Wed, 12 Jul 2000 02:22:36 -0400 (EDT)
Received: from oberon (Oberon.rime.com.au [203.8.195.100])
	by acheron.rime.com.au (8.9.3/8.9.3) with SMTP id QAA12845;
	Wed, 12 Jul 2000 16:16:23 +1000
Message-Id: <3.0.5.32.20000712162210.0098fb00@mail.rhyme.com.au>
X-Sender: pjw@mail.rhyme.com.au
X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32)
Date: Wed, 12 Jul 2000 16:22:10 +1000
To: Tom Lane <tgl@sss.pgh.pa.us>,
        Chris Bitmead <chrisb@nimrod.itg.telstra.com.au>
From: Philip Warner <pjw@rhyme.com.au>
Subject: Re: [HACKERS] Connection pooling. 
Cc: Alfred Perlstein <bright@wintelcom.net>, pgsql-hackers@hub.org
In-Reply-To: <21892.963381176@sss.pgh.pa.us>
References: <396BEA84.1A06F51F@nimrod.itg.telecom.com.au>
	<20000711185318.W25571@fw.wintelcom.net>
	<396BEA84.1A06F51F@nimrod.itg.telecom.com.au>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Mailing-List: pgsql-hackers@postgresql.org
Precedence: bulk
Sender: pgsql-hackers-owner@hub.org
Status: OR

At 01:52 12/07/00 -0400, Tom Lane wrote:
>
>The killer problem here is that you can't hand off a connection
>accepted by the postmaster to a backend except by fork() --- at least
>not with methods that work on a wide variety of Unixen.  Unless someone
>has a way around that, I think the idea is dead in the water; the lesser
>issues don't matter.
>

My understanding of pg client interfaces is that the client uses ont of the
pg interface libraries to make a connection to the db; they specify host &
port and get back some kind of connection object.

What stops the interface library from using the host & port to talk to the
postmaster, find the host & port the spare db server, then connect directly
to the server? This second connection is passed back in the connection object.

When the client disconnects from the server, it tells the postmaster it's
available again etc.

ie. in very rough terms:

    client calls interface to connect

    interface talks to postmaster on port 5432, says "I want a server for
xyz db"

    postmaster replies with "Try port ABCD" OR "no servers available"
    postmaster marks the nominated server as 'used'
    postmaster disconnects from client

    interface connects to port ABCD as per normal protocols
    interface fills in connection object & returns

    ...client does some work...

    client disconnects

    db server tells postmaster it's available again.


There would also need to be timeout code to handle the case where the
interface did not do the second connect.

You could  also have the interface allocate a port send it's number to the
postmaster then listen on it, but I think that would represent a potential
security hole.


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.C.N. 008 659 498)             |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|
                                 |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/

From pgsql-hackers-owner+M4912@hub.org Wed Jul 12 02:32:21 2000
Received: from hub.org (root@hub.org [216.126.84.1])
	by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id CAA11228
	for <pgman@candle.pha.pa.us>; Wed, 12 Jul 2000 02:32:20 -0400 (EDT)
Received: from hub.org (majordom@localhost [127.0.0.1])
	by hub.org (8.10.1/8.10.1) with SMTP id e6C6WWW18412;
	Wed, 12 Jul 2000 02:32:32 -0400 (EDT)
Received: from fw.wintelcom.net (bright@ns1.wintelcom.net [209.1.153.20])
	by hub.org (8.10.1/8.10.1) with ESMTP id e6C6UwW16062
	for <pgsql-hackers@hub.org>; Wed, 12 Jul 2000 02:30:58 -0400 (EDT)
Received: (from bright@localhost)
	by fw.wintelcom.net (8.10.0/8.10.0) id e6C6Uov01852;
	Tue, 11 Jul 2000 23:30:50 -0700 (PDT)
Date: Tue, 11 Jul 2000 23:30:49 -0700
From: Alfred Perlstein <bright@wintelcom.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Chris Bitmead <chrisb@nimrod.itg.telstra.com.au>, pgsql-hackers@hub.org
Subject: Re: [HACKERS] Connection pooling.
Message-ID: <20000711233049.A25571@fw.wintelcom.net>
References: <20000711185318.W25571@fw.wintelcom.net> <396BEA84.1A06F51F@nimrod.itg.telecom.com.au> <21892.963381176@sss.pgh.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2i
In-Reply-To: <21892.963381176@sss.pgh.pa.us>; from tgl@sss.pgh.pa.us on Wed, Jul 12, 2000 at 01:52:56AM -0400
X-Mailing-List: pgsql-hackers@postgresql.org
Precedence: bulk
Sender: pgsql-hackers-owner@hub.org
Status: OR

* Tom Lane <tgl@sss.pgh.pa.us> [000711 22:53] wrote:
> Chris Bitmead <chrisb@nimrod.itg.telstra.com.au> writes:
> > Seems a lot trickier than you think. A backend can only be running
> > one transaction at a time, so you'd have to keep track of which backends
> > are in the middle of a transaction. I can imagine race conditions here.
> 
> Aborting out of a transaction is no problem; we have code for that
> anyway.  More serious problems:
> 
> * We have no code for reassigning a backend to a different database,
>   so the pooling would have to be per-database.

That would need to be fixed.  How difficult would that be?

> * AFAIK there is no portable way to pass a socket connection from the
>   postmaster to an already-existing backend process.  If you do a
>   fork() then the connection is inherited ... otherwise you've got a
>   problem.  (You could work around this if the postmaster relays
>   every single byte in both directions between client and backend,
>   but the performance problems with that should be obvious.)

no, see below.

> > And backends can have contexts that are set by various clients using
> > SET and friends.
> 
> Resetting SET variables would be a problem, and there's also the
> assigned user name to be reset.  This doesn't seem impossible, but
> it does seem tedious and error-prone.  (OTOH, Peter E's recent work
> on guc.c might have unified option-handling enough to bring it
> within reason.)

What can be done is that each incomming connection can be assigned an
ID into a system table.  As options are added the system would assign
them to key-value pairs in this table.  Once someone detects that the
remote side has closed the connection the data can be destroyed, but
until then along with the descriptor passing the ID of the client
as an index into the table can be passed for the backend to fetch.

> The killer problem here is that you can't hand off a connection
> accepted by the postmaster to a backend except by fork() --- at least
> not with methods that work on a wide variety of Unixen.  Unless someone
> has a way around that, I think the idea is dead in the water; the lesser
> issues don't matter.

The code has been around since 4.2BSD, it takes a bit of #ifdef to
get it right on all systems but it's not impossible, have a look at
http://www.fhttpd.org/ for a web server that does this in a portable
fashion.

I should have a library whipped up for you guys really soon now
to handle the descriptor and message passing.

-- 
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."

From pgsql-hackers-owner+M4913@hub.org Wed Jul 12 03:06:54 2000
Received: from hub.org (root@hub.org [216.126.84.1])
	by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id DAA11529
	for <pgman@candle.pha.pa.us>; Wed, 12 Jul 2000 03:06:53 -0400 (EDT)
Received: from hub.org (majordom@localhost [127.0.0.1])
	by hub.org (8.10.1/8.10.1) with SMTP id e6C76ZW95615;
	Wed, 12 Jul 2000 03:06:35 -0400 (EDT)
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
	by hub.org (8.10.1/8.10.1) with ESMTP id e6C74gW93358
	for <pgsql-hackers@hub.org>; Wed, 12 Jul 2000 03:04:42 -0400 (EDT)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
	by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id DAA22136;
	Wed, 12 Jul 2000 03:04:13 -0400 (EDT)
To: Alfred Perlstein <bright@wintelcom.net>
cc: Chris Bitmead <chrisb@nimrod.itg.telstra.com.au>, pgsql-hackers@hub.org
Subject: Re: [HACKERS] Connection pooling. 
In-reply-to: <20000711233049.A25571@fw.wintelcom.net> 
References: <20000711185318.W25571@fw.wintelcom.net> <396BEA84.1A06F51F@nimrod.itg.telecom.com.au> <21892.963381176@sss.pgh.pa.us> <20000711233049.A25571@fw.wintelcom.net>
Comments: In-reply-to Alfred Perlstein <bright@wintelcom.net>
	message dated "Tue, 11 Jul 2000 23:30:49 -0700"
Date: Wed, 12 Jul 2000 03:04:13 -0400
Message-ID: <22133.963385453@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
X-Mailing-List: pgsql-hackers@postgresql.org
Precedence: bulk
Sender: pgsql-hackers-owner@hub.org
Status: OR

Alfred Perlstein <bright@wintelcom.net> writes:
> * Tom Lane <tgl@sss.pgh.pa.us> [000711 22:53] wrote:
>> The killer problem here is that you can't hand off a connection
>> accepted by the postmaster to a backend except by fork() --- at least
>> not with methods that work on a wide variety of Unixen.

> The code has been around since 4.2BSD, it takes a bit of #ifdef to
> get it right on all systems but it's not impossible, have a look at
> http://www.fhttpd.org/ for a web server that does this in a portable
> fashion.

I looked at this to see if it would teach me something I didn't know.
It doesn't.  It depends on sendmsg() which is a BSD-ism and not very
portable.

			regards, tom lane

From pgsql-hackers-owner+M4914@hub.org Wed Jul 12 03:12:40 2000
Received: from hub.org (root@hub.org [216.126.84.1])
	by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id DAA11597
	for <pgman@candle.pha.pa.us>; Wed, 12 Jul 2000 03:12:39 -0400 (EDT)
Received: from hub.org (majordom@localhost [127.0.0.1])
	by hub.org (8.10.1/8.10.1) with SMTP id e6C7CjW13459;
	Wed, 12 Jul 2000 03:12:45 -0400 (EDT)
Received: from fw.wintelcom.net (bright@ns1.wintelcom.net [209.1.153.20])
	by hub.org (8.10.1/8.10.1) with ESMTP id e6C7B8W07036
	for <pgsql-hackers@hub.org>; Wed, 12 Jul 2000 03:11:08 -0400 (EDT)
Received: (from bright@localhost)
	by fw.wintelcom.net (8.10.0/8.10.0) id e6C79lE02841;
	Wed, 12 Jul 2000 00:09:47 -0700 (PDT)
Date: Wed, 12 Jul 2000 00:09:47 -0700
From: Alfred Perlstein <bright@wintelcom.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Chris Bitmead <chrisb@nimrod.itg.telstra.com.au>, pgsql-hackers@hub.org
Subject: Re: [HACKERS] Connection pooling.
Message-ID: <20000712000947.D25571@fw.wintelcom.net>
References: <20000711185318.W25571@fw.wintelcom.net> <396BEA84.1A06F51F@nimrod.itg.telecom.com.au> <21892.963381176@sss.pgh.pa.us> <20000711233049.A25571@fw.wintelcom.net> <22133.963385453@sss.pgh.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2i
In-Reply-To: <22133.963385453@sss.pgh.pa.us>; from tgl@sss.pgh.pa.us on Wed, Jul 12, 2000 at 03:04:13AM -0400
X-Mailing-List: pgsql-hackers@postgresql.org
Precedence: bulk
Sender: pgsql-hackers-owner@hub.org
Status: OR

* Tom Lane <tgl@sss.pgh.pa.us> [000712 00:04] wrote:
> Alfred Perlstein <bright@wintelcom.net> writes:
> > * Tom Lane <tgl@sss.pgh.pa.us> [000711 22:53] wrote:
> >> The killer problem here is that you can't hand off a connection
> >> accepted by the postmaster to a backend except by fork() --- at least
> >> not with methods that work on a wide variety of Unixen.
> 
> > The code has been around since 4.2BSD, it takes a bit of #ifdef to
> > get it right on all systems but it's not impossible, have a look at
> > http://www.fhttpd.org/ for a web server that does this in a portable
> > fashion.
> 
> I looked at this to see if it would teach me something I didn't know.
> It doesn't.  It depends on sendmsg() which is a BSD-ism and not very
> portable.

It's also specified by Posix.1g if that means anything.

-Alfred

From pgsql-hackers-owner+M4916@hub.org Wed Jul 12 03:49:58 2000
Received: from hub.org (root@hub.org [216.126.84.1])
	by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id DAA11736
	for <pgman@candle.pha.pa.us>; Wed, 12 Jul 2000 03:49:58 -0400 (EDT)
Received: from hub.org (majordom@localhost [127.0.0.1])
	by hub.org (8.10.1/8.10.1) with SMTP id e6C7oBW95547;
	Wed, 12 Jul 2000 03:50:11 -0400 (EDT)
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
	by hub.org (8.10.1/8.10.1) with ESMTP id e6C7mPW93141
	for <pgsql-hackers@hub.org>; Wed, 12 Jul 2000 03:48:25 -0400 (EDT)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
	by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id DAA22297;
	Wed, 12 Jul 2000 03:47:37 -0400 (EDT)
To: Philip Warner <pjw@rhyme.com.au>
cc: Chris Bitmead <chrisb@nimrod.itg.telstra.com.au>,
        Alfred Perlstein <bright@wintelcom.net>, pgsql-hackers@hub.org
Subject: Re: [HACKERS] Connection pooling. 
In-reply-to: <3.0.5.32.20000712162210.0098fb00@mail.rhyme.com.au> 
References: <396BEA84.1A06F51F@nimrod.itg.telecom.com.au> <20000711185318.W25571@fw.wintelcom.net> <396BEA84.1A06F51F@nimrod.itg.telecom.com.au> <3.0.5.32.20000712162210.0098fb00@mail.rhyme.com.au>
Comments: In-reply-to Philip Warner <pjw@rhyme.com.au>
	message dated "Wed, 12 Jul 2000 16:22:10 +1000"
Date: Wed, 12 Jul 2000 03:47:37 -0400
Message-ID: <22294.963388057@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
X-Mailing-List: pgsql-hackers@postgresql.org
Precedence: bulk
Sender: pgsql-hackers-owner@hub.org
Status: OR

Philip Warner <pjw@rhyme.com.au> writes:
> What stops the interface library from using the host & port to talk to
> the postmaster, find the host & port the spare db server, then connect
> directly to the server?

You're assuming that we can change the on-the-wire protocol freely and
only the API presented by the client libraries matters.  In a perfect
world that might be true, but reality is that we can't change the wire
protocol easily.  If we do, it breaks all existing precompiled clients.
Updating clients can be an extremely painful experience in multiple-
machine installations.
	
Also, we don't have just one set of client libraries to fix.  There are
at least three client-side implementations that don't depend on libpq.

We have done protocol updates in the past --- in fact I was responsible
for the last one.  (And I'm still carrying the scars, which is why I'm
not too enthusiastic about another one.)  It's not impossible, but it
needs more evidence than "this should speed up connections by
I-don't-know-how-much"...

It might also be worth pointing out that the goal was to speed up the
end-to-end connection time.  Redirecting as you suggest is not free
(at minimum it would appear to require two TCP connection setups and two
authentication cycles).  What evidence have you got that it'd be faster
than spawning a new backend?

I tend to agree with the opinion that connection-pooling on the client
side offers more bang for the buck than we could hope to get by doing
surgery on the postmaster/backend setup.

Also, to return to the original point, AFAIK we have not tried hard
to cut the backend startup time, other than the work that was done
a year or so back to eliminate exec() of a separate executable.
It'd be worth looking to see what could be done there with zero
impact on existing clients.

			regards, tom lane

From pgsql-hackers-owner+M16940@postgresql.org Sun Dec 23 23:06:28 2001
Return-path: <pgsql-hackers-owner+M16940@postgresql.org>
Received: from rs.postgresql.org (server1.pgsql.org [64.39.15.238] (may be forged))
	by candle.pha.pa.us (8.11.6/8.10.1) with ESMTP id fBO46R429655
	for <pgman@candle.pha.pa.us>; Sun, 23 Dec 2001 23:06:27 -0500 (EST)
Received: from postgresql.org (postgresql.org [64.49.215.8])
	by rs.postgresql.org (8.11.6/8.11.6) with ESMTP id fBO40oN57016;
	Sun, 23 Dec 2001 22:00:50 -0600 (CST)
	(envelope-from pgsql-hackers-owner+M16940@postgresql.org)
Received: from relay.pair.com (relay1.pair.com [209.68.1.20])
	by postgresql.org (8.11.3/8.11.4) with SMTP id fBID0um78493
	for <pgsql-hackers@postgresql.org>; Tue, 18 Dec 2001 08:00:56 -0500 (EST)
	(envelope-from ml@augustz.com)
Received: (qmail 79914 invoked from network); 18 Dec 2001 13:00:58 -0000
Received: from acz01997-2.pomona.edu (HELO Microsoft) (134.173.91.3)
  by relay1.pair.com with SMTP; 18 Dec 2001 13:00:58 -0000
X-pair-Authenticated: 134.173.91.3
From: "August Zajonc" <ml@augustz.com>
To: <pgsql-hackers@postgresql.org>
Subject: [HACKERS] Connection Pooling, a year later
Date: Tue, 18 Dec 2001 05:00:57 -0800
Message-ID: <OJEJIPPNGKHEBGFEHPLMAEPGCCAA.ml@augustz.com>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
Status: OR

I feel there was a reasonably nice client side attempt at this using a
worker pool model or something. Can't seem to track it down at this moment.
Also would spread queries in different ways to get a hot backup equivalent
etc. It was slick.

The key is that pgsql be able to support a very significant number of
transactions. Be neat to see some numbers on your attempt.

Site I used to run had 6 front end webservers running PHP apps. Each
persistent connection (a requirement to avoid overhead of set-up/teardowns)
lived as long as the httpd process lived, even if idle. That meant at 250
processes per server we had a good 1500 connections clicking over. Our
feeling was that rather than growing to 3,000 connections as the frontend
grew, why not pool those connections off each machine down to perhaps
75/machine worker threads that actually did the work.

Looks like that's not an issue if these backends suck up few resources.
Doing something similar with MySQL we'd experiance problems if we got into
the 2,000 connection range. (kernel/system limits bumped plenty high).

While we are on TODO's I would like to point out that some way to fully
vacume (ie recover deleted and changed) while a db is in full swing is
critical to larger installtions. We did 2 billion queries between reboots on
a quad zeon MySQL box, and those are real user based queries not data loads
or anything like that. At 750-1000 queries/second bringing the database down
or seriously degrading its performance is not a good option.

Enjoy playing with pgsql as always....

- AZ


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

From dhogaza@pacifier.com Tue Dec 18 11:15:06 2001
Return-path: <dhogaza@pacifier.com>
Received: from asteroid.pacifier.com ([199.2.117.154])
	by candle.pha.pa.us (8.11.6/8.10.1) with ESMTP id fBIGF5419342
	for <pgman@candle.pha.pa.us>; Tue, 18 Dec 2001 11:15:05 -0500 (EST)
Received: from pacifier.com (dsl-dhogaza.pacifier.net [207.202.226.68])
	by asteroid.pacifier.com (8.11.2/8.11.1) with ESMTP id fBIGEGe29925;
	Tue, 18 Dec 2001 08:14:17 -0800 (PST)
Message-ID: <3C1F6B81.10500@pacifier.com>
Date: Tue, 18 Dec 2001 08:14:57 -0800
From: Don Baccus <dhogaza@pacifier.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6) Gecko/20011120
X-Accept-Language: en-us
MIME-Version: 1.0
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: mlw <markw@mohawksoft.com>, owensmk@earthlink.net,
   pgsql-hackers@postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: [HACKERS] Connection Pooling, a year later
References: <200112180342.fBI3g4s23880@candle.pha.pa.us>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Status: OR

Bruce Momjian wrote:


> It would just be nice to have it done internally rather than have all
> the clients do it, iff it can be done cleanly.

Serious client applications that need it already do it.  Firing up an 
Oracle or most other db's isn't that lightweight a deal, either, it's 
not useful only for PG..

Personally I'd just view it as getting in the way, but then I use a 
webserver that's provided connection pooling for client threads for the 
last seven years ...

I agree with Tom that the client seems to be the best place to do this.

Among other things it isn't that difficult.  If you know how to fire up 
one connection, you know how to fire up N of them and adding logic to 
pool them afterwards is easy enough.
-- 
Don Baccus
Portland, OR
http://donb.photo.net, http://birdnotes.net, http://openacs.org


From dhogaza@pacifier.com Tue Dec 18 11:24:33 2001
Return-path: <dhogaza@pacifier.com>
Received: from asteroid.pacifier.com ([199.2.117.154])
	by candle.pha.pa.us (8.11.6/8.10.1) with ESMTP id fBIGOW421363
	for <pgman@candle.pha.pa.us>; Tue, 18 Dec 2001 11:24:33 -0500 (EST)
Received: from pacifier.com (dsl-dhogaza.pacifier.net [207.202.226.68])
	by asteroid.pacifier.com (8.11.2/8.11.1) with ESMTP id fBIGNne00442;
	Tue, 18 Dec 2001 08:23:49 -0800 (PST)
Message-ID: <3C1F6DBF.2040000@pacifier.com>
Date: Tue, 18 Dec 2001 08:24:31 -0800
From: Don Baccus <dhogaza@pacifier.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6) Gecko/20011120
X-Accept-Language: en-us
MIME-Version: 1.0
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: mlw <markw@mohawksoft.com>, owensmk@earthlink.net,
   pgsql-hackers@postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: [HACKERS] Connection Pooling, a year later
References: <200112180357.fBI3vBm24991@candle.pha.pa.us>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Status: OR

Bruce Momjian wrote:


> Yes, that is assuming you are using PHP.  If you are using something
> else, you connection pooling in there too.  All those client interfaces
> reimplementing connection pooling seems like a waste to me.


Effective pooling's pretty specific to your environment, though, so any 
general mechanism would have to provide a wide-ranging suite of 
parameters governing the number to pool, how long each handle should 
live, what to do if a handle's released by a client while in the midst 
of a transaction (AOLserver rolls back the transaction, other clients 
might want to do something else, i.e. fire a callback or the like), etc etc.

I think it would be fairly complex and for those high-throughput 
applications already written with client-side pooling no improvement.

And those are the only applications that need it.

-- 
Don Baccus
Portland, OR
http://donb.photo.net, http://birdnotes.net, http://openacs.org


From pgsql-hackers-owner+M16726@postgresql.org Tue Dec 18 11:48:16 2001
Return-path: <pgsql-hackers-owner+M16726@postgresql.org>
Received: from rs.postgresql.org (server1.pgsql.org [64.39.15.238] (may be forged))
	by candle.pha.pa.us (8.11.6/8.10.1) with ESMTP id fBIGmG422658
	for <pgman@candle.pha.pa.us>; Tue, 18 Dec 2001 11:48:16 -0500 (EST)
Received: from postgresql.org (postgresql.org [64.49.215.8])
	by rs.postgresql.org (8.11.6/8.11.6) with ESMTP id fBIGkFN40986;
	Tue, 18 Dec 2001 10:46:15 -0600 (CST)
	(envelope-from pgsql-hackers-owner+M16726@postgresql.org)
Received: from comet.pacifier.com ([199.2.117.155])
	by postgresql.org (8.11.3/8.11.4) with ESMTP id fBIGYZm93404
	for <pgsql-hackers@postgresql.org>; Tue, 18 Dec 2001 11:34:35 -0500 (EST)
	(envelope-from dhogaza@pacifier.com)
Received: from pacifier.com (dsl-dhogaza.pacifier.net [207.202.226.68])
	by comet.pacifier.com (8.11.2/8.11.1) with ESMTP id fBIGXCX29823;
	Tue, 18 Dec 2001 08:33:12 -0800 (PST)
Message-ID: <3C1F6FF1.9030606@pacifier.com>
Date: Tue, 18 Dec 2001 08:33:53 -0800
From: Don Baccus <dhogaza@pacifier.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6) Gecko/20011120
X-Accept-Language: en-us
MIME-Version: 1.0
To: Mark Pritchard <mark@tangent.net.au>
cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Connection Pooling, a year later
References: <EGECIAPHKLJFDEJBGGOBGEIJFNAA.mark@tangent.net.au>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
Status: OR

Mark Pritchard wrote:

>>I think it is the startup cost that most people want to avoid, and our's
>>is higher than most db's that use threads; at least I think so.
>>
>>It would just be nice to have it done internally rather than have all
>>the clients do it, iff it can be done cleanly.
>>
> 
> I'd add that client side connection pooling isn't effective in some cases
> anyway - one application we work with has 4 physical application servers
> running around 6 applications. Each of the applications was written by a
> different vendor, and thus a pool size of five gives you 120 open
> connections.

Tuning a central pooling mechanism to run well in this kind of situation 
isn't going to be a trivial task, either.  The next thing you'll want is 
some way to prioritize the various clients so your more serious 
applications have a better chance of getting a pool.

Or you'll want to set up subpools so they don't compete with each other, 
in effect replicating what's done now, but adding more complexity to the 
central service.

-- 
Don Baccus
Portland, OR
http://donb.photo.net, http://birdnotes.net, http://openacs.org


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

From oleg@sai.msu.su Tue Dec 18 12:05:51 2001
Return-path: <oleg@sai.msu.su>
Received: from ra.sai.msu.su (ra.sai.msu.su [158.250.29.2])
	by candle.pha.pa.us (8.11.6/8.10.1) with ESMTP id fBIH5h423591
	for <pgman@candle.pha.pa.us>; Tue, 18 Dec 2001 12:05:43 -0500 (EST)
Received: from ra (ra [158.250.29.2])
	by ra.sai.msu.su (8.9.3/8.9.3) with ESMTP id UAA18592;
	Tue, 18 Dec 2001 20:05:26 +0300 (GMT)
Date: Tue, 18 Dec 2001 20:05:26 +0300 (GMT)
From: Oleg Bartunov <oleg@sai.msu.su>
X-X-Sender: <megera@ra.sai.msu.su>
To: Don Baccus <dhogaza@pacifier.com>
cc: Bruce Momjian <pgman@candle.pha.pa.us>, mlw <markw@mohawksoft.com>,
   <owensmk@earthlink.net>, <pgsql-hackers@postgresql.org>,
   Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: [HACKERS] Connection Pooling, a year later
In-Reply-To: <3C1F6DBF.2040000@pacifier.com>
Message-ID: <Pine.GSO.4.33.0112182000400.12230-100000@ra.sai.msu.su>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Status: OR

Does schema support will resolve this discussion ?
If I understand correctly, initial arguments for connection pooling
was restriction in number of persistent connections. it's right in
current postgresql that if one wants keep connection for performance
reason to several databases the total number of connections will
doubled, trippled and so on. But if I understand schema support will
eventually put away these problem because we could keep only one
pool of connections to the *one* database.

	Oleg

On Tue, 18 Dec 2001, Don Baccus wrote:

> Bruce Momjian wrote:
>
>
> > Yes, that is assuming you are using PHP.  If you are using something
> > else, you connection pooling in there too.  All those client interfaces
> > reimplementing connection pooling seems like a waste to me.
>
>
> Effective pooling's pretty specific to your environment, though, so any
> general mechanism would have to provide a wide-ranging suite of
> parameters governing the number to pool, how long each handle should
> live, what to do if a handle's released by a client while in the midst
> of a transaction (AOLserver rolls back the transaction, other clients
> might want to do something else, i.e. fire a callback or the like), etc etc.
>
> I think it would be fairly complex and for those high-throughput
> applications already written with client-side pooling no improvement.
>
> And those are the only applications that need it.
>
>

	Regards,
		Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83


From pgsql-hackers-owner+M16748@postgresql.org Tue Dec 18 15:11:46 2001
Return-path: <pgsql-hackers-owner+M16748@postgresql.org>
Received: from rs.postgresql.org (server1.pgsql.org [64.39.15.238] (may be forged))
	by candle.pha.pa.us (8.11.6/8.10.1) with ESMTP id fBIKBj405415
	for <pgman@candle.pha.pa.us>; Tue, 18 Dec 2001 15:11:45 -0500 (EST)
Received: from postgresql.org (postgresql.org [64.49.215.8])
	by rs.postgresql.org (8.11.6/8.11.6) with ESMTP id fBIKB0N47430;
	Tue, 18 Dec 2001 14:11:00 -0600 (CST)
	(envelope-from pgsql-hackers-owner+M16748@postgresql.org)
Received: from candle.pha.pa.us (216-55-132-35.dialup.tnt01.san-diego.abac.net [216.55.132.35])
	by postgresql.org (8.11.3/8.11.4) with ESMTP id fBIJulm05030
	for <pgsql-hackers@postgresql.org>; Tue, 18 Dec 2001 14:56:47 -0500 (EST)
	(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost)
	by candle.pha.pa.us (8.11.6/8.10.1) id fBIJuVB04553;
	Tue, 18 Dec 2001 14:56:31 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-ID: <200112181956.fBIJuVB04553@candle.pha.pa.us>
Subject: Re: [HACKERS] Connection Pooling, a year later
In-Reply-To: <3C1F6ED6.6080107@pacifier.com> "from Don Baccus at Dec 18, 2001
	08:29:10 am"
To: Don Baccus <dhogaza@pacifier.com>
Date: Tue, 18 Dec 2001 14:56:31 -0500 (EST)
cc: Christopher Kings-Lynne <chriskl@familyhealth.com.au>,
   mlw <markw@mohawksoft.com>, owensmk@earthlink.net,
   pgsql-hackers@postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>
X-Mailer: ELM [version 2.4ME+ PL90 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
Status: OR

> Bruce Momjian wrote:
> 
> 
> > 
> > The trick for that is to call COMMIT before you pass the backend to a
> > new person.
> 
> 
> The failure to COMMIT is a programmer error - ROLLBACK's much safer.  At 
>   least that's what we decided in the AOLserver community, and that's 
> what the drivers for Oracle and PG (the two I maintain) implement.


Then you can issue a "BEGIN;ROLLBACK;" when you pass the session to the
next user, and "RESET ALL;" of course.

> > Now, if you want to abort a left-over transaction, you can
> > do an ABORT but that is going to show up in the server logs because an
> > ABORT without a transaction causes an error message.
> 
> 
> The connection pooling mechanism needs to track the transaction state 
> and only ROLLBACK a handle that's not in autocommit state or in the 
> midst of a BEGIN/END transaction (again, Oracle vs. PG)..

Seems like a lot of work to keep track of transaction state in the
client;  seems easier to just unconditionally issue the begin;rollback.

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

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

From pgsql-hackers-owner+M16793@postgresql.org Wed Dec 19 00:46:50 2001
Return-path: <pgsql-hackers-owner+M16793@postgresql.org>
Received: from rs.postgresql.org (server1.pgsql.org [64.39.15.238] (may be forged))
	by candle.pha.pa.us (8.11.6/8.10.1) with ESMTP id fBJ5kn426988
	for <pgman@candle.pha.pa.us>; Wed, 19 Dec 2001 00:46:49 -0500 (EST)
Received: from postgresql.org (postgresql.org [64.49.215.8])
	by rs.postgresql.org (8.11.6/8.11.6) with ESMTP id fBJ5gnN63439;
	Tue, 18 Dec 2001 23:42:49 -0600 (CST)
	(envelope-from pgsql-hackers-owner+M16793@postgresql.org)
Received: from deborah.paradise.net.nz (deborah.paradise.net.nz [203.96.152.32])
	by postgresql.org (8.11.3/8.11.4) with ESMTP id fBJ5Uvm41224
	for <pgsql-hackers@postgresql.org>; Wed, 19 Dec 2001 00:30:58 -0500 (EST)
	(envelope-from andrew@catalyst.net.nz)
Received: from heidegger.catalyst.net.nz (203-96-145-108.adsl.paradise.net.nz [203.96.145.108])
	by deborah.paradise.net.nz (Postfix) with ESMTP
	id D1C7CD194D; Wed, 19 Dec 2001 18:31:01 +1300 (NZDT)
Received: from 127.0.0.1 (ident=unknown) by heidegger.catalyst.net.nz
	with esmtp (MasqMail 0.1.15) id 16GZJK-5NU-00; Wed, 19 Dec 2001
	18:30:34 +1300
Subject: Re: [HACKERS] Connection Pooling, a year later
From: Andrew McMillan <andrew@catalyst.net.nz>
To: owensmk@earthlink.net
cc: pgsql-hackers@postgresql.org
In-Reply-To: <200112180028.fBI0Sum06915@postgresql.org>
References: <200112180028.fBI0Sum06915@postgresql.org>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Evolution/1.0 (Preview Release)
Date: 19 Dec 2001 18:30:34 +1300
Message-ID: <1008739834.25608.33.camel@kant.mcmillan.net.nz>
MIME-Version: 1.0
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
Status: OR

On Tue, 2001-12-18 at 13:46, Michael Owens wrote:
> 
> By having the postmaster map multiple clients to a fixed number of backends, 
> you achieve the happy medium: You never exceed the ideal number of active 
> backends, and at the same time you are not limited to only accepting a fixed 
> number of connections. Accepting connections can now be based on load 
> (however you wish to define it), not number.  You now make decisions based on 
> utlization.
> 
> If it were shown that even half of a backend's life consisted of idle time, 
> leasing out that idle time to another active connection would potentially 
> double the average number of simultaneous requests without (theoretically) 
> incurring any significant degradation in performance.
> 

Have you looked at the client-side connection pooling solutions out
there?

DBBalancer ( http://dbbalancer.sourceforge.net/ ) tries to sit very
transparently between your application and PostgreSQL, letting you
implement connection pooling with almost no application changes.

There was another one I came across too, but that one requires you to
make more wide-reaching changes to the application.

In my applications I have found DBBalancer to be roughly the same level
of performance as PHP persistent connections, but a lot fewer
connections are needed in the pool because they are only needed when
Apache is delivering dynamic content - not the associated static
stylesheets and images.

Regards,
					Andrew.
-- 
--------------------------------------------------------------------
Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington
WEB: http://catalyst.net.nz/        PHYS: Level 2, 150-154 Willis St
DDI: +64(4)916-7201    MOB: +64(21)635-694    OFFICE: +64(4)499-2267
       Are you enrolled at http://schoolreunions.co.nz/ yet?


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

From pgsql-hackers-owner+M16834@postgresql.org Wed Dec 19 14:17:47 2001
Return-path: <pgsql-hackers-owner+M16834@postgresql.org>
Received: from rs.postgresql.org (server1.pgsql.org [64.39.15.238] (may be forged))
	by candle.pha.pa.us (8.11.6/8.10.1) with ESMTP id fBJJHk404096
	for <pgman@candle.pha.pa.us>; Wed, 19 Dec 2001 14:17:46 -0500 (EST)
Received: from postgresql.org (postgresql.org [64.49.215.8])
	by rs.postgresql.org (8.11.6/8.11.6) with ESMTP id fBJJENN87550;
	Wed, 19 Dec 2001 13:14:23 -0600 (CST)
	(envelope-from pgsql-hackers-owner+M16834@postgresql.org)
Received: from asteroid.pacifier.com ([199.2.117.154])
	by postgresql.org (8.11.3/8.11.4) with ESMTP id fBJJ55m16181
	for <pgsql-hackers@postgresql.org>; Wed, 19 Dec 2001 14:05:05 -0500 (EST)
	(envelope-from dhogaza@pacifier.com)
Received: from pacifier.com (dsl-dhogaza.pacifier.net [207.202.226.68])
	by asteroid.pacifier.com (8.11.2/8.11.1) with ESMTP id fBJJ3fe20585;
	Wed, 19 Dec 2001 11:03:41 -0800 (PST)
Message-ID: <3C20E4B9.8090200@pacifier.com>
Date: Wed, 19 Dec 2001 11:04:25 -0800
From: Don Baccus <dhogaza@pacifier.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6) Gecko/20011120
X-Accept-Language: en-us
MIME-Version: 1.0
To: owensmk@earthlink.net
cc: Andrew McMillan <andrew@catalyst.net.nz>, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Connection Pooling, a year later
References: <200112180028.fBI0Sum06915@postgresql.org> <1008739834.25608.33.camel@kant.mcmillan.net.nz> <E16Gl55-0005ug-00@swan.prod.itd.earthlink.net>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
Status: OR

Michael Owens wrote:

> As long as each client's call is composed of a standalone transaction, there 
> is no problem with external connection pools. But what about when a client's 
> transactions spans two or more calls, such as SELECT FOR UPDATE? Then pooling 
> is not safe: it offers no assurance of what may be interjected into an open 
> transaction between calls. For example, each is a separate call to a shared 
> connection:
> 
> Client A:  BEGIN WORK; SELECT last_name from customer for update where <X>;
> 
> Client B:  BEGIN WORK; SELECT street from customer for update where <Y>;
> 
> Client A:  update customer set lastname=<modified value> where <X>; COMMIT 
> WORK;
> 
> 
> Now, isn't Client B's write lock gone with Client A's commit? Yet Client A's 
> lock is still hanging around. While Client B's commit will close it, Client B 
> has lost the assurance of its lock, defeating the purpose of SELECT FOR 
> UPDATE.
> 
> If this is corrent, then external connection pools limit what you can do with 
> the database to a single call. Any transaction spanning more than one call is 
> unsafe, because it is not isolated from other clients sharing the same 
> connection.


The general idea is that you grab a handle and hold onto it until you're 
done.  This makes the above scenario impossible.

Forgetting to commit or rollback before relenquishing the handle is 
another scenario that can lead to problems but that's already been 
discussed in detail.

-- 
Don Baccus
Portland, OR
http://donb.photo.net, http://birdnotes.net, http://openacs.org


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

From pgsql-hackers-owner+M16838@postgresql.org Wed Dec 19 15:17:32 2001
Return-path: <pgsql-hackers-owner+M16838@postgresql.org>
Received: from rs.postgresql.org (server1.pgsql.org [64.39.15.238] (may be forged))
	by candle.pha.pa.us (8.11.6/8.10.1) with ESMTP id fBJKHV408663
	for <pgman@candle.pha.pa.us>; Wed, 19 Dec 2001 15:17:32 -0500 (EST)
Received: from postgresql.org (postgresql.org [64.49.215.8])
	by rs.postgresql.org (8.11.6/8.11.6) with ESMTP id fBJKDNN89347;
	Wed, 19 Dec 2001 14:13:23 -0600 (CST)
	(envelope-from pgsql-hackers-owner+M16838@postgresql.org)
Received: from gull.prod.itd.earthlink.net (gull.mail.pas.earthlink.net [207.217.120.84])
	by postgresql.org (8.11.3/8.11.4) with ESMTP id fBJKA2m62023
	for <pgsql-hackers@postgresql.org>; Wed, 19 Dec 2001 15:10:03 -0500 (EST)
	(envelope-from owensmk@earthlink.net)
Received: from sdn-ar-004txfworp179.dialsprint.net ([158.252.142.219] helo=there)
	by gull.prod.itd.earthlink.net with smtp (Exim 3.33 #1)
	id 16Gn2K-0005YP-00; Wed, 19 Dec 2001 12:09:57 -0800
Content-Type: text/plain;
  charset="iso-8859-1"
From: Michael Owens <owensmk@earthlink.net>
Reply-To: owensmk@earthlink.net
To: Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] Connection Pooling, a year later
Date: Wed, 19 Dec 2001 14:28:14 -0600
X-Mailer: KMail [version 1.3.1]
cc: Andrew McMillan <andrew@catalyst.net.nz>, pgsql-hackers@postgresql.org
References: <200112180028.fBI0Sum06915@postgresql.org> <E16Gl55-0005ug-00@swan.prod.itd.earthlink.net> <3C20E4B9.8090200@pacifier.com>
In-Reply-To: <3C20E4B9.8090200@pacifier.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Message-ID: <E16Gn2K-0005YP-00@gull.prod.itd.earthlink.net>
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
Status: OR

On Wednesday 19 December 2001 01:04 pm, Don Baccus wrote:


> The general idea is that you grab a handle and hold onto it until you're
> done.  This makes the above scenario impossible.
>
> Forgetting to commit or rollback before relenquishing the handle is
> another scenario that can lead to problems but that's already been
> discussed in detail.

But then the shared connection is unshared, sitting idle while the client 
works in between calls, thus introducing idle time among a fixed number of 
connections. The server is doing less than it could.

I agree that this connection pool has improved things in eliminating backend 
startup time. But idle time still exists for the clients performing multiple 
calls, proportional to the product of the number of multiple call clients and 
the number of calls they make, plus the idle time between them.

However this probably only ever happens on update. Inserts and selects can be 
done in one call. And, I suppose updates comprise only a small fraction of 
the requests sent to the database. Even then, you can probably eliminate some 
multiple calls by using things such as procedures.

Factoring all that in, you can probably do as well by optimizing your 
particular database/application than by writing code.

I relent. Thanks for your thoughts.

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

From pgsql-hackers-owner+M16855@postgresql.org Thu Dec 20 01:02:51 2001
Return-path: <pgsql-hackers-owner+M16855@postgresql.org>
Received: from rs.postgresql.org (server1.pgsql.org [64.39.15.238] (may be forged))
	by candle.pha.pa.us (8.11.6/8.10.1) with ESMTP id fBK62o404294
	for <pgman@candle.pha.pa.us>; Thu, 20 Dec 2001 01:02:50 -0500 (EST)
Received: from postgresql.org (postgresql.org [64.49.215.8])
	by rs.postgresql.org (8.11.6/8.11.6) with ESMTP id fBK5xnN05417;
	Wed, 19 Dec 2001 23:59:49 -0600 (CST)
	(envelope-from pgsql-hackers-owner+M16855@postgresql.org)
Received: from deborah.paradise.net.nz (deborah.paradise.net.nz [203.96.152.32])
	by postgresql.org (8.11.3/8.11.4) with ESMTP id fBK5mvm47263
	for <pgsql-hackers@postgresql.org>; Thu, 20 Dec 2001 00:48:57 -0500 (EST)
	(envelope-from andrew@catalyst.net.nz)
Received: from heidegger.catalyst.net.nz (203-96-145-94.adsl.paradise.net.nz [203.96.145.94])
	by deborah.paradise.net.nz (Postfix) with ESMTP
	id 7407FD2B76; Thu, 20 Dec 2001 18:49:01 +1300 (NZDT)
Received: from 127.0.0.1 (ident=unknown) by heidegger.catalyst.net.nz
	with esmtp (MasqMail 0.1.15) id 16GrRk-2Ry-00; Thu, 20 Dec 2001
	13:52:28 +1300
Subject: Re: [HACKERS] Connection Pooling, a year later
From: Andrew McMillan <andrew@catalyst.net.nz>
To: owensmk@earthlink.net
cc: pgsql-hackers@postgresql.org
In-Reply-To: <E16Gl55-0005ug-00@swan.prod.itd.earthlink.net>
References: <200112180028.fBI0Sum06915@postgresql.org>
	<1008739834.25608.33.camel@kant.mcmillan.net.nz> 
	<E16Gl55-0005ug-00@swan.prod.itd.earthlink.net>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Evolution/1.0 (Preview Release)
Date: 20 Dec 2001 13:52:28 +1300
Message-ID: <1008809548.24470.48.camel@kant.mcmillan.net.nz>
MIME-Version: 1.0
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
Status: OR

On Thu, 2001-12-20 at 07:22, Michael Owens wrote:
> As long as each client's call is composed of a standalone transaction, there 
> is no problem with external connection pools. But what about when a client's 
> transactions spans two or more calls, such as SELECT FOR UPDATE? Then pooling 
> is not safe: it offers no assurance of what may be interjected into an open 
> transaction between calls. For example, each is a separate call to a shared 
> connection:
> 
> Client A:  BEGIN WORK; SELECT last_name from customer for update where <X>;
> 
> Client B:  BEGIN WORK; SELECT street from customer for update where <Y>;
> 
> Client A:  update customer set lastname=<modified value> where <X>; COMMIT 
> WORK;
> 
> 
> Now, isn't Client B's write lock gone with Client A's commit? Yet Client A's 
> lock is still hanging around. While Client B's commit will close it, Client B 
> has lost the assurance of its lock, defeating the purpose of SELECT FOR 
> UPDATE.
> 
> If this is corrent, then external connection pools limit what you can do with 
> the database to a single call. Any transaction spanning more than one call is 
> unsafe, because it is not isolated from other clients sharing the same 
> connection.

Oh, I see.  You are absolutely correct that client-side pooling wouldn't
work in that situation of course.

As an application developer nobody has forced me into such a corner yet,
however.  Long running transactions are something I avoid like the
plague.

Cheers,
					Andrew.
-- 
--------------------------------------------------------------------
Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington
WEB: http://catalyst.net.nz/        PHYS: Level 2, 150-154 Willis St
DDI: +64(4)916-7201    MOB: +64(21)635-694    OFFICE: +64(4)499-2267
       Are you enrolled at http://schoolreunions.co.nz/ yet?


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org