473,582 Members | 3,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 "conservati on 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*******@postg resql.org so that your
message can get through to the mailing list cleanly

Nov 12 '05 #1
8 2104
bt****@seaworth ysys.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 YourEmailAddres sHere" to ma*******@postg resql.org)

Nov 12 '05 #2
On Mon, 2003-11-17 at 10:23, Peter Eisentraut wrote:
bt****@seaworth ysys.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*********@al ert.infoplease. com>
Pearson Education/Information Please
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #3
bt****@seaworth ysys.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 anthropomorphis m: 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****@seaworth ysys.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*******@postg resql.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*******@postg resql.org so that your
message can get through to the mailing list cleanly

Nov 12 '05 #6
bt****@seaworth ysys.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*********@al ert.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****@seaworth ysys.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
1623
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 performing as the production database and the other one is the backup. The secondary one is keeping updated via the "Log Shipping" technic.
17
25471
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
1399
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 inserts per hour. Each record is narrow (20 columns mostly numeric). We then update those 10M records...running some simple math calculations. We then...
4
8583
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 2.0 work in a cluster environment. I mean, how to make sure the service will take the relay if one server fails. Is there something special to do...
3
5407
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 determine from the cluster which node is active (this is a active/standby configuration) and either proceed or sleep depending on the status. The interface...
13
2409
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
3571
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 the bat file and startup my Java Program. For this purpose, I have tried to place the bat file into share drive of two computers which are...
3
5722
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 be sure, we've started the database with db2start =successfull. And then shut it down again successfully too. The tricks appears when we switch...
5
8298
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 changed. Everything seems to work fine. The cluster is up and responding normally. The resources failover to another node when needed correctly....
0
7809
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8159
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8312
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6569
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5685
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5366
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3809
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3835
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1147
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.