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
f2764eea
Commit
f2764eea
authored
May 29, 1998
by
Thomas G. Lockhart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify ownership and security issues with alternate db locations.
parent
3d96825b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
23 deletions
+17
-23
doc/src/sgml/ref/create_database.sgml
doc/src/sgml/ref/create_database.sgml
+17
-23
No files found.
doc/src/sgml/ref/create_database.sgml
View file @
f2764eea
...
...
@@ -130,7 +130,7 @@ There was a problem with creating the required directory; this operation will
Description
</TITLE>
<PARA>
CREATE DATABASE creates a new PostgreSQL
database.
<command>CREATE DATABASE</command> creates a new Postgres
database.
The creator becomes the administrator of the new database.
</PARA>
...
...
@@ -142,10 +142,10 @@ There was a problem with creating the required directory; this operation will
Notes
</TITLE>
<PARA>
CREATE DATABASE statement is a PostgreSQL
language extension.
<command>CREATE DATABASE</command> statement is a Postgres
language extension.
</PARA>
<para>
Refer to
DROP DATABASE
statement to remove a database.
Refer to
<command>DROP DATABASE</command>
statement to remove a database.
</para>
</REFSECT2>
...
...
@@ -157,19 +157,17 @@ There was a problem with creating the required directory; this operation will
To create a new database:
</PARA>
<ProgramListing>
CREATE DATABASE lusiadas;
<prompt>olly=></prompt></computeroutput> <userinput>create database lusiadas;</userinput>
</ProgramListing>
<PARA>
To create a new database in <filename>~/private_db</filename>:
To create a new database in
an alternate area
<filename>~/private_db</filename>:
</PARA>
<ProgramListing>
$ mkdir private_db
$ initlocation ~/private_db
<prompt>$</prompt> <userinput>mkdir private_db</userinput>
<prompt>$</prompt> <userinput>initlocation ~/private_db</userinput>
<computeroutput>Creating Postgres database system directory /home/olly/private_db/base</computeroutput>
$ chmod a+rx private_db
$ chmod a+rwx private_db/base
$ psql
<prompt>$</prompt> <userinput>psql olly</userinput>
<computeroutput>Welcome to the POSTGRESQL interactive sql monitor:
Please read the file COPYRIGHT for copyright terms of POSTGRESQL
...
...
@@ -178,7 +176,7 @@ There was a problem with creating the required directory; this operation will
type \g or terminate with semicolon to execute query
You are currently connected to the database: template1
template1=
></computeroutput> <userinput>create database elsewhere with location = '/home/olly/private_db';</userinput>
<prompt>olly=></prompt
></computeroutput> <userinput>create database elsewhere with location = '/home/olly/private_db';</userinput>
<computeroutput>CREATEDB</computeroutput>
</ProgramListing>
</REFSECT1>
...
...
@@ -188,23 +186,19 @@ There was a problem with creating the required directory; this operation will
Bugs
</TITLE>
<PARA>
Where an ordinary user cannot change the ownership of files to other users
(which is correct from a security point of view), there is no easy way
to give the postgres backend access to files in a database at a
non-standard location without
giving similar access to all users. The situation shown in the usage
example makes <filename>/home/olly/private_db</filename> world-accessible.
There are security and data integrity issues involved with using alternate database locations
specified with absolute path names. See the Administrator's Guide for more information.
</PARA>
<para>
If, on the other hand, the user gets the system administrator to give
file ownership to the <literal>postgres</literal> superuser and restrict access, he will
then be unable to delete the <filename><replaceable>directory</replaceable>/base</filename> directory.
</para>
<!-- ------------------
comment from Olly; response from Thomas...
<comment>
initlocation does not create a PG_VERSION file in the specified location.
How will Postgre
SQL
handle the situation if it is upgraded to an
How will Postgre
s
handle the situation if it is upgraded to an
incompatible database version?
</comment>
Hmm. This isn't an issue since the upgrade would do a dump/reload from the main database area also.
Not sure if the dump/reload would guarantee that the alternate data area gets refreshed though...
-------------------- -->
</refsect1>
<REFSECT1 ID="R1-SQL-CREATEDATABASE-4">
...
...
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