[PATCHES] pgstat EXEC_BACKEND

2004-03-08 Thread Claudio Natoli

For application to HEAD, following community review.

Corrects a typo, introduces missing variables, and rearranges the
initialization of stats process under EXEC_BACKEND. 

[A cleaner, rationalized approach to stat/backend/SSDataBase child processes
under EXEC_BACKEND is on my TODO list. However this patch takes care of
immediate concerns (ie. stats test now passes under win32)]

--- 
Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see 
a
href=http://www.memetrics.com/emailpolicy.html;http://www.memetrics.com/em
ailpolicy.html/a
  



pgstat.patch
Description: Binary data

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


Re: [PATCHES] Update tests memory leak fix

2004-03-08 Thread Bruce Momjian

Got the diff -c now, thanks.

---

Lee Kindness wrote:
 Sorry guys, last diff wasn't a context one! diff -c attached this time
 round...
 
 L.
 
 - Original Message -
 From: Lee Kindness
 To: [EMAIL PROTECTED]
 Cc: Bruce Momjian ; Lee Kindness ; Shridhar Daithankar
 Sent: Saturday, March 06, 2004 3:07 PM
 Subject: ECPG: Update tests  memory leak fix
 
 See attached diff which corrects a per-thread memory leak in libecpg and
 changes the thread test program to create a user defined number of threads.
 Also attached tar.gz adds an additional thread test, which currently does
 NOT work as expected and is one of the cases Shridar and I will be looking
 at (removing need for AT xxx on every EXEC SQL).
 
 Note, the updated test shows that ECPG currently DOES support the
 specification of connection names by host variables (not only static strings
 as I had said previously).
 
 Thanks, L.

[ Attachment, skipping... ]

 
 ---(end of broadcast)---
 TIP 9: the planner will ignore your desire to choose an index scan if your
   joining column's datatypes do not match

-- 
  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/docs/faqs/FAQ.html


Re: [PATCHES] ECPG: Update tests memory leak fix

2004-03-08 Thread Bruce Momjian

I need a context diff, diff -c.

---

Lee Kindness wrote:
 See attached diff which corrects a per-thread memory leak in libecpg and changes the 
 thread test program to create a user defined number of threads. Also attached tar.gz 
 adds an additional thread test, which currently does NOT work as expected and is one 
 of the cases Shridar and I will be looking at (removing need for AT xxx on every 
 EXEC SQL).
 
 Note, the updated test shows that ECPG currently DOES support the specification of 
 connection names by host variables (not only static strings as I had said 
 previously).
 
 Thanks, L.

[ Attachment, skipping... ]

[ Attachment, skipping... ]

-- 
  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 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [PATCHES] contrib/xml2 function name change and minor bitrot fix

2004-03-08 Thread Bruce Momjian

Patch applied by Neil (thanks).  Thanks.

---


John Gray wrote:
 Hi,
 
 I've done a bit of testing now and it seems that both sets of XML
 functions will coexist in the same database (they both load OK and I can
 use functions from both without any apparent problem).
 
 I have changed the name of the new parse function to xml_valid and fixed
 a reference to SortMem which meant that the code as supplied would work
 against 7.3 and 7.4 but wouldn't work in CVS. Oops! Patch is attached.
 
 Regards
 
 John
 
 

[ Attachment, skipping... ]

 
 ---(end of broadcast)---
 TIP 7: don't forget to increase your free space map settings

-- 
  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 8: explain analyze is your friend


Re: [PATCHES] log_line_info

2004-03-08 Thread Bruce Momjian
Andrew Dunstan wrote:
 
 I think this is now ready for application, unless someone objects.
 
 Since the last patch I posted, I have done the following:
 
 . changed the escapes to lower case, as Peter prefers. This is also in 
 line with what Apache does, which is the nearest equivalent I can think of.
 . added 2 new escapes: %r = remote host and port and %x says postmaster 
 and friends stop here.  Postmaster and friends will also ignore any 
 escapes they see that don't make sense (specifically %u %d %i %r %s and 
 %c). However, they no longer ignore the whole facility. This means we 
 can use it for logging (for example) timestamps and pids in all cases.
 . added docco
 . changed source port reporting from host:port to host(port) to avoid 
 IP6 address ambiguity.
 
 If someone wants to monkey with the name of the facility, it shouldn't 
 be hard. I don't like plain log_line, though. log_line_prefix or 
 log_line_tag both seem to me better alternatives.
 
 After this is applied (fingers crossed) and everyone is happy, I will 
 submit a patch to remove log_timestamp, log_pid and (if we are agreed on 
 it) log_source_port.

I have applied this patch.  It will be a great addition to PostgreSQL.

I made a few modifications.  I reordered the options in the docs and
postgresql.conf, e.g.:

+ #log_line_prefix = '' # e.g. '%u%%%d '
+   # %u=user name %d=database name
+   # %r=remote host and port
+   # %p=PID %t=timestamp %i=command tag
+   # %c=session id %l=session line number
+   # %s=session start timestamp
+   # %x=stop here in non-session processes
+   # %%='%'

I also changed:

*** src/include/miscadmin.h 10 Feb 2004 03:42:45 -  1.153
--- src/include/miscadmin.h 29 Feb 2004 17:49:07 -
***
*** 24,29 
--- 24,31 
  #define MISCADMIN_H


+ #include libpq/libpq-be.h

(wouldn't compile) to:

*** src/backend/utils/misc/ps_status.c  22 Feb 2004 21:26:55 - 
1.17
--- src/backend/utils/misc/ps_status.c  9 Mar 2004 04:33:35 -
***
*** 26,31 
--- 26,32 
  #include crt_externs.h
  #endif

+ #include libpq/libpq.h
  #include miscadmin.h
  #include utils/ps_status.h

for use of Port.

-- 
  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
Index: doc/src/sgml/runtime.sgml
===
RCS file: /cvsroot/pgsql-server/doc/src/sgml/runtime.sgml,v
retrieving revision 1.245
diff -c -c -r1.245 runtime.sgml
*** doc/src/sgml/runtime.sgml   7 Mar 2004 01:02:55 -   1.245
--- doc/src/sgml/runtime.sgml   9 Mar 2004 04:33:24 -
***
*** 1973,1978 
--- 1973,2070 
   /varlistentry
   
   varlistentry
+   termvarnamelog_line_prefix/varname (typestring/type)/term
+   listitem
+para
+This is a literalprintf/-style string that is output at the
+beginning of each log line. The default is an empty string.
+Each recognized escape is replaced as outlined 
+below - anything else that looks like an escape is ignored. Other
+characters are copied straight to the log line. Some escapes are
+only recognised by session processes, and do not apply to
+processes without controlling sessions. applicationSyslog/ produces its 
own
+timestamp and process ID information, so you probably do not want to
+use those escapes if you are using applicationsyslog/.
+informaltable
+ tgroup cols=3
+  thead
+   row
+entryEscape/entry
+entryEffect/entry
+entrySession only/entry
+/row
+   /thead
+  tbody
+   row
+entryliteral%u/literal/entry
+entryUser Name/entry
+entryYes/entry
+   /row
+   row
+entryliteral%d/literal/entry
+entryDatabase Name/entry
+entryYes/entry
+   /row
+   row
+entryliteral%r/literal/entry
+entryRemote Hostname or IP address, and Remote Port/entry
+entryYes/entry
+   /row
+   row
+entryliteral%p/literal/entry
+entryProcess ID/entry
+entryNo/entry
+   /row
+   row
+entryliteral%t/literal/entry
+

Re: [PATCHES] log_line_info

2004-03-08 Thread Bruce Momjian

Oh, I also renamed it to log_line_prefix, which was one of your
suggestions.  And I also updated some of the documentation phrasing.

I also marked the TODO item as completed.

Thanks.

---

Andrew Dunstan wrote:
 
 I think this is now ready for application, unless someone objects.
 
 Since the last patch I posted, I have done the following:
 
 . changed the escapes to lower case, as Peter prefers. This is also in 
 line with what Apache does, which is the nearest equivalent I can think of.
 . added 2 new escapes: %r = remote host and port and %x says postmaster 
 and friends stop here.  Postmaster and friends will also ignore any 
 escapes they see that don't make sense (specifically %u %d %i %r %s and 
 %c). However, they no longer ignore the whole facility. This means we 
 can use it for logging (for example) timestamps and pids in all cases.
 . added docco
 . changed source port reporting from host:port to host(port) to avoid 
 IP6 address ambiguity.
 
 If someone wants to monkey with the name of the facility, it shouldn't 
 be hard. I don't like plain log_line, though. log_line_prefix or 
 log_line_tag both seem to me better alternatives.
 
 After this is applied (fingers crossed) and everyone is happy, I will 
 submit a patch to remove log_timestamp, log_pid and (if we are agreed on 
 it) log_source_port.

-- 
  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 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [PATCHES] PostgreSQL: libpq, win32 build

2004-03-08 Thread Bruce Momjian

This builds a debug version of the DLL's along with the non-debug
version.  Patch applied.  Thanks.


---

David Turner wrote:
 Hi
 
   release build uses the cl flags /MD /D NDEBUG.  Usually the debug
   build has a D suffix on the file name, so for example:
   
   libpqd.dll libpq, debug build
   libpqd.lib libpq, debug build, import library
   libpq.dll  libpq, release build
   libpq.lib  libpq, release build, import library
   
  
  What do we do now?  Build just one file, a lib?
 
 
 Currently, src/interfaces/libpq/win32.mak builds a statically-linked
 library libpq.lib, a debug dll libpq.dll, import library for the
 debug dll libpqdll.lib, a release dll libpq.dll, import library for
 the release dll libpqdll.lib.  To avoid naming clashes, I would make
 the debug dll and import libraries libpqd.dll and libpqddll.lib.
 
 Attached is src/interfaces/libpq/win32.mak, modified as I described.  I
 also had to make a copy of libpqdll.def to change the LIBRARY directive.
 
 
 Regards
 David Turner

Content-Description: libpqddll.def

[ Attachment, skipping... ]

Content-Description: win32.mak

[ Attachment, skipping... ]

-- 
  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