Re: [HACKERS] pg_dump and large files - is this a problem?

2002-11-04 Thread Zeugswetter Andreas SB SD

Tom Lane writes:
  I think the problem is more accurately described thus:  Flex generated
  files include stdio.h before postgres.h due to the way it lays out the
  code in the output.  stdio.h does something which prevents switching to
  the large file model later on in postgres.h.  (This manifests itself in
  unistd.h, but unistd.h itself is not the problem per se.)
 
  The proposed fix was to include the flex output in some other file (such
  as the corresponding grammar file) rather than to compile it separately.
 
 I have made this change.  CVS tip should compile cleanly now on machines
 where this is an issue.

Hmm, sorry for the late response, but I was away on the (long) weekend :-(
I think your patch might be the source for Christopher's build problem 
(Compile problem on FreeBSD/Alpha).

Peter already had a patch, that I tested, modified a little, and sent him back
for inclusion into CVS.

I will attach his patch with my small fixes for cross reference.
The issue is, that you need to remove the #include bootstrap_tokens.h
line from the lex file.

Andreas



flex-patch2.gz
Description: flex-patch2.gz

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



[HACKERS] Finishing Domains...

2002-11-04 Thread Rod Taylor
I've got a couple of free days coming up, so I want to finish domain
support (Check constraints).

Is it safe to teach Var how to deal with values that do not originate
from a tuple?  Or should I create a new primnode to deal with these
types of variables.


CREATE DOMAIN dom AS integer CHECK(VALUE BETWEEN 6 AND 10);

SELECT CAST(8 AS dom);



-- 
  Rod Taylor


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



[HACKERS] Float output formatting options

2002-11-04 Thread Pedro M. Ferreira
Hi All,

This relates to the recent discussion about floating point output format.

The discussion was at a point where one parameter would be added to 
specify the number of extra digits used in fp output formatting.
The parameter would have a 0 default value, a maximum of 2 and the 
minimum remained open for discussion.

In a previous message I proposed that for double precision numbers a 
minimum value of -13 would be usefful. For single precision numbers this 
corresponds to a value of -4.

I downloaded the PG sources and added two parameters (as PGC_USERSET):

int extra_float4_digits, default 0, min -4, max 2
int extra_float8_digits, defualt 0, min -13, max 2

Compiled and tested for these functionalities. It is ok.

The afected files are:

src/backend/utils/adt/float.c
src/backend/utils/misc/guc.c
src/bin/psql/tab-complete.c
src/backend/utils/misc/postgresql.conf.sample

I used sources from Debian source package, postgresql_7.2.1-2woody2.

Diff's produced with diff -u are enclosed as attachments.
Can you comment on this (particularly the min values) ?
Also, if we concluded that there is a need of 2 more digits, should'nt 
this be the default ?

Best regards,
Pedro M. Ferreira
--
--
Pedro Miguel Frazao Fernandes Ferreira
Universidade do Algarve
Faculdade de Ciencias e Tecnologia
Campus de Gambelas
8000-117 Faro
Portugal
Tel./Fax:  (+351) 289 800950 / 289 819403
http://w3.ualg.pt/~pfrazao
--- old/postgresql-7.2.1/src/backend/utils/adt/float.c  Tue Dec 11 02:02:12 2001
+++ postgresql-7.2.1/src/backend/utils/adt/float.c  Mon Nov  4 10:32:33 2002
@@ -65,6 +65,12 @@
 #include utils/array.h
 #include utils/builtins.h
 
+/*
+ * Configuration options for float4 and float8 extra digits in output format
+ */
+
+int extra_float4_digits;
+int extra_float8_digits;
 
 #if !(NeXT  NX_CURRENT_COMPILER_RELEASE  NX_COMPILER_RELEASE_3_2)
  /* NS3.3 has conflicting declarations of these in math.h */
@@ -237,7 +243,7 @@
if (infflag  0)
PG_RETURN_CSTRING(strcpy(ascii, -Infinity));
 
-   sprintf(ascii, %.*g, FLT_DIG, num);
+   sprintf(ascii, %.*g, FLT_DIG+extra_float4_digits, num);
PG_RETURN_CSTRING(ascii);
 }
 
@@ -299,7 +305,7 @@
if (infflag  0)
PG_RETURN_CSTRING(strcpy(ascii, -Infinity));
 
-   sprintf(ascii, %.*g, DBL_DIG, num);
+   sprintf(ascii, %.*g, DBL_DIG+extra_float8_digits, num);
PG_RETURN_CSTRING(ascii);
 }
 

--- old/postgresql-7.2.1/src/backend/utils/misc/guc.c   Tue Oct 30 05:38:56 2001
+++ postgresql-7.2.1/src/backend/utils/misc/guc.c   Mon Nov  4 10:53:15 2002
@@ -49,6 +49,11 @@
 extern int CommitSiblings;
 extern bool FixBTree;
 
+/* For float4 and float8 extra digits in output format */
+
+extern int extra_float4_digits;
+extern int extra_float8_digits;
+
 #ifdef ENABLE_SYSLOG
 extern char *Syslog_facility;
 extern char *Syslog_ident;
@@ -502,6 +507,19 @@
commit_siblings, PGC_USERSET, CommitSiblings,
5, 1, 1000, NULL, NULL
},
+
+   /*
+* For float4 and float8 extra digits in output format
+*/
+   {
+   float4_extra_digits, PGC_USERSET, extra_float4_digits,
+   0, -4, 2, NULL, NULL
+   },
+
+   {
+   float8_extra_digits, PGC_USERSET, extra_float8_digits,
+   0, -13, 2, NULL, NULL
+   },
 
{
NULL, 0, NULL, 0, 0, 0, NULL, NULL

--- old/postgresql-7.2.1/src/bin/psql/tab-complete.cMon Nov  5 17:46:31 2001
+++ postgresql-7.2.1/src/bin/psql/tab-complete.cMon Nov  4 11:16:01 2002
@@ -266,6 +266,9 @@
 
default_transaction_isolation,
 
+   float4_extra_digits,
+   float8_extra_digits,
+
NULL
};
 

--- old/postgresql-7.2.1/src/backend/utils/misc/postgresql.conf.sample  Fri Jan  4 
05:50:25 2002
+++ postgresql-7.2.1/src/backend/utils/misc/postgresql.conf.sample  Mon Nov  4 
+11:02:04 2002
@@ -182,3 +182,9 @@
 #password_encryption = false
 #sql_inheritance = true
 #transform_null_equals = false
+
+#
+# floating point extra digits in output formatting
+#
+#extra_float4_digits = 0   #min -4, max 2
+#extra_float8_digits = 0   #min -13, max 2


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [HACKERS] pg_dump and large files - is this a problem?

2002-11-04 Thread Tom Lane
Zeugswetter Andreas SB SD [EMAIL PROTECTED] writes:
 The issue is, that you need to remove the #include bootstrap_tokens.h
 line from the lex file.

Good point; I'm surprised gcc doesn't spit up on that.  I've made that
mod and also added the inclusion-order-correction in pqsignal.c.

regards, tom lane

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [HACKERS] Finishing Domains...

2002-11-04 Thread Tom Lane
Rod Taylor [EMAIL PROTECTED] writes:
 Is it safe to teach Var how to deal with values that do not originate
 from a tuple?  Or should I create a new primnode to deal with these
 types of variables.

I have no idea what you're talking about, but it sure sounds like
something that should not be in Var ... perhaps you ought to post a
more complete design document before you start coding.

regards, tom lane

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] Float output formatting options

2002-11-04 Thread Tom Lane
Pedro M. Ferreira [EMAIL PROTECTED] writes:
 int extra_float4_digits, default 0, min -4, max 2
 int extra_float8_digits, defualt 0, min -13, max 2

I think a single setting extra_float_digits would be sufficient.

 Also, if we concluded that there is a need of 2 more digits, should'nt 
 this be the default ?

No.  pg_dump would want to bump it up on-the-fly.

regards, tom lane

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



Re: [HACKERS] Float output formatting options

2002-11-04 Thread Pedro M. Ferreira
Tom Lane wrote:

Pedro M. Ferreira [EMAIL PROTECTED] writes:


int extra_float4_digits, default 0, min -4, max 2
int extra_float8_digits, defualt 0, min -13, max 2



I think a single setting extra_float_digits would be sufficient.


Ok. Assuming,

int extra_float_digits, default 0, min -13, max 2

If extra_float_digits==-13 and we are outputing a float4 this results in 
a negative value for FLT_DIG+extra_float_digits. I dont know if 
sprintf's behaviour is the same across different libraries for this 
situation.

Should I include the following to handle this case ?

if(extra_float_digits-4)
  sprintf(ascii, %.*g, FLT_DIG-4, num);
else
  sprintf(ascii, %.*g, FLT_DIG+extra_float_digits, num);




Also, if we concluded that there is a need of 2 more digits, should'nt 
this be the default ?


No.  pg_dump would want to bump it up on-the-fly.

			regards, tom lane

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





--
--
Pedro Miguel Frazao Fernandes Ferreira
Universidade do Algarve
Faculdade de Ciencias e Tecnologia
Campus de Gambelas
8000-117 Faro
Portugal
Tel./Fax:  (+351) 289 800950 / 289 819403
http://w3.ualg.pt/~pfrazao


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] Float output formatting options

2002-11-04 Thread Tom Lane
Pedro M. Ferreira [EMAIL PROTECTED] writes:
 Tom Lane wrote:
 I think a single setting extra_float_digits would be sufficient.

 Ok. Assuming,

 int extra_float_digits, default 0, min -13, max 2

 If extra_float_digits==-13 and we are outputing a float4 this results in 
 a negative value for FLT_DIG+extra_float_digits.

You would want to clamp the values passed to %g to not less than 1.
I'd favor code like
int ndig = FLT_DIG + extra_float_digits;
if (ndig  1)
ndig = 1;
sprintf(ascii, %.*g, ndig, num);

Probably best to do it this way with float8 too; otherwise we're
essentially wiring in the assumption that we know what DBL_DIG is.
Which is exactly what we're trying to avoid doing.

regards, tom lane

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



Re: [HACKERS] Float output formatting options

2002-11-04 Thread Pedro M. Ferreira
Tom Lane wrote:

Pedro M. Ferreira [EMAIL PROTECTED] writes:



If extra_float_digits==-13 and we are outputing a float4 this results in 
a negative value for FLT_DIG+extra_float_digits.

You would want to clamp the values passed to %g to not less than 1.
I'd favor code like
	int	ndig = FLT_DIG + extra_float_digits;
	if (ndig  1)
		ndig = 1;
	sprintf(ascii, %.*g, ndig, num);

Probably best to do it this way with float8 too; otherwise we're
essentially wiring in the assumption that we know what DBL_DIG is.
Which is exactly what we're trying to avoid doing.


Good.
Corrected this, compiled and tested it. Works fine.

I am attaching the diff's made with diff -u. Sources were from Debian 
source package Version 7.2.1-2woody2.

Best regards,
Pedro


			regards, tom lane





--
--
Pedro Miguel Frazao Fernandes Ferreira
Universidade do Algarve
Faculdade de Ciencias e Tecnologia
Campus de Gambelas
8000-117 Faro
Portugal
Tel./Fax:  (+351) 289 800950 / 289 819403
http://w3.ualg.pt/~pfrazao

--- old/postgresql-7.2.1/src/backend/utils/adt/float.c  Tue Dec 11 02:02:12 2001
+++ postgresql-7.2.1/src/backend/utils/adt/float.c  Mon Nov  4 15:50:19 2002
@@ -65,6 +65,11 @@
 #include utils/array.h
 #include utils/builtins.h
 
+/*
+ * Configuration options for float4 and float8 extra digits in output format
+ */
+
+int extra_float_digits;
 
 #if !(NeXT  NX_CURRENT_COMPILER_RELEASE  NX_COMPILER_RELEASE_3_2)
  /* NS3.3 has conflicting declarations of these in math.h */
@@ -228,6 +233,7 @@
float4  num = PG_GETARG_FLOAT4(0);
char   *ascii = (char *) palloc(MAXFLOATWIDTH + 1);
int infflag;
+   int ndig = FLT_DIG + extra_float_digits;
 
if (isnan(num))
PG_RETURN_CSTRING(strcpy(ascii, NaN));
@@ -237,7 +243,10 @@
if (infflag  0)
PG_RETURN_CSTRING(strcpy(ascii, -Infinity));
 
-   sprintf(ascii, %.*g, FLT_DIG, num);
+   if (ndig  1)
+ ndig = 1;
+
+   sprintf(ascii, %.*g, ndig, num);
PG_RETURN_CSTRING(ascii);
 }
 
@@ -290,6 +299,7 @@
float8  num = PG_GETARG_FLOAT8(0);
char   *ascii = (char *) palloc(MAXDOUBLEWIDTH + 1);
int infflag;
+   int ndig = DBL_DIG + extra_float_digits;
 
if (isnan(num))
PG_RETURN_CSTRING(strcpy(ascii, NaN));
@@ -299,7 +309,10 @@
if (infflag  0)
PG_RETURN_CSTRING(strcpy(ascii, -Infinity));
 
-   sprintf(ascii, %.*g, DBL_DIG, num);
+if (ndig  1)
+   ndig = 1;
+
+   sprintf(ascii, %.*g, ndig, num);
PG_RETURN_CSTRING(ascii);
 }
 

--- old/postgresql-7.2.1/src/backend/utils/misc/guc.c   Tue Oct 30 05:38:56 2001
+++ postgresql-7.2.1/src/backend/utils/misc/guc.c   Mon Nov  4 15:41:24 2002
@@ -49,6 +49,10 @@
 extern int CommitSiblings;
 extern bool FixBTree;
 
+/* For float4 and float8 extra digits in output format */
+
+extern int extra_float_digits;
+
 #ifdef ENABLE_SYSLOG
 extern char *Syslog_facility;
 extern char *Syslog_ident;
@@ -502,6 +506,14 @@
commit_siblings, PGC_USERSET, CommitSiblings,
5, 1, 1000, NULL, NULL
},
+
+   /*
+* For float4 and float8 extra digits in output format
+*/
+   {
+   float_extra_digits, PGC_USERSET, extra_float_digits,
+   0, -13, 2, NULL, NULL
+   },
 
{
NULL, 0, NULL, 0, 0, 0, NULL, NULL

--- old/postgresql-7.2.1/src/bin/psql/tab-complete.cMon Nov  5 17:46:31 2001
+++ postgresql-7.2.1/src/bin/psql/tab-complete.cMon Nov  4 15:38:52 2002
@@ -266,6 +266,8 @@
 
default_transaction_isolation,
 
+   float_extra_digits,
+
NULL
};
 

--- old/postgresql-7.2.1/src/backend/utils/misc/postgresql.conf.sample  Fri Jan  4 
05:50:25 2002
+++ postgresql-7.2.1/src/backend/utils/misc/postgresql.conf.sample  Mon Nov  4 
+15:39:55 2002
@@ -182,3 +182,8 @@
 #password_encryption = false
 #sql_inheritance = true
 #transform_null_equals = false
+
+#
+# floating point extra digits in output formatting
+#
+#extra_float_digits = 0#min -13, max 2


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] Float output formatting options

2002-11-04 Thread Tom Lane
Pedro M. Ferreira [EMAIL PROTECTED] writes:
 I am attaching the diff's made with diff -u. Sources were from Debian 
 source package Version 7.2.1-2woody2.

Looks good, will keep to apply after we branch for 7.4 development.

BTW, did you check to see if this affects the geometric types or not?
I am not sure that they go through float8out; they may need similar
adjustments in their output routines.

regards, tom lane

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

http://archives.postgresql.org



Re: [HACKERS] Float output formatting options

2002-11-04 Thread Pedro M. Ferreira
Tom Lane wrote:


Looks good, will keep to apply after we branch for 7.4 development.

BTW, did you check to see if this affects the geometric types or not?
I am not sure that they go through float8out; they may need similar
adjustments in their output routines.


Only checked arrays.
I will check this and get you posted about it ASAP.

Best regards,
Pedro



			regards, tom lane





--
--
Pedro Miguel Frazao Fernandes Ferreira
Universidade do Algarve
Faculdade de Ciencias e Tecnologia
Campus de Gambelas
8000-117 Faro
Portugal
Tel./Fax:  (+351) 289 800950 / 289 819403
http://w3.ualg.pt/~pfrazao


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



[HACKERS] v7.3Beta4 Tag'd and Packaged ...

2002-11-04 Thread Marc G. Fournier

Morning all ...

As I was unable to figure out a way of merging HEAD into a BRANCH
(BRANCH into HEAD is easy), I moved the REL7_3_STABLE tag up to today, so
that the BRANCH is in a more appropriate location.

I've packaged up beta4 based on the branch, and its currently up
and available at the ftp site ... please download and test.

For those with commit access, please note that v7.3 related stuff
should, from now on, be committed *on* the appropriate branch, and v7.4
should be acceptable to add in ...

Let me know if there are any problems with the package, especially
in the docs area, so that I can put out an announce later on this evening
...




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

http://archives.postgresql.org



Re: [HACKERS] Float output formatting options

2002-11-04 Thread Pedro M. Ferreira
Tom Lane wrote:


BTW, did you check to see if this affects the geometric types or not?
I am not sure that they go through float8out; they may need similar
adjustments in their output routines.


In fact they need adjustments.

The *_out routines (in src/backend/utils/adt/geo_ops.c) for the 
geometric types rely on two functions to output data:

static int  pair_encode(float8 x, float8 y, char *str);
static int  single_encode(float8 x, char *str);

These functions produce output with (for pair_encode):

sprintf(str, %.*g,%.*g, digits8, x, digits8, y);

digits8 is defined as ,

#define P_MAXDIG DBL_DIG
static int  digits8 = P_MAXDIG;

I think it would be done the same way as for float4_out and float8_out:

extern int extra_float_digits;


int 
ndig = digits8 + extra_float_digits;

if (ndig  1)
	ndig = 1;

sprintf(str, %.*g,%.*g, ndig, x, ndig, y);

There a bunch of other places where output is produced. They are all 
within #ifdef GEODEBUG / #enfif blocks. Should these be corrected the 
same way ?

Regards,
Pedro


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


Re: [HACKERS] Float output formatting options

2002-11-04 Thread Tom Lane
Pedro M. Ferreira [EMAIL PROTECTED] writes:
 These functions produce output with (for pair_encode):

 sprintf(str, %.*g,%.*g, digits8, x, digits8, y);

 digits8 is defined as ,

 #define P_MAXDIG DBL_DIG
 static int  digits8 = P_MAXDIG;

 I think it would be done the same way as for float4_out and float8_out:

Yeah.  In fact I'd be inclined to remove the static variable and make
the code match float8out exactly (do DBL_DIG + extra_float_digits).

 There a bunch of other places where output is produced. They are all 
 within #ifdef GEODEBUG / #enfif blocks. Should these be corrected the 
 same way ?

Up to you.  Personally I'd just leave them alone...

regards, tom lane

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

http://archives.postgresql.org



Re: [HACKERS] Float output formatting options

2002-11-04 Thread Pedro M. Ferreira
Tom Lane wrote:


Yeah.  In fact I'd be inclined to remove the static variable and make
the code match float8out exactly (do DBL_DIG + extra_float_digits).


P_MAXDIG is only used in the lines below:

#define P_MAXDIG DBL_DIG
#define P_MAXLEN (2*(P_MAXDIG+7)+1)
static int  digits8 = P_MAXDIG;

Is it ok to remove #define P_MAXDIG DBL_DIG,
change P_MAXLEN to 2*(DBL_DIG+7)+1) and
remove the line 'static int  digits8 = P_MAXDIG;' ?

Would then change the two geo output functions and replace digits8 by 
DBL_DIG in the #ifdef GEODEBUG / #enfif output stuff.

There a bunch of other places where output is produced. They are all 
within #ifdef GEODEBUG / #enfif blocks. Should these be corrected the 
same way ?


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] v7.3Beta4 Tag'd and Packaged ...

2002-11-04 Thread Tom Lane
Marc G. Fournier [EMAIL PROTECTED] writes:
   As I was unable to figure out a way of merging HEAD into a BRANCH
 (BRANCH into HEAD is easy), I moved the REL7_3_STABLE tag up to today, so
 that the BRANCH is in a more appropriate location.

It looks like this was only 99.44% right.  There are some files and
whole subdirectories that were deleted since REL7_3_STABLE was
originally branched, but your update did not mark them as deleted in the
branch:

Only in REL7_3/pgsql/contrib: retep
Only in REL7_3/pgsql/contrib/xml: README
Only in REL7_3/pgsql/contrib/xml: pgxml.source
Only in REL7_3/pgsql/contrib/xml: pgxml_dom.source
Only in REL7_3/pgsql/doc/src/sgml: libpgeasy.sgml
Only in REL7_3/pgsql/doc/src/sgml: odbc.sgml
Only in REL7_3/pgsql/doc/src/sgml: recovery.sgml
Only in REL7_3/pgsql/doc/src/sgml: version.sgml
Only in REL7_3/pgsql/doc/src/sgml: y2k.sgml
Only in REL7_3/pgsql/src/interfaces/jdbc: CHANGELOG
Only in REL7_3/pgsql/src/interfaces/jdbc: Implementation
Only in REL7_3/pgsql/src/interfaces/jdbc: jdbc.jpx
Only in REL7_3/pgsql/src/interfaces/jdbc: utils
Only in REL7_3/pgsql/src/test/regress/expected: geometry-bsdi-precision.out

Perhaps easiest to just re-delete them in the branch?  Or is there a
cleaner way?

   For those with commit access, please note that v7.3 related stuff
 should, from now on, be committed *on* the appropriate branch, and v7.4
 should be acceptable to add in ...

Right-o: HEAD is 7.4devel now ...

regards, tom lane

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] Float output formatting options

2002-11-04 Thread Tom Lane
Pedro M. Ferreira [EMAIL PROTECTED] writes:
 Is it ok to remove #define P_MAXDIG DBL_DIG,
 change P_MAXLEN to 2*(DBL_DIG+7)+1) and
 remove the line 'static int  digits8 = P_MAXDIG;' ?

Perhaps P_MAXLEN now needs to be (2*(DBL_DIG+2+7)+1), considering
that we'll allow extra_float_digits to be up to 2.  What's it used for?

regards, tom lane

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

http://archives.postgresql.org



Re: [HACKERS] Float output formatting options

2002-11-04 Thread Pedro M. Ferreira
Tom Lane wrote:

Pedro M. Ferreira [EMAIL PROTECTED] writes:


Is it ok to remove #define P_MAXDIG DBL_DIG,
change P_MAXLEN to 2*(DBL_DIG+7)+1) and
remove the line 'static int  digits8 = P_MAXDIG;' ?


Perhaps P_MAXLEN now needs to be (2*(DBL_DIG+2+7)+1), considering
that we'll allow extra_float_digits to be up to 2.  What's it used for?


Yes. I guess so, because it is used in what I think is a memory 
allocation function. P_MAXLEN is only used twice:

* 1st use in path_encode() (allmost all the geo *_out functions use 
path_encode):

intsize = npts * (P_MAXLEN + 3) + 2;

/* Check for integer overflow */
if ((size - 2) / npts != (P_MAXLEN + 3))
elog(ERROR, Too many points requested);


* 2nd use in circle_out(PG_FUNCTION_ARGS):

result = palloc(3 * (P_MAXLEN + 1) + 3);

I will do the changes tomorrow and send in the appropriate diff's.

Regards,
Pedro


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
   (send unregister YourEmailAddressHere to [EMAIL PROTECTED])


Re: [HACKERS] Is my Internet connection slow

2002-11-04 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes:
 Why do we have two doc builds anyway?

Mainly because Bruce is willing to expend the cycles to rebuild his
nearly on-demand.  Last I checked, the build on hub is only updated
once or twice a day, so it's not as useful for verifying doc checkins.

regards, tom lane

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

http://archives.postgresql.org



Re: [HACKERS] [CYGWIN] ipc-daemon

2002-11-04 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes:
 Jason Tishler writes:
 1. If ipc-daemon is not running, then cygipc's shmget() will return
 EACCES.
 2. This causes PostgreSQL's InternalIpcMemoryCreate() to return
 NULL.
 3. This causes PostgreSQL's PGSharedMemoryCreate() to spin looking
 for accessible shared memory which it will never find.

 To me, this is a bug in PostgreSQL.

I disagree: just because cygipc returns error codes chosen at random
doesn't mean that we should neglect the clear meaning of an error code.
If a normal Unix system were to return EACCES here, the clear
implication would be that there is an existing segment that we do not
have permission to access.  I don't see how cygipc isn't running
can reasonably be translated into permission denied.

 After reading the shmget() man page, I choose to return ENOSPC.  Is
 there a better choice?  Such as ENOMEM?

 My first thought was ENOSYS (system call not implemented -- what BSD
 kernels tend to return if you didn't compile them with SysV IPC support),
 but that isn't a clearly superior choice either.

If you can detect that cygipc is not running, then ENOSYS seems the
best choice for reporting that.  (ENOSPC would be misleading too.)

If it's impractical to fix cygipc then I'd grudgingly go along with

if (errno == EEXIST
#ifndef __CYWGIN__   /* cygipc is broken */
|| errno == EACCES
#endif
#ifdef EIDRM
|| errno == EIDRM
#endif
)
return NULL;


regards, tom lane

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



Re: [HACKERS] Request for supported platforms

2002-11-04 Thread Alessio Bragadini
On Fri, Nov 01, 2002 at 10:22:42AM -0500, Tom Lane wrote:

 I've committed fixes for the other issues too, so CVS tip should now
 pass cleanly on your platform.

I've built the snapshot from CVS tip and now the regression tests pass
with both GCC 2.95.1 and Compaq C V6.4-216 (dtk) on 
Digital UNIX V4.0G (Rev. 1530).

Thank you very much for your help!

-- 
Alessio F. Bragadini[EMAIL PROTECTED]
APL Financial Services  http://village.albourne.com
Nicosia, Cyprus phone: +357-22-755750

It is more complicated than you think
-- The Eighth Networking Truth from RFC 1925

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

http://archives.postgresql.org



[HACKERS] missing const in PQescapeBytea/PQunescapeBytea in 7.3b3

2002-11-04 Thread Tommi Maekitalo
Hi,

I just discovered, that there is missing a const when passing a buffer to 
PQescapeBytea and PQunescapeBytea. I fixed it and tried to create a usable 
diff (I'm not so familar to diff).


Tommi
*** postgresql-7.3b3/src/interfaces/libpq/fe-exec.c	2002-09-04 22:31:47.0 +0200
--- postgresql-7.3b3tm1/src/interfaces/libpq/fe-exec.c	2002-11-02 22:28:34.0 +0100
***
*** 118,126 
   *		anything = 0x80 --- \\ooo (where ooo is an octal expression)
   */
  unsigned char *
! PQescapeBytea(unsigned char *bintext, size_t binlen, size_t *bytealen)
  {
! 	unsigned char *vp;
  	unsigned char *rp;
  	unsigned char *result;
  	size_t		i;
--- 118,126 
   *		anything = 0x80 --- \\ooo (where ooo is an octal expression)
   */
  unsigned char *
! PQescapeBytea(const unsigned char *bintext, size_t binlen, size_t *bytealen)
  {
! 	const unsigned char *vp;
  	unsigned char *rp;
  	unsigned char *result;
  	size_t		i;
***
*** 202,213 
   *		6	\\
   */
  unsigned char *
! PQunescapeBytea(unsigned char *strtext, size_t *retbuflen)
  {
  	size_t		buflen;
  	unsigned char *buffer,
- 			   *sp,
  			   *bp;
  	unsigned int state = 0;
  
  	if (strtext == NULL)
--- 202,213 
   *		6	\\
   */
  unsigned char *
! PQunescapeBytea(const unsigned char *strtext, size_t *retbuflen)
  {
  	size_t		buflen;
  	unsigned char *buffer,
  			   *bp;
+ 	const unsigned char *sp;
  	unsigned int state = 0;
  
  	if (strtext == NULL)

*** postgresql-7.3b3/src/interfaces/libpq/libpq-fe.h	2002-09-04 22:31:47.0 +0200
--- postgresql-7.3b3tm1/src/interfaces/libpq/libpq-fe.h	2002-11-02 22:27:24.0 +0100
***
*** 249,257 
  
  /* Quoting strings before inclusion in queries. */
  extern size_t PQescapeString(char *to, const char *from, size_t length);
! extern unsigned char *PQescapeBytea(unsigned char *bintext, size_t binlen,
  			  size_t *bytealen);
! extern unsigned char *PQunescapeBytea(unsigned char *strtext,
  size_t *retbuflen);
  
  
--- 249,257 
  
  /* Quoting strings before inclusion in queries. */
  extern size_t PQescapeString(char *to, const char *from, size_t length);
! extern unsigned char *PQescapeBytea(const unsigned char *bintext, size_t binlen,
  			  size_t *bytealen);
! extern unsigned char *PQunescapeBytea(const unsigned char *strtext,
  size_t *retbuflen);
  
  


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



[HACKERS] TPCC test in postgreSQL 7.3 beta3

2002-11-04 Thread chengwen Wu
Hello,

  I used TPCC to test postgreSQL 7.3 beta3 version. 
  My test steps are showed as follow,
1st, the number of  TPCC simulation processes is 100,
 run time is 7200 seconds. The consistency test was
got through successfully.
2nd, the number of TPCC simulation processes is 100,
run time is 3600 seconds. But, the consistency test
couldn't be got through.

   The phenomenon are same in TPCC test of postgreSQL
7.3 beta2 version.
  Why the consistency test can't not be got through in
long time TPCC test?
  Thanks.


__
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] v7.3Beta4 Tag'd and Packaged ...

2002-11-04 Thread Marc G. Fournier
On Mon, 4 Nov 2002, Tom Lane wrote:

 Marc G. Fournier [EMAIL PROTECTED] writes:
  As I was unable to figure out a way of merging HEAD into a BRANCH
  (BRANCH into HEAD is easy), I moved the REL7_3_STABLE tag up to today, so
  that the BRANCH is in a more appropriate location.

 It looks like this was only 99.44% right.  There are some files and
 whole subdirectories that were deleted since REL7_3_STABLE was
 originally branched, but your update did not mark them as deleted in the
 branch:

 Only in REL7_3/pgsql/contrib: retep
 Only in REL7_3/pgsql/contrib/xml: README
 Only in REL7_3/pgsql/contrib/xml: pgxml.source
 Only in REL7_3/pgsql/contrib/xml: pgxml_dom.source
 Only in REL7_3/pgsql/doc/src/sgml: libpgeasy.sgml
 Only in REL7_3/pgsql/doc/src/sgml: odbc.sgml
 Only in REL7_3/pgsql/doc/src/sgml: recovery.sgml
 Only in REL7_3/pgsql/doc/src/sgml: version.sgml
 Only in REL7_3/pgsql/doc/src/sgml: y2k.sgml
 Only in REL7_3/pgsql/src/interfaces/jdbc: CHANGELOG
 Only in REL7_3/pgsql/src/interfaces/jdbc: Implementation
 Only in REL7_3/pgsql/src/interfaces/jdbc: jdbc.jpx
 Only in REL7_3/pgsql/src/interfaces/jdbc: utils
 Only in REL7_3/pgsql/src/test/regress/expected: geometry-bsdi-precision.out

 Perhaps easiest to just re-delete them in the branch?  Or is there a
 cleaner way?

Easiest is to re-delete them ... from what i can tell from teh CVS docs,
we did this backwards ... we should have worked on the branch itself, and
then merges into the working tree ... something to remember for next time



---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] v7.3Beta4 Tag'd and Packaged ...

2002-11-04 Thread Tom Lane
Marc G. Fournier [EMAIL PROTECTED] writes:
 Perhaps easiest to just re-delete them in the branch?  Or is there a
 cleaner way?

 Easiest is to re-delete them ...

Okay, done that.  REL7_3_STABLE branch now matches CVS tip --- or did
until I branded HEAD's configure.in as 7.4devel, a few moments ago.

Do you want to regenerate the 7.3b4 tarball so it omits the deleted files?
Probably not really essential to do so.

Meanwhile, the floodgates are open for 7.4 development on HEAD.

regards, tom lane

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

http://archives.postgresql.org



[HACKERS] protocol change in 7.4

2002-11-04 Thread Neil Conway
There has been some previous discussion of changing the FE/BE protocol
in 7.4, in order to fix several problems. I think this is worth doing:
if we can resolve all these issues in a single release, it will lessen
the upgrade difficulties for users.

I'm aware of the following problems that need a protocol change to fix
them:

(1) Add an optional textual message to NOTIFY

(2) Remove the hard-coded limits on database and user names
(SM_USER, SM_DATABASE), replace them with variable-length
fields.

(3) Remove some legacy elements in the startup packet
('unused' can go -- perhaps 'tty' as well). I think the
'length' field of the password packet is also not used,
but I'll need to double-check that.

(4) Fix the COPY protocol (Tom?)

(5) Fix the Fastpath protocol (Tom?)

(6) Protocol-level support for prepared queries, in order to
bypass the parser (and maybe be more compatible with the
implementation of prepared queries in other databases).

(7) Include the current transaction status, since it's
difficult for the client app to determine it for certain
(Tom/Bruce?)

If I've missed anything or if there is something you think we should
add, please let me know.

I can implement (1), (2), (3), and possibly (7), if someone can tell
me exactly what is required (my memory of the discussion relating to
this is fuzzy). The rest is up for grabs.

Finally, how should we manage the transition? I wasn't around for the
earlier protocol changes, so I'd appreciate any input on steps we can
take to improve backward-compatibility.

Cheers,

Neil

-- 
Neil Conway [EMAIL PROTECTED] || PGP Key ID: DB3C29FC


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] protocol change in 7.4

2002-11-04 Thread Ross J. Reedstrom
On Mon, Nov 04, 2002 at 08:10:29PM -0500, Mike Mascari wrote:
 
 Actually, I was thinking along the lines of a true CREATE 
 DATABASE LINK implementation, where multiple databases could 
 participate in a distributed transaction. That would require the 
 backend in which the main query is executing to act as the 
 coordinator and each of the other participating databases to 
 act as cohorts. And would require a protocol change to support 
 the PREPARE, COMMIT-VOTE/ABORT-VOTE reply, and an ACK message 
 following the completion of the distributed COMMIT or ABORT.

Right, you need TPC in order for pgsql to participate in transactions
that span anything outside the DB proper. A DB link is one example,
or an external transaction manager that coordinates DB and filesystem
updates, for example. Zope could use this, to coordinate the DB with
it's internal object store.

Ross

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

http://archives.postgresql.org



Re: [HACKERS] Finishing Domains...

2002-11-04 Thread Rod Taylor
On Mon, 2002-11-04 at 09:44, Tom Lane wrote:
 Rod Taylor [EMAIL PROTECTED] writes:
  Is it safe to teach Var how to deal with values that do not originate
  from a tuple?  Or should I create a new primnode to deal with these
  types of variables.
 
 I have no idea what you're talking about, but it sure sounds like
 something that should not be in Var ... perhaps you ought to post a
 more complete design document before you start coding.

Sorry, had planned on it.  Anyway, below is a summary of what I think I
need to do.


Goal:
CREATE DOMAIN dom AS integer CHECK(VALUE = 4 OR VALUE = 10);
 ^^

The constraint will be stored in pg_constraint with the conrelid set to
0, and contypid set to the domain pg_type oid.  Domain check constraints
will be pulled out of the table and inserted into the executor tree in
coerce_type_constraints(), for execution by ExecEvalConstraintTest().


In the parser, I intend to represent the 'VALUE' term by a
DomainConstraintValue node which inherits the properties (TypId, TypMod)
of the domain base type.  Requires some muckary in transformExpr() to
carry the current datatype through it, much like carrying a context
through the executor.


It has been mentioned a few times that parse nodes should not be used in
the executor as they tend to be bug prone, so I don't want to use
DomainConstraintValue in the executor.  So, I need a way to represent
VALUE in both the stored pg_constraint.conbin column and the executor,
which is replaced with the Datum being operated on during
ExecEvalConstraintTest().

The Datum is created in ExecEvalConstraintTest, so it's easy to add it
to the local context, and call ExecEvalExpr on the (VALUE = 4 OR VALUE =
10) expression. ExecEvalExpr runs through the Node passed and fills in
subexpressions (Var nodes for example).

Do I teach ExecEvalVar how to pull out an arbitrary value from
ExprContext (since this is technically a variable), or do I create a
different 'Var' for managing variables which do not come in the Tuple
format.  All I need is the datatype, and a little knowledge of the
variable thats in ExprContext.

-- 
  Rod Taylor


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

http://archives.postgresql.org



Re: [HACKERS] Float output formatting options

2002-11-04 Thread Christopher Kings-Lynne
  Perhaps P_MAXLEN now needs to be (2*(DBL_DIG+2+7)+1), considering
  that we'll allow extra_float_digits to be up to 2.  What's it used for?
 
 Yes. I guess so, because it is used in what I think is a memory 
 allocation function. P_MAXLEN is only used twice:

Curse my slowness, but what's the actual problem being fixed here?

Chris


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] protocol change in 7.4

2002-11-04 Thread Darren Johnson



I'm now implementing 2PC replication and distributed transaction. My 2PC
needs some supports in startup packet to establish a replication session
or a recovery session.

BTW, my 2PC replication is working, and I'm implementing 2PC recovery now.


I would like to here more about your implementation.  Do you have some 
documentation that I
could read?  

If not, perhaps (if you have the time)  you could put together a post 
describing your work.  Like
Is it an internal or external solution.  Are you sending SQL or tuples 
in your update messages.  
How are you handling failure detection?  Is this partial or full 
replication?


Please forgive me for asking so many questions, but I'm rather intrigued 
by database
replication.

Darren








---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
   (send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [HACKERS] protocol change in 7.4

2002-11-04 Thread Satoshi Nagayasu


Darren Johnson [EMAIL PROTECTED] wrote:
 I would like to here more about your implementation.  Do you have some 
 documentation that I
 could read?

Documentation is not available, but I have some slides for my presentation.

http://snaga.org/pgsql/20021018_2pc.pdf

Some answers for your questions may be in these slides.

And a current source code is available from:
http://snaga.org/pgsql/pgsql-20021025.tgz

 If not, perhaps (if you have the time)  you could put together a post 
 describing your work.  Like
 Is it an internal or external solution.  Are you sending SQL or tuples 
 in your update messages.  
 How are you handling failure detection?  Is this partial or full 
 replication?

It is an internal solution. In 2PC, pre-commit and commit are required.
So my implementation has some internal modifications on transaction
handling, log recording and else.

-- 
NAGAYASU Satoshi [EMAIL PROTECTED]

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

http://archives.postgresql.org



[HACKERS] Another bug in tsearch?

2002-11-04 Thread Christopher Kings-Lynne
Hi Oleg  Teodor,

This behaviour is causing problems in my search engine:

australia=# select 'banana/pineapple'::mquery_txt;
 mquery_txt

 'banana/pineapple'
(1 row)

In our case the forward slash symbol should really be treated as a word
break.  Are there any cases where it shouldn't be?  I can maybe only think
of 3/4, etc.

Chris


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



[HACKERS] rebuilding beta4 ... fails in docs build ...

2002-11-04 Thread Marc G. Fournier

one too many things removed?  this build worked earlier today, so its only
since removing those directories that something has broken ...

openjade  -D . -D ./ref -c /usr/local/share/sgml/docbook/dsssl/modular/catalog -
d stylesheet.dsl -i output-html -t sgml postgres.sgml
openjade:installation.sgml:1535:2:E: character data is not allowed here
openjade:installation.sgml:1535:30:E: document type does not allow element EMAI
L here; assuming missing ENTRY start-tag
openjade:/usr/local/share/sgml/docbook/dsssl/modular/html/../common/dbtable.dsl:
224:13:E: 2nd argument for primitive ancestor of wrong type: #unknown object
 151425216 not a singleton node list
gmake[1]: *** [postgres.html] Error 1
gmake[1]: Leaving directory `/usr/local/pgsql/beta/pgsql/doc/src/sgml'
gmake: *** [postgres.tar] Error 2



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

http://archives.postgresql.org



Re: [HACKERS] Float output formatting options

2002-11-04 Thread Tom Lane
Christopher Kings-Lynne [EMAIL PROTECTED] writes:
 Curse my slowness, but what's the actual problem being fixed here?

Two things:

* allow pg_dump to accurately dump and restore float quantities (setting
float_extra_digits to 2 during the dump will accomplish this, at least
on systems with reasonable float I/O routines).

* allow us to get out from under the geometry regression test's platform
dependency problems (setting float_extra_digits to -2 or so during the
test should make most or all of the variations go away).

This proposal is the first one I've seen that solves both these problems
without introducing any compatibility issues of its own.

regards, tom lane

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [HACKERS] rebuilding beta4 ... fails in docs build ...

2002-11-04 Thread Rod Taylor
On Mon, 2002-11-04 at 23:10, Marc G. Fournier wrote:
 
 one too many things removed?  this build worked earlier today, so its only
 since removing those directories that something has broken ...

Bruce left an extra /entry tag at on line 1534 of installation.sgml :)

Can't make a patch because anoncvs hasn't updated yet :)

 openjade  -D . -D ./ref -c /usr/local/share/sgml/docbook/dsssl/modular/catalog -
 d stylesheet.dsl -i output-html -t sgml postgres.sgml
 openjade:installation.sgml:1535:2:E: character data is not allowed here
 openjade:installation.sgml:1535:30:E: document type does not allow element EMAI
 L here; assuming missing ENTRY start-tag
 openjade:/usr/local/share/sgml/docbook/dsssl/modular/html/../common/dbtable.dsl:
 224:13:E: 2nd argument for primitive ancestor of wrong type: #unknown object
  151425216 not a singleton node list
 gmake[1]: *** [postgres.html] Error 1
 gmake[1]: Leaving directory `/usr/local/pgsql/beta/pgsql/doc/src/sgml'
 gmake: *** [postgres.tar] Error 2
 
 
 
 ---(end of broadcast)---
 TIP 6: Have you searched our list archives?
 
 http://archives.postgresql.org
 
-- 
  Rod Taylor


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



Re: [HACKERS] rebuilding beta4 ... fails in docs build ...

2002-11-04 Thread Tom Lane
Marc G. Fournier [EMAIL PROTECTED] writes:
 one too many things removed?

Just broken SGML markup ... fixed I think ...

regards, tom lane

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] protocol change in 7.4

2002-11-04 Thread Tom Lane
I don't see why 2PC would require any protocol-level change.  I would
think that the API would be something like

BEGIN;
issue some commands ...
PRECOMMIT;
-- if the above does not return an error, then
COMMIT;

In other words, 2PC would require some new commands, but a new command
doesn't affect the protocol layer.

regards, tom lane

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] protocol change in 7.4

2002-11-04 Thread Grant Finnemore
Questions have arisen during discussions about errors relating
to how to support error codes without changing the FE/BE
protocols. (see TODO.detail/error)

Now that the protocol is up for revision, how about supporting
sql state strings, error codes, and other information directly in
the protocol.

Regards,
Grant

Neil Conway wrote:


There has been some previous discussion of changing the FE/BE protocol
in 7.4, in order to fix several problems. I think this is worth doing:
if we can resolve all these issues in a single release, it will lessen
the upgrade difficulties for users.

I'm aware of the following problems that need a protocol change to fix
them:

(1) Add an optional textual message to NOTIFY

(2) Remove the hard-coded limits on database and user names
(SM_USER, SM_DATABASE), replace them with variable-length
fields.

(3) Remove some legacy elements in the startup packet
('unused' can go -- perhaps 'tty' as well). I think the
'length' field of the password packet is also not used,
but I'll need to double-check that.

(4) Fix the COPY protocol (Tom?)

(5) Fix the Fastpath protocol (Tom?)

(6) Protocol-level support for prepared queries, in order to
bypass the parser (and maybe be more compatible with the
implementation of prepared queries in other databases).

(7) Include the current transaction status, since it's
difficult for the client app to determine it for certain
(Tom/Bruce?)

If I've missed anything or if there is something you think we should
add, please let me know.

I can implement (1), (2), (3), and possibly (7), if someone can tell
me exactly what is required (my memory of the discussion relating to
this is fuzzy). The rest is up for grabs.

Finally, how should we manage the transition? I wasn't around for the
earlier protocol changes, so I'd appreciate any input on steps we can
take to improve backward-compatibility.

Cheers,

Neil




smime.p7s
Description: S/MIME Cryptographic Signature


Re: [HACKERS] protocol change in 7.4

2002-11-04 Thread Neil Conway
Grant Finnemore [EMAIL PROTECTED] writes:
 Now that the protocol is up for revision, how about supporting
 sql state strings, error codes, and other information directly in
 the protocol.

Ah, thanks for pointing that out. Error codes would be another thing
we can ideally support in 7.4, and we'd need a protocol change to do
it properly, AFAICS. IIRC, Peter E. expressed some interest in doing
this...

Cheers,

Neil

-- 
Neil Conway [EMAIL PROTECTED] || PGP Key ID: DB3C29FC


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] protocol change in 7.4

2002-11-04 Thread Satoshi Nagayasu
Tom Lane wrote:
 I don't see why 2PC would require any protocol-level change.  I would
 think that the API would be something like
 
   BEGIN;
   issue some commands ...
   PRECOMMIT;
   -- if the above does not return an error, then
   COMMIT;
 
 In other words, 2PC would require some new commands, but a new command
 doesn't affect the protocol layer.

I think a precommit-vote-commit phase of 2PC can be implemented in
command-lavel or protocol-level.

In command-level 2PC, an user application (or application programmer)
must know the DBMS is clustered or not (to use PRECOMMIT command).

In protocol-layer 2PC, no new SQL command is required.
A precommit-vote-commit phase will be called implicitly.  It means an
user application can be used without any modification.  An application
can use a traditional way (BEGIN...COMMIT).

So I made my decision to use protocol-layer implementation.
It doesn't affect the SQL command layer.

-- 
NAGAYASU Satoshi [EMAIL PROTECTED]

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] Is my Internet connection slow

2002-11-04 Thread Marc G. Fournier
On Mon, 4 Nov 2002, Bruce Momjian wrote:


 Sure, script attached.  It uses a few of my other scripts so it will
 need customization.  I can easily supply those missing scripts too.
 I run it every 7 minutes from cron with:

   */7 * * * * root /letc/pgsgml /dev/null 21

 I can even install the whole thing on postgresql.org if you wish.  It
 requires a personal crontab, of course, and a directory to put the
 result.  I already have a ~momjian web directory for such stuff.

Actually, from my read through the docs on CVS itself, there is a way of
setting it up so that when something is committed, it runs an external
program ... I'll have to do some further research on it, but I should be
able to set it up so that when someone commits something to docs, it does
the build ...

Can you setup your scripts on postgresql.org, and let me know where/what
to run, and I'll see if I can get that setup?



---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] Request for supported platforms

2002-11-04 Thread Bruce Momjian

Ports list updated:

  http://candle.pha.pa.us/main/writings/pgsql/sgml/supported-platforms.html

---
Sean Chittenden wrote:
   Or at least it's *trying* to apply it for 4.7 --- as near as I
   can tell without testing, the above scrap of resultmap code is
   wrong because both of the i.86 lines will match on FreeBSD 4.7,
   and I think the pg_regress coding will take the last match.
   Larry, did you actually test the CVS-tip resultmap to make sure
   it picks the right comparison file on your box?
  
   Yes, just did and it *FAILS*.  you need the order you have below.
   Sorry...
  
  Okay, I've updated the CVS tip to look like this:
  
  geometry/i.86-.*-freebsd=geometry-positive-zeros-bsd
  geometry/i.86-.*-freebsd4.7=geometry-bsd-precision
  geometry/i.86-.*-freebsd5=geometry-bsd-precision
  geometry/alpha.*-freebsd=geometry-positive-zeros
  
  Sean, would you verify this works for you?
 
 It does, thank you.  I've just updated the -devel port to 7.3b4,
 hopefully the mirrors will pick up the bits soon.  -sc
 
 -- 
 Sean Chittenden
 

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] Is my Internet connection slow

2002-11-04 Thread Rod Taylor
On Mon, 2002-11-04 at 21:40, Marc G. Fournier wrote:
 On Mon, 4 Nov 2002, Bruce Momjian wrote:
 
 
  Sure, script attached.  It uses a few of my other scripts so it will
  need customization.  I can easily supply those missing scripts too.
  I run it every 7 minutes from cron with:
 
  */7 * * * * root /letc/pgsgml /dev/null 21
 
  I can even install the whole thing on postgresql.org if you wish.  It
  requires a personal crontab, of course, and a directory to put the
  result.  I already have a ~momjian web directory for such stuff.
 
 Actually, from my read through the docs on CVS itself, there is a way of
 setting it up so that when something is committed, it runs an external

One way is to change the DEFAULT in CVSROOT/loginfo.  Normally its a log
accumulator or email system of somekind.  But there is no reason it
couldn't be more complex and kick off additional jobs.

Just make sure whatever it is execs a background jobs (commits are held
during execution of the script) and protect against simultaneous runs of
the background job.



  Rod Taylor


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

http://archives.postgresql.org



[HACKERS] PostgreSQL IRC Channel... who's the Admin?

2002-11-04 Thread Justin Clift
Hi all,

Who's an Admin for the PostgreSQL IRC Channel (#postgresql) on
irc.openprojects.net?

The topic there is advertising some items for some guy on eBay, claiming
it supports the PostgreSQL channel, and no-one knows anything about it.

There also doesn't appear to be any IRC Admin's about.

So, does anyone know who the Admin's are, so we can get things fixed up?

:-)

Regards and best wishes,

Justin Clift

-- 
My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there.
   - Indira Gandhi

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [HACKERS] [CYGWIN] ipc-daemon

2002-11-04 Thread Jason Tishler
Tom,
Peter,

On Mon, Nov 04, 2002 at 02:43:01PM -0500, Tom Lane wrote:
 Peter Eisentraut [EMAIL PROTECTED] writes:
  To me, this is a bug in PostgreSQL.
 
 I disagree: just because cygipc returns error codes chosen at random
 doesn't mean that we should neglect the clear meaning of an error
 code.  If a normal Unix system were to return EACCES here, the clear
 implication would be that there is an existing segment that we do not
 have permission to access.  I don't see how cygipc isn't running can
 reasonably be translated into permission denied.
 
 [snip]
 
  My first thought was ENOSYS (system call not implemented -- what BSD
  kernels tend to return if you didn't compile them with SysV IPC
  support), but that isn't a clearly superior choice either.
 
 If you can detect that cygipc is not running, then ENOSYS seems the
 best choice for reporting that.  (ENOSPC would be misleading too.)
 
 If it's impractical to fix cygipc then I'd grudgingly go along with
 
 if (errno == EEXIST
 #ifndef __CYWGIN__   /* cygipc is broken */
 || errno == EACCES
 #endif
 #ifdef EIDRM
 || errno == EIDRM
 #endif
 )
 return NULL;

Thanks for your feedback.  I will take this to the Cygwin list and see
what happens.  Unfortunately, the cygipc maintainer is AWOL right now
because of Ph.D. thesis commitments.  Hence, even if I can get the
Cygwin community to agree to this change, there may not be an official
cygipc release for a while.

Thanks,
Jason

-- 
GPG key available on key servers or http://www.tishler.net/jason/gpg.txt



msg24667/pgp0.pgp
Description: PGP signature


Re: [CYGWIN] [HACKERS] Request for supported platforms

2002-11-04 Thread Jason Tishler
Peter,

On Wed, Oct 30, 2002 at 07:36:40PM +0100, Peter Eisentraut wrote:
 Dave Page writes:
  Hackers: As the Cygwin release that is actively supported is the
  binary distribution that Jason builds, I would think this is OK to
  be listed as supported if no-one disagrees...
 
 I disagree.  We document as supported those platforms that build out
 of the box, not those that build somehow, somewhere, by someone.
 
 Rather than advocating methods to manually edit your system headers we
 should try to find out what the problem really is, such as by
 analyzing config.log.

Did you miss the following?

http://archives.postgresql.org/pgsql-hackers/2002-10/msg01303.php

As you can see, I have already performed root cause analysis of theses
problems *and* have taken the proper steps to ensure that PostgreSQL
builds OOTB under Cygwin (after the next Cygwin release).

Jason

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] [GENERAL] Database replication... - Mission Critical DBMS's --

2002-11-04 Thread Bill Gribble
On Tue, 2002-10-29 at 17:56, Greg Patnude wrote:
 Does anyone know of a reasonable means of synchronizing two (or more)
 postgreSQL database servers in order to maintain two COMPLETE concurrent
 copies of the same database ?

I'm not sure how complete it is (just starting to look at this myself)
but 'dbbalancer' at least makes some claims to this.  It acts as
(basically) a postgresql proxy server, and can send queries to multiple
servers.  My presumption would be that if you initialize 2 databases to
a known identical start, have all the same triggers and rules on both,
then send all queries to both databases, you will have 2 identical
databases at the end. 

Don't know how well that will work in practice tho.  I should know more
in the next couple of weeks. 

b.g.




---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [HACKERS] Turning the PLANNER off

2002-11-04 Thread Ross J. Reedstrom
On Wed, Oct 30, 2002 at 10:59:39PM -0500, Tom Lane wrote:
 
 What's the basis for your assertion that it's planning things that
 don't need it?  Given a JOIN-constrained query I do not believe the
 planner will look at any cases other than the intended join order.

Well, that was a loose choice of words - let's say the planner seems to
be taking awfully long to build an execution tree with only one choice
available.

 He can do whatever he wants, as long as he has no illusions about
 getting it accepted back into the sources ;-).

Understood - this would be a hacking tool only.

 What would probably be more useful is to do some profiling to understand
 why the planner is taking longer than he wants even with a
 JOIN-constrained query.  I should think this would be pretty quick.

Yup, that targets the same question as above - anything 'uneeded' actually
happening in the planner? I'll send him off with this suggestion.

Ross

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] Is my Internet connection slow

2002-11-04 Thread Marc G. Fournier
On Mon, 4 Nov 2002, Tom Lane wrote:

 Peter Eisentraut [EMAIL PROTECTED] writes:
  Why do we have two doc builds anyway?

 Mainly because Bruce is willing to expend the cycles to rebuild his
 nearly on-demand.  Last I checked, the build on hub is only updated
 once or twice a day, so it's not as useful for verifying doc checkins.

'k, is there a reason why it can't be run more often?  What command on hub
has to be run?


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



[HACKERS] disable a single trigger

2002-11-04 Thread Laurette Cisneros

What is the status of the tgenabled field in pg_trigger?  It would be so
nice to be able to disable just a single trigger on a table rather than
having to disable all triggers.  The docs say not presently checked
everywhere it should be, so disabling a trigger by setting this false 
does not work reliably. 

Will it ever be reliable?

Thanks,

-- 
Laurette Cisneros
The Database Group
(510) 420-3137
NextBus Information Systems, Inc.
www.nextbus.com
--
My other vehicle is my imagination.
 - bumper sticker


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [HACKERS] Is my Internet connection slow

2002-11-04 Thread Tom Lane
Marc G. Fournier [EMAIL PROTECTED] writes:
 Mainly because Bruce is willing to expend the cycles to rebuild his
 nearly on-demand.  Last I checked, the build on hub is only updated
 once or twice a day, so it's not as useful for verifying doc checkins.

 'k, is there a reason why it can't be run more often?  What command on hub
 has to be run?

AFAICT, Bruce does a cvs update every ten or fifteen minutes and then
rebuilds the docs if anything changed in the doc subtree.  Bruce, maybe
you could send Marc the script you use?

regards, tom lane

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] disable a single trigger

2002-11-04 Thread Tom Lane
Laurette Cisneros [EMAIL PROTECTED] writes:
 What is the status of the tgenabled field in pg_trigger?  It would be so
 nice to be able to disable just a single trigger on a table rather than
 having to disable all triggers.  The docs say not presently checked
 everywhere it should be, so disabling a trigger by setting this false 
 does not work reliably. 

I believe it does work for BEFORE triggers, but not AFTER triggers.
There was some question about when it should be checked for an AFTER
trigger (when the event is queued?  Or fired?).

regards, tom lane

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] Is my Internet connection slow

2002-11-04 Thread Bruce Momjian

Sure, script attached.  It uses a few of my other scripts so it will
need customization.  I can easily supply those missing scripts too.
I run it every 7 minutes from cron with:

*/7 * * * * root /letc/pgsgml /dev/null 21

I can even install the whole thing on postgresql.org if you wish.  It
requires a personal crontab, of course, and a directory to put the
result.  I already have a ~momjian web directory for such stuff.

---

Tom Lane wrote:
 Marc G. Fournier [EMAIL PROTECTED] writes:
  Mainly because Bruce is willing to expend the cycles to rebuild his
  nearly on-demand.  Last I checked, the build on hub is only updated
  once or twice a day, so it's not as useful for verifying doc checkins.
 
  'k, is there a reason why it can't be run more often?  What command on hub
  has to be run?
 
 AFAICT, Bruce does a cvs update every ten or fifteen minutes and then
 rebuilds the docs if anything changed in the doc subtree.  Bruce, maybe
 you could send Marc the script you use?
 
   regards, tom lane
 
 ---(end of broadcast)---
 TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
 

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

:

cd /pgsgmlbuild

[ -f /tmp/pgsql_sgml.lock ]  exit

TRAPEXTRAFILE=/tmp/pgsql_sgml.lock
. traprm

touch /tmp/pgsql_sgml.lock

 $TMP/1

while :
do
CONT=N
if [ X$1 = X-f ]
thenCONT=Y
shift
elsepgcvs update sgml  $TMP/2 21 
BG=$!; export BG
(sleep 300; kill $BG  /dev/null 21) 
BG2=$!; export BG2
wait $BG
if ! kill0 $BG2
thenCONT=N
elsekill $BG2  /dev/null 21
CONT=Y
cat $TMP/2 |
grep '^[A-Z] sgml/'  $TMP/1
[ $? -ne 0 ]  CONT=N
fi
fi
if [ $CONT = N ]
thenbreak
fi

# continue
echo \nBuild:  `date`  build.dates
cat $TMP/1   build.dates
echo PostgreSQL CVS Documentation Build  $TMP/0
echo --\n  $TMP/0
echo Build started:  `date`  $TMP/0
gmake postgres.tar.gz 21 | grep -v DTDDECL  $TMP/2
echo Build completed:  `date`\n  $TMP/0
echo Changes in this build:  $TMP/0
cat $TMP/1  $TMP/0
echo \nA full copy of this documenation is at 
ftp://candle.pha.pa.us/pub/postgresql/postgresql-docs.tar.gz\n;   $TMP/0
if grep -qi 'error' $TMP/2 || grep -qi ':E:' $TMP/2
thenecho \nThere were errors in this build.  They appear in red.\n  
$TMP/0
cat $TMP/2  $TMP/0
elseecho \nBuild completed successfully.  $TMP/0
fi
pipe sed 's;HTML.manifest:;HTML.manifest :;g' $TMP/0
txt2html -m -s 100 -p 100 --title PostgreSQL CVS Docs built `date` \
--link /u/txt2html/txt2html.dict \
--append_head /u/txt2html/BODY $TMP/0  build.html
pipe sed 's;^.*[Ee]rror.*$;FONT COLOR=RED/FONT;' build.html
pipe sed 's;^.*:E:.*$;FONT COLOR=RED/FONT;' build.html
rm -f /var/www/docs/main/writings/pgsql/sgml/*
mv sgml/*.html build.html /var/www/docs/main/writings/pgsql/sgml
cp sgml/*.css sgml/*.gif /var/www/docs/main/writings/pgsql/sgml
cp postgres.tar.gz /pgftp/postgresql-docs.tar.gz
gmake clean  /dev/null 21
[ X$1 = X-f ]  break
done


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



Re: [HACKERS] v7.3Beta4 Tag'd and Packaged ...

2002-11-04 Thread Larry Rosenman
On Mon, 2002-11-04 at 15:52, Tom Lane wrote:
 Marc G. Fournier [EMAIL PROTECTED] writes:
  Perhaps easiest to just re-delete them in the branch?  Or is there a
  cleaner way?
 
  Easiest is to re-delete them ...
 
 Okay, done that.  REL7_3_STABLE branch now matches CVS tip --- or did
 until I branded HEAD's configure.in as 7.4devel, a few moments ago.
 
 Do you want to regenerate the 7.3b4 tarball so it omits the deleted files?
 Probably not really essential to do so.
Out of curiousity, is there an easy (heh) way to upgrade(change?) a
checked out tree to be off the branch? 



-- 
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] pg_dump and large files - is this a problem?

2002-11-04 Thread Bruce Momjian

Does this resolve our AIX compile problem?

---

Tom Lane wrote:
 Zeugswetter Andreas SB SD [EMAIL PROTECTED] writes:
  The issue is, that you need to remove the #include bootstrap_tokens.h
  line from the lex file.
 
 Good point; I'm surprised gcc doesn't spit up on that.  I've made that
 mod and also added the inclusion-order-correction in pqsignal.c.
 
   regards, tom lane
 

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] Request for supported platforms

2002-11-04 Thread Bruce Momjian

Ports list updated:

  http://candle.pha.pa.us/main/writings/pgsql/sgml/supported-platforms.html

---
Alessio Bragadini wrote:
 On Fri, Nov 01, 2002 at 10:22:42AM -0500, Tom Lane wrote:
 
  I've committed fixes for the other issues too, so CVS tip should now
  pass cleanly on your platform.
 
 I've built the snapshot from CVS tip and now the regression tests pass
 with both GCC 2.95.1 and Compaq C V6.4-216 (dtk) on 
 Digital UNIX V4.0G (Rev. 1530).
 
 Thank you very much for your help!
 
 -- 
 Alessio F. Bragadini  [EMAIL PROTECTED]
 APL Financial Serviceshttp://village.albourne.com
 Nicosia, Cyprus   phone: +357-22-755750
 
 It is more complicated than you think
   -- The Eighth Networking Truth from RFC 1925
 
 ---(end of broadcast)---
 TIP 6: Have you searched our list archives?
 
 http://archives.postgresql.org
 

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] missing const in PQescapeBytea/PQunescapeBytea in 7.3b3

2002-11-04 Thread Bruce Momjian

This has been saved for the 7.4 release:

http:/momjian.postgresql.org/cgi-bin/pgpatches2

---

Tommi Maekitalo wrote:
 Hi,
 
 I just discovered, that there is missing a const when passing a buffer to 
 PQescapeBytea and PQunescapeBytea. I fixed it and tried to create a usable 
 diff (I'm not so familar to diff).
 
 
 Tommi

[ Attachment, skipping... ]

[ Attachment, skipping... ]

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

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] [CYGWIN] ipc-daemon

2002-11-04 Thread Peter Eisentraut
Jason Tishler writes:

 1. If ipc-daemon is not running, then cygipc's shmget() will return
EACCES.
 2. This causes PostgreSQL's InternalIpcMemoryCreate() to return
NULL.
 3. This causes PostgreSQL's PGSharedMemoryCreate() to spin looking
for accessible shared memory which it will never find.

To me, this is a bug in PostgreSQL.  A comment in
InternalIpcMemoryCreate() says

 * Fail quietly if error indicates a collision with existing
 * segment. One would expect EEXIST, given that we said IPC_EXCL,
 * but perhaps we could get a permission violation instead?

I tend to think that the answer to that question is No.

 After reading the shmget() man page, I choose to return ENOSPC.  Is
 there a better choice?  Such as ENOMEM?

My first thought was ENOSYS (system call not implemented -- what BSD
kernels tend to return if you didn't compile them with SysV IPC support),
but that isn't a clearly superior choice either.  Fixing PostgreSQL is
probably better and quicker to yield a return.

-- 
Peter Eisentraut   [EMAIL PROTECTED]


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] Is my Internet connection slow

2002-11-04 Thread Peter Eisentraut
Bruce Momjian writes:

  Yeah.  I don't use your docs build anymore unless I really have to...
  the one at hub.org is much more responsive.

 Oh, that is a problem. Thanks.

Why do we have two doc builds anyway?

-- 
Peter Eisentraut   [EMAIL PROTECTED]


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [HACKERS] protocol change in 7.4

2002-11-04 Thread Mike Mascari
Neil Conway wrote:

There has been some previous discussion of changing the FE/BE protocol
in 7.4, in order to fix several problems. I think this is worth doing:
if we can resolve all these issues in a single release, it will lessen
the upgrade difficulties for users.


snip



If I've missed anything or if there is something you think we should
add, please let me know.


Is there any thought about changing the protocol to support 
two-phase commit? Not that 2PC and distributed transactions 
would be implemented in 7.4, but to prevent another protocol 
change in the future?

Mike Mascari
[EMAIL PROTECTED]


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


Re: [HACKERS] protocol change in 7.4

2002-11-04 Thread Neil Conway
Mike Mascari [EMAIL PROTECTED] writes:
 Is there any thought about changing the protocol to support
 two-phase commit? Not that 2PC and distributed transactions would be
 implemented in 7.4, but to prevent another protocol change in the
 future?

My understanding is that 2PC is one way to implement multi-master
replication. If that's what you're referring to, then I'm not sure I
see the point: the multi-master replication project (pgreplication)
doesn't use 2PC, due to apparent scalability problems (not to mention
that it also uses a separate channel for communications between
backends on different nodes).

Cheers,

Neil

-- 
Neil Conway [EMAIL PROTECTED] || PGP Key ID: DB3C29FC


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



Re: [HACKERS] protocol change in 7.4

2002-11-04 Thread Mike Mascari
Neil Conway wrote:

Mike Mascari [EMAIL PROTECTED] writes:


Is there any thought about changing the protocol to support
two-phase commit? Not that 2PC and distributed transactions would be
implemented in 7.4, but to prevent another protocol change in the
future?


My understanding is that 2PC is one way to implement multi-master
replication. If that's what you're referring to, then I'm not sure I
see the point: the multi-master replication project (pgreplication)
doesn't use 2PC, due to apparent scalability problems (not to mention
that it also uses a separate channel for communications between
backends on different nodes).


Actually, I was thinking along the lines of a true CREATE 
DATABASE LINK implementation, where multiple databases could 
participate in a distributed transaction. That would require the 
backend in which the main query is executing to act as the 
coordinator and each of the other participating databases to 
act as cohorts. And would require a protocol change to support 
the PREPARE, COMMIT-VOTE/ABORT-VOTE reply, and an ACK message 
following the completion of the distributed COMMIT or ABORT.

Mike Mascari
[EMAIL PROTECTED]


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html


Re: [HACKERS] protocol change in 7.4

2002-11-04 Thread Satoshi Nagayasu
Hi,

Mike Mascari [EMAIL PROTECTED] wrote:
 Is there any thought about changing the protocol to support 
 two-phase commit? Not that 2PC and distributed transactions 
 would be implemented in 7.4, but to prevent another protocol 
 change in the future?

I'm now implementing 2PC replication and distributed transaction. My 2PC
needs some supports in startup packet to establish a replication session
or a recovery session.

BTW, my 2PC replication is working, and I'm implementing 2PC recovery now.

-- 
NAGAYASU Satoshi [EMAIL PROTECTED]


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



Re: [HACKERS] Request for supported platforms

2002-11-04 Thread Sean Chittenden
  Or at least it's *trying* to apply it for 4.7 --- as near as I
  can tell without testing, the above scrap of resultmap code is
  wrong because both of the i.86 lines will match on FreeBSD 4.7,
  and I think the pg_regress coding will take the last match.
  Larry, did you actually test the CVS-tip resultmap to make sure
  it picks the right comparison file on your box?
 
  Yes, just did and it *FAILS*.  you need the order you have below.
  Sorry...
 
 Okay, I've updated the CVS tip to look like this:
 
 geometry/i.86-.*-freebsd=geometry-positive-zeros-bsd
 geometry/i.86-.*-freebsd4.7=geometry-bsd-precision
 geometry/i.86-.*-freebsd5=geometry-bsd-precision
 geometry/alpha.*-freebsd=geometry-positive-zeros
 
 Sean, would you verify this works for you?

It does, thank you.  I've just updated the -devel port to 7.3b4,
hopefully the mirrors will pick up the bits soon.  -sc

-- 
Sean Chittenden

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



Re: [HACKERS] PostgreSQL IRC Channel... who's the Admin?

2002-11-04 Thread Neil Conway
Justin Clift [EMAIL PROTECTED] writes:
 Hi all,
 
 Who's an Admin for the PostgreSQL IRC Channel (#postgresql) on
 irc.openprojects.net?

The only person I've seen with ops is someone called 'raja', who is
only rarely (i.e. once every couple months) in the channel. I talked
to lilo about getting Bruce ops, and he talked to Bruce about
it. Not sure what came out of that...

Cheers,

Neil

-- 
Neil Conway [EMAIL PROTECTED] || PGP Key ID: DB3C29FC


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [HACKERS] v7.3Beta4 Tag'd and Packaged ...

2002-11-04 Thread Thomas Lockhart
As I was unable to figure out a way of merging HEAD into a BRANCH
(BRANCH into HEAD is easy), I moved the REL7_3_STABLE tag up to today, so
that the BRANCH is in a more appropriate location.


It is easy to move both directions; I've done it. You need to have the 
right stuff in your checked-out tree (probably the branch), and you need 
to do the merge from HEAD. What went wrong in trying to do that?

 - Thomas


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [HACKERS] v7.3Beta4 Tag'd and Packaged ...

2002-11-04 Thread Thomas Lockhart
Out of curiousity, is there an easy (heh) way to upgrade(change?) a
checked out tree to be off the branch?


cvs update -rYOUR_BRANCH_NAME_HERE .

  - Thomas


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] PostgreSQL IRC Channel... who's the Admin?

2002-11-04 Thread Justin Clift
Hi Neil,

Cool.  It's fixed now.  We've just recreated the channel and started
giving operator access to the right people.

:-)

Regards and best wishes,

Justin Clift


Neil Conway wrote:
 
 Justin Clift [EMAIL PROTECTED] writes:
  Hi all,
 
  Who's an Admin for the PostgreSQL IRC Channel (#postgresql) on
  irc.openprojects.net?
 
 The only person I've seen with ops is someone called 'raja', who is
 only rarely (i.e. once every couple months) in the channel. I talked
 to lilo about getting Bruce ops, and he talked to Bruce about
 it. Not sure what came out of that...
 
 Cheers,
 
 Neil
 
 --
 Neil Conway [EMAIL PROTECTED] || PGP Key ID: DB3C29FC

-- 
My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there.
   - Indira Gandhi

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])