473,401 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Alternative cluster location

MY version 7.3 setup uses the default cluster data directory of

/var/lib/pgsql/data

and I'm aware that one suggested alternative is

/usr/local/pgsql/data

In my reading of server setup configuration and and drive partitioning,
though, I came to believe that the partition mounted at /var should be
used for "temporary" data, such as mail spool files and log files, and
typically, that that partition doesn't need to be large (in comparision,
for instance, to other partitions such as that mounted at /usr, which is
large to accomodate installation of applications, or /home, which is
large because I typically define that partition to "remainder of disk
space").

So I've been thinking that the /var/lib/pgsql/data default cluster data
directory was an odd choice, since a database, which while definitely
subject to lots of change (which favors /var...), is likely neither
temporary nor small (which argues for somewhere else, I think).

But since I know enough to know that I don't really know enough, and that
the team that decided on the /var... or /usr... default directory
probably did so with good reason, I'm compelled to ask what do some of
you think about the idea of creating a "home" directory for postgres on
the partition mounted at /home, and using, say, /home/postgres/pgsql/data
as the cluster data directory (or with specific reference to the thread I
started about "conservation of OIDS, I would use three cluster data
directories: /home/postgres/pgsql/data/prod,
/home/postgres/pgsql/data/qat,and /home/postgres/pgsql/data/dev )?

What would be the downside to this approach?

~Berend Tober


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 12 '05 #1
8 2092
bt****@seaworthysys.com writes:
So I've been thinking that the /var/lib/pgsql/data default cluster data
directory was an odd choice, since a database, which while definitely
subject to lots of change (which favors /var...), is likely neither
temporary nor small (which argues for somewhere else, I think).
The /var directory is for variable data files. Nothing says anything
about temporary or small.
probably did so with good reason, I'm compelled to ask what do some of
you think about the idea of creating a "home" directory for postgres on
the partition mounted at /home, and using, say, /home/postgres/pgsql/data
as the cluster data directory


Sure you can do that, but it doesn't seem particularly cleaner to me. You
might argue that "home" is for personal files, so you would be at the
wrong place again.

In the end, it's purely a matter of personal (or organizational) taste,
not a technical tradeoff.

--
Peter Eisentraut pe*****@gmx.net
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 12 '05 #2
On Mon, 2003-11-17 at 10:23, Peter Eisentraut wrote:
bt****@seaworthysys.com writes:
So I've been thinking that the /var/lib/pgsql/data default cluster data
directory was an odd choice, since a database, which while definitely
subject to lots of change (which favors /var...), is likely neither
temporary nor small (which argues for somewhere else, I think).


The /var directory is for variable data files. Nothing says anything
about temporary or small.
probably did so with good reason, I'm compelled to ask what do some of
you think about the idea of creating a "home" directory for postgres on
the partition mounted at /home, and using, say, /home/postgres/pgsql/data
as the cluster data directory


On linux, you may also want to consider the most recent proposed FHS,
which suggests a top-level /srv directory used for 'data generated by
users for the services the system offers'

Personally, I like the FHS and would prefer that the various distros
installed postgresql in a manner more consistent with it (and if
necessary that the postgresql configs were modified to make that and
easier alternative.) But as you say, Peter, there is a great deal of
personal preference that goes into these considerations.

--
Karl DeBisschop <kd*********@alert.infoplease.com>
Pearson Education/Information Please
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #3
bt****@seaworthysys.com writes:
So I've been thinking that the /var/lib/pgsql/data default cluster
data directory was an odd choice, since a database, which while
definitely subject to lots of change (which favors /var...), is
likely neither temporary nor small (which argues for somewhere else,
I think).
The /var directory is for variable data files. Nothing says anything
about temporary or small.


Agreed that nothing says the files are necessarily small, but the
"advice" regarding disk partitioning I read implied small by saying that
the hard drive partition created with the intention of mounting as /var
*usually* does not need to be large. O.k., the writer probably was not
thinking of RDBMS.
probably did so with good reason, I'm compelled to ask what do some
of you think about the idea of creating a "home" directory for
postgres on the partition mounted at /home, and using, say,
/home/postgres/pgsql/data as the cluster data directory
Sure you can do that, but it doesn't seem particularly cleaner to me.


Only as an anthropomorphism: Since even though no such actual person
exists, all the database files are "owned" by the "user" postgres, which
is what leads me to think of this approach.
You might argue that "home" is for personal files, so you would be at
the wrong place again.
In the end, it's purely a matter of personal (or organizational) taste,
not a technical tradeoff.


Thank you.

~Berend Tober


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 12 '05 #4
bt****@seaworthysys.com writes:
So I've been thinking that the /var/lib/pgsql/data default cluster
data directory was an odd choice, since a database, which while


Sure you can do that, but it doesn't seem particularly cleaner to me.
You might argue that "home" is for personal files, so you would be at
the wrong place again.

In the end, it's purely a matter of personal (or organizational) taste,
not a technical tradeoff.


I think the original driving thought technically has something to do with
system backup, and restore or system re-install in the case of
catastrophic failure, as well as what I've alluded to in regards to
original server setup planning and how intended usage impacts decisions
with respect to hard drive partitioning (and vice versa?). I don't think
there is much under /var that I usually consider necessary to back up.
The postgresql.conf and pg_hba.conf files are valuable, and while the
data base obviously is THE principle value, tar on the cluster data
directory is not useful.

Maybe at least piping the output of pg_dump for backup purposes to
/home/postgres would make sense, so as to catch the database backup snap
shot along with the user data in a nightly run of tar on the /home
partition.

~Berend Tober


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 12 '05 #5
Karl DeBisschop writes:
On linux, you may also want to consider the most recent proposed FHS,
which suggests a top-level /srv directory used for 'data generated by
users for the services the system offers'
Interesting, but I'm not sure it's appropriate. Considering the examples
offered for /srv: www, ftp, rsync, cvs, it's more intended for placing
actual files there to be served to the outside. (In case of CVS that's
not quite right, admittedly.) On the other hand, database files are more
like IMAP folders, which are internal state information that can only
(reasonably) be read or written via some (possibly remote) program.
Maybe we should pose that question to the FHS group.
Personally, I like the FHS and would prefer that the various distros
installed postgresql in a manner more consistent with it
I think they are doing quite well. What complaints do you have?
(and if necessary that the postgresql configs were modified to make that
and easier alternative.)


I don't think there are any problems on the configure/make side. Do you
know of any?

--
Peter Eisentraut pe*****@gmx.net
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 12 '05 #6
bt****@seaworthysys.com writes:
I think the original driving thought technically has something to do with
system backup, and restore or system re-install in the case of
catastrophic failure, as well as what I've alluded to in regards to
original server setup planning and how intended usage impacts decisions
with respect to hard drive partitioning (and vice versa?). I don't think
there is much under /var that I usually consider necessary to back up.


Good point. Again, maybe we should just ask the FHS group about it.

Personally, if I had to do a slightly more complex than average database
system setup with a separate hard disk, possibly even more than one, I'd
just mount them to /mnt/data{1-n} and pointed the postmaster there.

--
Peter Eisentraut pe*****@gmx.net
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 12 '05 #7
On Mon, 2003-11-17 at 11:07, Peter Eisentraut wrote:
Karl DeBisschop writes:
On linux, you may also want to consider the most recent proposed FHS,
which suggests a top-level /srv directory used for 'data generated by
users for the services the system offers'
Interesting, but I'm not sure it's appropriate. Considering the examples
offered for /srv: www, ftp, rsync, cvs, it's more intended for placing
actual files there to be served to the outside. (In case of CVS that's
not quite right, admittedly.) On the other hand, database files are more
like IMAP folders, which are internal state information that can only
(reasonably) be read or written via some (possibly remote) program.


I'm not sure where you read that, other than by the examples given. Were
there other statements that led you to this conclusion?

I read '/srv contains site-specific data which is served by this
system'. If postgresql were to use this model on a Linux-FHS system, I
would suggest something like:

1) config files in /etc
2) data tables in /srv
3) indexes, WAL data, temp files stay in /var/lib/pgsql

This fits in with the general idea that this user data is often rather
valuable, and is one of the partitions that needs to be backed up with
special care (although this is also true of big parts of /var). In a
typical database implementation, this is not as true of the indices,
which can just be regenerated.

It also provides a framework for those site that split data and indices
onto different disks for performance reasons.
Maybe we should pose that question to the FHS group.


It might be worth doing. Like you, I'm not sure how/if this model would
appliy. But now is the time to think about how it might be applied and
what implications that has for stablility and performance of the DBMS.
In this case, I think it might be an overall benefit.
Personally, I like the FHS and would prefer that the various distros
installed postgresql in a manner more consistent with it


I think they are doing quite well. What complaints do you have?


Just that the config files for postgresql are not in /etc. This was
primarily aimed at RedHat, because that is what I'm most familiar with.
(and if necessary that the postgresql configs were modified to make that
and easier alternative.)


I don't think there are any problems on the configure/make side. Do you
know of any?


I was recalling a thread some time ago where someone (I thought it was
you) was concerned that the postgresql security model made it hard to
place the config files in /etc. Or something like that. It's a very
vague recollection - I referred to it of of respect for the fact that
other people have thought about it more than it, rather than from any
specific knowledge.

--
Karl DeBisschop <kd*********@alert.infoplease.com>
Pearson Education/Information Please
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 12 '05 #8

bt****@seaworthysys.com writes:
I think the original driving thought technically has something to do with
system backup, and restore or system re-install in the case of
catastrophic failure, as well as what I've alluded to in regards to
original server setup planning and how intended usage impacts decisions
with respect to hard drive partitioning (and vice versa?).
I believe some of the partitioning idea for /var was the idea that it was a
filesystem that would often be written to, unlike /, and that it was partly a
filesystem corruption safety net to have it as a separate filesystem. This of
course is what gives us the impression that it's suitable for ommission from
backups, i.e. stuff we don't worry too much about losing in the case of a
filesystem failure.

I don't think there is much under /var that I usually consider necessary to
back up.


It's always bugged me about /var/named/
--
Nigel Andrews

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 12 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Leonardo C | last post by:
Hi: I'm trying to setup a MS Cluster but I don't know if it is feasible to configure it in the way I think. I have two machines with win2k server and MSSQL-2000 one of them is currently...
17
by: Peter Ericsson | last post by:
Does anyone know if Microsoft plans to implement an C# (.net) API for MS Cluster like the one in C++? Or has someone else written a C# wrapper for the C++ API?
0
by: davidb999 | last post by:
I'd appreciate any help/suggestions you people working with MySql cluster can offer. I'm hoping MySql Cluster can help us with a high volume need. Our needs are (at max load) 10M Million...
4
by: ThunderMusic | last post by:
Hi, We have many servers setup as a cluster. When one server crashes, another one take the relay... We want to know if it's possible (I suppose it is) to make a Windows service developed with .NET...
3
by: Simon | last post by:
Hi All, I'm hoping someone will have some words of wisdom for me regarding MS Clustering on Windows 2003. I have a service that runs on a cluster. During invocation it's supposed to...
13
by: Eric Layman | last post by:
Hi everyone, Will clustering of webservers affect SESSION states? Is there a dotnet term for the above mentioned scenario? Pls advise. Thanks.
1
by: =?Utf-8?B?S2Vubnk=?= | last post by:
I have one bat file that contains a command to startup Java Program. Then, I would like to create a cluster job to call the bat file. In case of one computer is down, another computer can also call...
3
by: Bruno LIVERNAIS | last post by:
Hi, We are currently installing a DB2 V9 ESE on a Linux server (RHEL4U4-x86_64). Installation runs successfully on each node. Database user environment is OK and the instance is well created. To...
5
by: aleu | last post by:
Hi all, I have recently changed IP addresses on my MS SQL cluster (the new IP addresses belongs to a different network). Both physical node's IP addresses and resource's IP addresses have been...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.