|
25 | 25 | staticvoidusage(void);
|
26 | 26 | staticvoidcheck_required_directory(char**dirpath,char**configpath,
|
27 | 27 | char*envVarName,char*cmdLineOption,char*description);
|
| 28 | +#defineFIX_DEFAULT_READ_ONLY "-c default_transaction_read_only=false" |
28 | 29 |
|
29 | 30 |
|
30 | 31 | UserOptsuser_opts;
|
@@ -208,6 +209,17 @@ parseCommandLine(int argc, char *argv[])
|
208 | 209 | fclose(fp);
|
209 | 210 | }
|
210 | 211 |
|
| 212 | +/* Turn off read-only mode; add prefix to PGOPTIONS? */ |
| 213 | +if (getenv("PGOPTIONS")) |
| 214 | +{ |
| 215 | +char*pgoptions=psprintf("%s %s",FIX_DEFAULT_READ_ONLY, |
| 216 | +getenv("PGOPTIONS")); |
| 217 | +pg_putenv("PGOPTIONS",pgoptions); |
| 218 | +pfree(pgoptions); |
| 219 | +} |
| 220 | +else |
| 221 | +pg_putenv("PGOPTIONS",FIX_DEFAULT_READ_ONLY); |
| 222 | + |
211 | 223 | /* Get values from env if not already set */
|
212 | 224 | check_required_directory(&old_cluster.bindir,NULL,"PGBINOLD","-b",
|
213 | 225 | "old cluster binaries reside");
|
|