Re: [PATCHES] Compiling libpq with VisualC

2004-06-11 Thread Bruce Momjian
Sorry, I accidentally bounced this to the lists. The patch needs redesign and has been removed from the patch queue. --- Andreas Pflug wrote: > The appended patch implements ENABLE_THREAD_SAFETY for win32 compiled > with V

Re: [PATCHES] Compiling libpq with VisualC

2004-06-11 Thread Bruce Momjian
This patch has to be redone to make it thread-safe. --- Andreas Pflug wrote: > The appended patch implements ENABLE_THREAD_SAFETY for win32 compiled > with Visual C. Two additional files will supply the needed pthread stuf

Re: [PATCHES] Compiling libpq with VisualC

2004-06-11 Thread Bruce Momjian
Andreas Pflug wrote: > Manfred Spraul wrote: > > > > > Wrong. There are portable test-and-set functions in the Win32 SDK: for > > example InterlockedCompareExchange. They operate on ints and do not > > need initialization. > > 'k, missed that one. Lets use it. > > > > > There is a third option

Re: [PATCHES] Compiling libpq with VisualC

2004-06-11 Thread Andreas Pflug
Manfred Spraul wrote: Wrong. There are portable test-and-set functions in the Win32 SDK: for example InterlockedCompareExchange. They operate on ints and do not need initialization. 'k, missed that one. Lets use it. There is a third option: Add one C++ file and use the constructor to initialize

Re: [PATCHES] Compiling libpq with VisualC

2004-06-11 Thread Bruce Momjian
Can you put that in the new pthread file that needs to be added for Win32? --- Manfred Spraul wrote: > Andreas Pflug wrote: > > > Bruce Momjian wrote: > > > >> > >> > >> Agreed. My pthread book says pthread_mutex_init() sh

Re: [PATCHES] Compiling libpq with VisualC

2004-06-11 Thread Manfred Spraul
Andreas Pflug wrote: Bruce Momjian wrote: Agreed. My pthread book says pthread_mutex_init() should be called only once, and we have to guarantee that. If the Windows implentation allows it to be called multiple times, just create a function to be called only by Win32 that does that and leave the

Re: [PATCHES] pg_ctl using START with paths needing quotes

2004-06-11 Thread Andrew Dunstan
Bruce Momjian wrote: Tom Lane wrote: Andrew Dunstan <[EMAIL PROTECTED]> writes: Bruce Momjian wrote: This applied patch changes the way pg_ctl starts on Win32. Using START, it is not possible to quote the executable name, who's directory might have spaces: This is a really u

Re: [PATCHES] [HACKERS] serverlog function (log_destination file)

2004-06-11 Thread Andreas Pflug
Tom Lane wrote: This has got portability issues (fopen("ab")) My doc says b is ignored on ansi systems, and recommends using it. Do you have other experiences? and I don't care for its use of malloc in preference to palloc either. Do we already have an applicable memory context in the postmast

Re: [PATCHES] Fix for erroneous warning on Shutdown

2004-06-11 Thread Bruce Momjian
Patch rejected, asking for more research. --- Simon Riggs wrote: > > Minor patch to correct erroneous warning in cvs tip, believed to be a > very minor regression. > > When a shutdown was requested within CHECKPOINT_SECOND

Re: [PATCHES] Fix for erroneous warning on Shutdown

2004-06-11 Thread Tom Lane
Simon Riggs <[EMAIL PROTECTED]> writes: > Minor patch to correct erroneous warning in cvs tip, believed to be a > very minor regression. This patch is wrong; it effectively disables the warning altogether. > When a shutdown was requested within CHECKPOINT_SECONDS of a checkpoint, > the shutdown c

Re: [PATCHES] [HACKERS] serverlog function (log_destination file)

2004-06-11 Thread Bruce Momjian
Tom Lane wrote: > Andreas Pflug <[EMAIL PROTECTED]> writes: > > The attached patch has the default filename issue fixed, and > > documentation. Since I don't have a doc build system functional, there > > might be tag mismatches or other typos; please check. IMHO this should > > be committed with

Re: [PATCHES] [HACKERS] serverlog function (log_destination file)

2004-06-11 Thread Tom Lane
Andreas Pflug <[EMAIL PROTECTED]> writes: > The attached patch has the default filename issue fixed, and > documentation. Since I don't have a doc build system functional, there > might be tag mismatches or other typos; please check. IMHO this should > be committed without waiting for log rotati

Re: [PATCHES] pg_ctl using START with paths needing quotes

2004-06-11 Thread Bruce Momjian
Tom Lane wrote: > Andrew Dunstan <[EMAIL PROTECTED]> writes: > > Bruce Momjian wrote: > >> This applied patch changes the way pg_ctl starts on Win32. > >> > >> Using START, it is not possible to quote the executable name, who's > >> directory might have spaces: > > > > This is a really ugly hack (

Re: [PATCHES] [HACKERS] serverlog function (log_destination file)

2004-06-11 Thread Andreas Pflug
Bruce Momjian wrote: I was thinking of close/reopen so log files could be rotated. Log file rotation is fine, if we find a consensus quite soon how to implement it... Seems as if I might find some time to implement it until feature freeze. The attached patch has the default filename issue fix

Re: [PATCHES] pg_ctl using START with paths needing quotes

2004-06-11 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > Bruce Momjian wrote: >> This applied patch changes the way pg_ctl starts on Win32. >> >> Using START, it is not possible to quote the executable name, who's >> directory might have spaces: > > This is a really ugly hack (I take the blame since I gave Br

Re: [PATCHES] pg_ctl using START with paths needing quotes

2004-06-11 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan <[EMAIL PROTECTED]> writes: Bruce Momjian wrote: This applied patch changes the way pg_ctl starts on Win32. Using START, it is not possible to quote the executable name, who's directory might have spaces: This is a really ugly hack (I take the blame sin

Re: [PATCHES] translation updates pt_BR

2004-06-11 Thread Euler Taveira de Oliveira
Hi Peter, > Euler Taveira de Oliveira wrote: > > Here are some updates for REL7_4. > > Please apply it before release 7.4.3. > > http://www.ufgnet.ufg.br/euler/pg_update_7_4_3.tar.gz > > Installed. Brazil takes the lead... Thanks. And the docs are in progress too. -- Euler Taveira de Oliveira

Re: [PATCHES] Compiling libpq with VisualC

2004-06-11 Thread Andreas Pflug
Bruce Momjian wrote: Agreed. My pthread book says pthread_mutex_init() should be called only once, and we have to guarantee that. If the Windows implentation allows it to be called multiple times, just create a function to be called only by Win32 that does that and leave the Unix safe. Ok, so

Re: [PATCHES] path.c char[strlen("xxx")] not portable

2004-06-11 Thread Bruce Momjian
Patch applied. The only reason I used strlen is because sizeof a string is one more than the strlen(). --- Zeugswetter Andreas SB SD wrote: > > strlen inside variable declaration is not portable C (AIX): > > char env_path

Re: [PATCHES] Compiling libpq with VisualC

2004-06-11 Thread Bruce Momjian
Manfred Spraul wrote: > Andreas Pflug wrote: > > > I don't really think so. That mutex_initialized is a globally static > > variable, not a thread local one. Thread interruption between testing > > mutex_initialized and setting it is very unlikely and still wouldn't > > do much harm if it actua

Re: [PATCHES] pg_ctl using START with paths needing quotes

2004-06-11 Thread Bruce Momjian
Andrew Dunstan wrote: > > This is a really ugly hack (I take the blame since I gave Bruce the > idea). There are a few things to note: > > . the .bat file should probably be created in the data dir - that's > about the only place that we should be guaranteed we can write. > . the command should

[PATCHES] Fix for Win32 START

2004-06-11 Thread Bruce Momjian
After digging, I found START can accept a quoted executable name if you put a title of "" before it. I have remove the batch file hack and documented this requirement. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If

Re: [PATCHES] Compiling libpq with VisualC

2004-06-11 Thread Manfred Spraul
Andreas Pflug wrote: I don't really think so. That mutex_initialized is a globally static variable, not a thread local one. Thread interruption between testing mutex_initialized and setting it is very unlikely and still wouldn't do much harm if it actually does happen. Very unlikely is not a go

[PATCHES] Fix for erroneous warning on Shutdown

2004-06-11 Thread Simon Riggs
Minor patch to correct erroneous warning in cvs tip, believed to be a very minor regression. When a shutdown was requested within CHECKPOINT_SECONDS of a checkpoint, the shutdown code in the bgwriter (which has does checkpointing) would issue the erroneous message: LOG: checkpoints are occurrin

[PATCHES] path.c char[strlen("xxx")] not portable

2004-06-11 Thread Zeugswetter Andreas SB SD
strlen inside variable declaration is not portable C (AIX): char env_path[MAXPGPATH + strlen("PGLOCALEDIR=")]; use sizeof instead. Please apply to current Andreas path.c.locale.patch Description: path.c.locale.patch ---(end of broadcast)--- TI

Re: [PATCHES] Compiling libpq with VisualC

2004-06-11 Thread Andreas Pflug
Bruce Momjian wrote: I have looked over this patch. I noticed this: -static pthread_mutex_t init_mutex = PTHREAD_MUTEX_INITIALIZER; - +static pthread_mutex_t init_mutex; +static int mutex_initialized = 0; +if (!mutex_initiali

Re: [PATCHES] pg_ctl using START with paths needing quotes

2004-06-11 Thread Andrew Dunstan
This is a really ugly hack (I take the blame since I gave Bruce the idea). There are a few things to note: . the .bat file should probably be created in the data dir - that's about the only place that we should be guaranteed we can write. . the command should be preceded by '@' to suppress echoi