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
124c22d5
Commit
124c22d5
authored
Jun 26, 2008
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove use of postmaster.opts.default by pg_ctl.
parent
5f6f840e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
44 deletions
+19
-44
doc/src/sgml/ref/pg_ctl-ref.sgml
doc/src/sgml/ref/pg_ctl-ref.sgml
+1
-15
src/bin/pg_ctl/pg_ctl.c
src/bin/pg_ctl/pg_ctl.c
+18
-29
No files found.
doc/src/sgml/ref/pg_ctl-ref.sgml
View file @
124c22d5
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/pg_ctl-ref.sgml,v 1.4
5 2008/04/23 13:44:58 mha
Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/pg_ctl-ref.sgml,v 1.4
6 2008/06/26 01:12:19 momjian
Exp $
PostgreSQL documentation
-->
...
...
@@ -405,20 +405,6 @@ PostgreSQL documentation
</listitem>
</varlistentry>
<varlistentry>
<term><filename>postmaster.opts.default</filename></term>
<listitem>
<para>
If this file exists in the data directory,
<application>pg_ctl</application> (in <option>start</option>
mode) will pass the contents of the file as options to the
<command>postgres</command> command, unless overridden by the
<option>-o</option> option.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><filename>postmaster.opts</filename></term>
...
...
src/bin/pg_ctl/pg_ctl.c
View file @
124c22d5
...
...
@@ -4,7 +4,7 @@
*
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.9
8 2008/04/24 14:23:43 mha
Exp $
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.9
9 2008/06/26 01:12:20 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -140,7 +140,6 @@ static void read_post_opts(void);
static
bool
test_postmaster_connection
(
bool
);
static
bool
postmaster_is_alive
(
pid_t
pid
);
static
char
def_postopts_file
[
MAXPGPATH
];
static
char
postopts_file
[
MAXPGPATH
];
static
char
pid_file
[
MAXPGPATH
];
static
char
conf_file
[
MAXPGPATH
];
...
...
@@ -575,42 +574,35 @@ unlimit_core_size(void)
static
void
read_post_opts
(
void
)
{
char
*
optline
=
NULL
;
if
(
post_opts
==
NULL
)
{
char
**
optlines
;
int
len
;
optlines
=
readfile
(
ctl_command
==
RESTART_COMMAND
?
postopts_file
:
def_postopts_file
);
if
(
optlines
==
NULL
)
post_opts
=
""
;
/* defatult */
if
(
ctl_command
==
RESTART_COMMAND
)
{
if
(
ctl_command
==
START_COMMAND
||
ctl_command
==
RUN_AS_SERVICE_COMMAND
)
post_opts
=
""
;
else
optlines
=
readfile
(
postopts_file
);
if
(
optlines
==
NULL
)
{
write_stderr
(
_
(
"%s: could not read file
\"
%s
\"\n
"
),
progname
,
postopts_file
);
exit
(
1
);
}
}
else
if
(
optlines
[
0
]
==
NULL
||
optlines
[
1
]
!=
NULL
)
{
write_stderr
(
_
(
"%s: option file
\"
%s
\"
must have exactly one line
\n
"
),
progname
,
ctl_command
==
RESTART_COMMAND
?
postopts_file
:
def_postopts_file
);
exit
(
1
);
}
else
{
optline
=
optlines
[
0
];
len
=
strcspn
(
optline
,
"
\r\n
"
);
optline
[
len
]
=
'\0'
;
if
(
ctl_command
==
RESTART_COMMAND
)
else
if
(
optlines
[
0
]
==
NULL
||
optlines
[
1
]
!=
NULL
)
{
write_stderr
(
_
(
"%s: option file
\"
%s
\"
must have exactly one line
\n
"
),
progname
,
postopts_file
);
exit
(
1
);
}
else
{
int
len
;
char
*
optline
=
NULL
;
char
*
arg1
;
optline
=
optlines
[
0
];
len
=
strcspn
(
optline
,
"
\r\n
"
);
optline
[
len
]
=
'\0'
;
arg1
=
strchr
(
optline
,
*
SYSTEMQUOTE
);
if
(
arg1
==
NULL
||
arg1
==
optline
)
post_opts
=
""
;
...
...
@@ -622,8 +614,6 @@ read_post_opts(void)
if
(
postgres_path
!=
NULL
)
postgres_path
=
optline
;
}
else
post_opts
=
optline
;
}
}
}
...
...
@@ -1894,7 +1884,6 @@ main(int argc, char **argv)
if
(
pg_data
)
{
snprintf
(
def_postopts_file
,
MAXPGPATH
,
"%s/postmaster.opts.default"
,
pg_data
);
snprintf
(
postopts_file
,
MAXPGPATH
,
"%s/postmaster.opts"
,
pg_data
);
snprintf
(
pid_file
,
MAXPGPATH
,
"%s/postmaster.pid"
,
pg_data
);
snprintf
(
conf_file
,
MAXPGPATH
,
"%s/postgresql.conf"
,
pg_data
);
...
...
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