From: | "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> |
---|---|
To: | "Barry Lind" <blind(at)xythos(dot)com>, <pgsql-hackers-win32(at)postgresql(dot)org> |
Cc: | "PostgreSQL-patches" <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: pg_autovacuum log paths can't contain spaces |
Date: | 2004-09-21 09:14:06 |
Message-ID: | E7F85A1B5FF8D44C8A1AF6885BC9A0E43065AA@ratbert.vale-housing.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers-win32 pgsql-patches |
> -----Original Message-----
> From: pgsql-hackers-win32-owner(at)postgresql(dot)org
> [mailto:pgsql-hackers-win32-owner(at)postgresql(dot)org] On Behalf
> Of Barry Lind
> Sent: 21 September 2004 00:46
> To: pgsql-hackers-win32(at)postgresql(dot)org
> Subject: [pgsql-hackers-win32] pg_autovacuum log paths can't
> contain spaces
>
> I just installed the beta2 Dev 3 version of the installer.
> When I went to go tryout pg_autovacuum I noticed two problem:
>
> 1) -P isn't working correctly. -P is being interpreted as -p
> in the service code and it tries to use the password (-P)
> that I passed in as the port (-p). I seem to recall a
> previous email about this and think this is already fixed in CVS.
Yup, it has been.
> 2) When I specify a path that contains spaces to the -L
> switch it doesn't work correctly.
The patch below should rectify this.
Regards, Dave.
Index: pg_autovacuum.c
===================================================================
RCS file:
/projects/cvsroot/pgsql-server/contrib/pg_autovacuum/pg_autovacuum.c,v
retrieving revision 1.21
diff -u -r1.21 pg_autovacuum.c
--- pg_autovacuum.c 14 Sep 2004 04:06:20 -0000 1.21
+++ pg_autovacuum.c 21 Sep 2004 09:10:22 -0000
@@ -1217,7 +1217,13 @@
if (args->password)
sprintf(szCommand, "%s -P %s", szCommand,
args->password);
if (args->logfile)
- sprintf(szCommand, "%s -L %s", szCommand,
args->logfile);
+ {
+ if (strstr(args->logfile, " "))
+ sprintf(szCommand, "%s -L \"%s\"", szCommand,
args->logfile);
+ else
+ sprintf(szCommand, "%s -L %s", szCommand,
args->logfile);
+ }
+
if (args->sleep_base_value != (int) SLEEPBASEVALUE)
sprintf(szCommand, "%s -s %i", szCommand,
args->sleep_base_value);
if (args->sleep_scaling_factor != (float) SLEEPSCALINGFACTOR)
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Woolley | 2004-09-21 10:57:39 | XP install problems |
Previous Message | Barry Lind | 2004-09-20 23:45:52 | pg_autovacuum log paths can't contain spaces |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paesold | 2004-09-21 09:20:22 | Re: Fix for VACUUM in psql autocommit off |
Previous Message | Zhenbang Wei | 2004-09-21 01:42:14 | Update postgres-zh_TW.po for 8.0 |