Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
ebe30ad5
Commit
ebe30ad5
authored
Aug 25, 2014
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pg_ctl, pg_upgrade: allow multiple -o/-O options, append them
Report by Pavel Raiskup
parent
bf1c8665
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
8 deletions
+39
-8
contrib/pg_upgrade/option.c
contrib/pg_upgrade/option.c
+21
-3
doc/src/sgml/pgupgrade.sgml
doc/src/sgml/pgupgrade.sgml
+4
-2
doc/src/sgml/ref/pg_ctl-ref.sgml
doc/src/sgml/ref/pg_ctl-ref.sgml
+2
-1
doc/src/sgml/ref/postgres-ref.sgml
doc/src/sgml/ref/postgres-ref.sgml
+2
-1
src/bin/pg_ctl/pg_ctl.c
src/bin/pg_ctl/pg_ctl.c
+10
-1
No files found.
contrib/pg_upgrade/option.c
View file @
ebe30ad5
...
@@ -137,17 +137,35 @@ parseCommandLine(int argc, char *argv[])
...
@@ -137,17 +137,35 @@ parseCommandLine(int argc, char *argv[])
break
;
break
;
case
'o'
:
case
'o'
:
old_cluster
.
pgopts
=
pg_strdup
(
optarg
);
/* append option? */
if
(
!
old_cluster
.
pgopts
)
old_cluster
.
pgopts
=
pg_strdup
(
optarg
);
else
{
char
*
old_pgopts
=
old_cluster
.
pgopts
;
old_cluster
.
pgopts
=
psprintf
(
"%s %s"
,
old_pgopts
,
optarg
);
free
(
old_pgopts
);
}
break
;
break
;
case
'O'
:
case
'O'
:
new_cluster
.
pgopts
=
pg_strdup
(
optarg
);
/* append option? */
if
(
!
new_cluster
.
pgopts
)
new_cluster
.
pgopts
=
pg_strdup
(
optarg
);
else
{
char
*
new_pgopts
=
new_cluster
.
pgopts
;
new_cluster
.
pgopts
=
psprintf
(
"%s %s"
,
new_pgopts
,
optarg
);
free
(
new_pgopts
);
}
break
;
break
;
/*
/*
* Someday, the port number option could be removed and passed
* Someday, the port number option could be removed and passed
* using -o/-O, but that requires postmaster -C to be
* using -o/-O, but that requires postmaster -C to be
* supported on all old/new versions.
* supported on all old/new versions
(added in PG 9.2)
.
*/
*/
case
'p'
:
case
'p'
:
if
((
old_cluster
.
port
=
atoi
(
optarg
))
<=
0
)
if
((
old_cluster
.
port
=
atoi
(
optarg
))
<=
0
)
...
...
doc/src/sgml/pgupgrade.sgml
View file @
ebe30ad5
...
@@ -130,14 +130,16 @@
...
@@ -130,14 +130,16 @@
<term><option>-o</option> <replaceable class="parameter">options</replaceable></term>
<term><option>-o</option> <replaceable class="parameter">options</replaceable></term>
<term><option>--old-options</option> <replaceable class="parameter">options</replaceable></term>
<term><option>--old-options</option> <replaceable class="parameter">options</replaceable></term>
<listitem><para>options to be passed directly to the
<listitem><para>options to be passed directly to the
old <command>postgres</command> command</para></listitem>
old <command>postgres</command> command; multiple
option invocations are appended</para></listitem>
</varlistentry>
</varlistentry>
<varlistentry>
<varlistentry>
<term><option>-O</option> <replaceable class="parameter">options</replaceable></term>
<term><option>-O</option> <replaceable class="parameter">options</replaceable></term>
<term><option>--new-options</option> <replaceable class="parameter">options</replaceable></term>
<term><option>--new-options</option> <replaceable class="parameter">options</replaceable></term>
<listitem><para>options to be passed directly to the
<listitem><para>options to be passed directly to the
new <command>postgres</command> command</para></listitem>
new <command>postgres</command> command; multiple
option invocations are appended</para></listitem>
</varlistentry>
</varlistentry>
<varlistentry>
<varlistentry>
...
...
doc/src/sgml/ref/pg_ctl-ref.sgml
View file @
ebe30ad5
...
@@ -302,7 +302,8 @@ PostgreSQL documentation
...
@@ -302,7 +302,8 @@ PostgreSQL documentation
<listitem>
<listitem>
<para>
<para>
Specifies options to be passed directly to the
Specifies options to be passed directly to the
<command>postgres</command> command.
<command>postgres</command> command; multiple
option invocations are appended.
</para>
</para>
<para>
<para>
The options should usually be surrounded by single or double
The options should usually be surrounded by single or double
...
...
doc/src/sgml/ref/postgres-ref.sgml
View file @
ebe30ad5
...
@@ -288,7 +288,8 @@ PostgreSQL documentation
...
@@ -288,7 +288,8 @@ PostgreSQL documentation
class="parameter">extra-options</replaceable> are passed to
class="parameter">extra-options</replaceable> are passed to
all server processes started by this
all server processes started by this
<command>postgres</command> process. If the option string contains
<command>postgres</command> process. If the option string contains
any spaces, the entire string must be quoted.
any spaces, the entire string must be quoted; multiple
option invocations are appended.
</para>
</para>
<para>
<para>
...
...
src/bin/pg_ctl/pg_ctl.c
View file @
ebe30ad5
...
@@ -2184,7 +2184,16 @@ main(int argc, char **argv)
...
@@ -2184,7 +2184,16 @@ main(int argc, char **argv)
register_servicename
=
pg_strdup
(
optarg
);
register_servicename
=
pg_strdup
(
optarg
);
break
;
break
;
case
'o'
:
case
'o'
:
post_opts
=
pg_strdup
(
optarg
);
/* append option? */
if
(
!
post_opts
)
post_opts
=
pg_strdup
(
optarg
);
else
{
char
*
old_post_opts
=
post_opts
;
post_opts
=
psprintf
(
"%s %s"
,
old_post_opts
,
optarg
);
free
(
old_post_opts
);
}
break
;
break
;
case
'p'
:
case
'p'
:
exec_path
=
pg_strdup
(
optarg
);
exec_path
=
pg_strdup
(
optarg
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment