public inbox for [email protected]  
help / color / mirror / Atom feed
Postgresql Software Location
5+ messages / 5 participants
[nested] [flat]

* Postgresql Software Location
@ 2024-08-29 18:12 Henry Ashu <[email protected]>
  2024-08-29 18:58 ` Re: Postgresql Software Location Ron Johnson <[email protected]>
  2024-08-30 02:22 ` Re: Postgresql Software Location Rui DeSousa <[email protected]>
  0 siblings, 2 replies; 5+ messages in thread

From: Henry Ashu @ 2024-08-29 18:12 UTC (permalink / raw)
  To: [email protected]

We have installed our postgresql software in this location:

[postgres@testdbapql01 data]$ pwd
/var/lib/pgsql/16/data
[postgres@testbapql01 data]$ df -h .
Filesystem             Size  Used Avail Use% Mounted on
/dev/mapper/rhel-root   28G  4.5G   23G  17% /
[postgres@testdbapql01 data]$

Does this look correct? We are thinking that it should not be installed on
the root filesystem.

Thank you

*Henry Ashu*

Database Administrator
*o:* 503.672.5114 | *f:* 800.551.8821 | DAT.com
[image: DAT Solutions] <https://www.dat.com/;    [image: Like us on
Facebook] <https://www.facebook.com/loadboards;  [image: Follow us on
Twitter] <https://twitter.com/loadboards;  [image: Connect with us on
LinkedIn] <https://www.linkedin.com/company/datsolutions;  [image: Visit
our YouTube Channel] <https://www.youtube.com/datloadboards;  [image: Visit
us on Instagram] <https://instagram.com/dat_solutions;


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Postgresql Software Location
  2024-08-29 18:12 Postgresql Software Location Henry Ashu <[email protected]>
@ 2024-08-29 18:58 ` Ron Johnson <[email protected]>
  1 sibling, 0 replies; 5+ messages in thread

From: Ron Johnson @ 2024-08-29 18:58 UTC (permalink / raw)
  To: Pgsql-admin <[email protected]>

On Thu, Aug 29, 2024 at 2:13 PM Henry Ashu <[email protected]> wrote:

> We have installed our postgresql software in this location:
>
> [postgres@testdbapql01 data]$ pwd
> /var/lib/pgsql/16/data
>

That directory is where I put the $PGDATA for a long time.  Now I put it in
/Database/16/data.  Why?  Two reasons:
1. /var/lib/pgsql is usually postgres' $HOME, and I don't want to clutter
that up.
2. /Database makes it obvious to all concerned what's in it.


> [postgres@testbapql01 data]$ df -h .
> Filesystem             Size  Used Avail Use% Mounted on
> /dev/mapper/rhel-root   28G  4.5G   23G  17% /
> [postgres@testdbapql01 data]$
>
> Does this look correct?
>

"Correct" is relative.  What other mount points are on that server (for
example, /var/log)?  Having said that... I think it's a horrible idea.


> We are thinking that it should not be installed on the root filesystem
>

I would *never* put a database directory on the root filesystem.  Some
other process outside of your control fills up root, and... poof, there
goes your database.  (Postgresql doesn't like full mount points.)

We go with three mount points:
- /Database/${MajorVersion}  (note the lack of "data"!)
- /Database/backups
- /var/log/postgresql (which $PGDATA/postgresql.conf log_directory points
to).

No separate mount point for pg_wal.  I think that's a relic of the bygone
era of 300GB spindles (much less 300MB spindles). YMMV..

-- 
Death to America, and butter sauce.
Iraq lobster!


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Postgresql Software Location
  2024-08-29 18:12 Postgresql Software Location Henry Ashu <[email protected]>
@ 2024-08-30 02:22 ` Rui DeSousa <[email protected]>
  2024-08-30 02:33   ` Re: Postgresql Software Location Sam Stearns <[email protected]>
  1 sibling, 1 reply; 5+ messages in thread

From: Rui DeSousa @ 2024-08-30 02:22 UTC (permalink / raw)
  To: Henry Ashu <[email protected]>; +Cc: [email protected]



> On Aug 29, 2024, at 2:12 PM, Henry Ashu <[email protected]> wrote:
> 
> We have installed our postgresql software in this location: 
> 
> [postgres@testdbapql01 data]$ pwd
> /var/lib/pgsql/16/data
> [postgres@testbapql01 data]$ df -h .
> Filesystem             Size  Used Avail Use% Mounted on
> /dev/mapper/rhel-root   28G  4.5G   23G  17% /
> [postgres@testdbapql01 data]$
> 
> Does this look correct? We are thinking that it should not be installed on the root filesystem.
> Thank you
> 
> Henry Ashu
> 
> Database Administrator
> o: 503.672.5114 | f: 800.551.8821 | DAT.com
> 
>  <https://www.dat.com/;     <https://www.facebook.com/loadboards;   <https://twitter.com/loadboards;   <https://www.linkedin.com/company/datsolutions;   <https://www.youtube.com/datloadboards;   <https://instagram.com/dat_solutions;
Yes, it is better to have more mount points than not.  Root should be its own mount point; OSs do not like when the root volume is full thus it is normally a very small filesystem.

Disclaimer: I’ve seen servers with a single mount point /.  A lot of devops servers are setup with a single mount point for the entire OS.  Seems like that is the case with your system.  The reason to have multiple filesystem is space management, mount point options, and filesystem corruption.  I haven’t had the need to run fsck in decades until last month.  An xfs volume was corrupted and even fsck couldn’t fix it; had to resort to a filesystem snapshot.  

I normally have three; 

1. /var/log — for log files via syslog.  You don’t want a run away application to full up the log directory and crash the server.  
2. $PGDATA — data volume 
3. $PGDATA/pg_wal — Normally, I’m using ZFS with different filesystem properties.  It’s also a good idea to manage the space separately.

As far as absolute mount points that’s a preference; my current gig is using the following with the instance names as a directory under those mount points.

/pg_data
/pg_wal





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Postgresql Software Location
  2024-08-29 18:12 Postgresql Software Location Henry Ashu <[email protected]>
  2024-08-30 02:22 ` Re: Postgresql Software Location Rui DeSousa <[email protected]>
@ 2024-08-30 02:33   ` Sam Stearns <[email protected]>
  2024-08-30 03:56     ` Re: Postgresql Software Location ji hwan song <[email protected]>
  0 siblings, 1 reply; 5+ messages in thread

From: Sam Stearns @ 2024-08-30 02:33 UTC (permalink / raw)
  To: Rui DeSousa <[email protected]>; +Cc: Henry Ashu <[email protected]>; [email protected]

Thanks, Rui!

On Fri, Aug 30, 2024 at 11:52 AM Rui DeSousa <[email protected]> wrote:

>
>
> On Aug 29, 2024, at 2:12 PM, Henry Ashu <[email protected]> wrote:
>
> We have installed our postgresql software in this location:
>
> [postgres@testdbapql01 data]$ pwd
> /var/lib/pgsql/16/data
> [postgres@testbapql01 data]$ df -h .
> Filesystem             Size  Used Avail Use% Mounted on
> /dev/mapper/rhel-root   28G  4.5G   23G  17% /
> [postgres@testdbapql01 data]$
>
> Does this look correct? We are thinking that it should not be installed on
> the root filesystem.
>
> Thank you
>
> *Henry Ashu*
>
> Database Administrator
> *o:* 503.672.5114 | *f:* 800.551.8821 | DAT.com
> [image: DAT Solutions] <https://www.dat.com/;    [image: Like us on
> Facebook] <https://www.facebook.com/loadboards;  [image: Follow us on
> Twitter] <https://twitter.com/loadboards;  [image: Connect with us on
> LinkedIn] <https://www.linkedin.com/company/datsolutions;  [image: Visit
> our YouTube Channel] <https://www.youtube.com/datloadboards;  [image:
> Visit us on Instagram] <https://instagram.com/dat_solutions;
>
>
> Yes, it is better to have more mount points than not.  Root should be its
> own mount point; OSs do not like when the root volume is full thus it is
> normally a very small filesystem.
>
> Disclaimer: I’ve seen servers with a single mount point /.  A lot of
> devops servers are setup with a single mount point for the entire OS.
> Seems like that is the case with your system.  The reason to have multiple
> filesystem is space management, mount point options, and filesystem
> corruption.  I haven’t had the need to run fsck in decades until last
> month.  An xfs volume was corrupted and even fsck couldn’t fix it; had to
> resort to a filesystem snapshot.
>
> I normally have three;
>
> 1. /var/log — for log files via syslog.  You don’t want a run away
> application to full up the log directory and crash the server.
> 2. $PGDATA — data volume
> 3. $PGDATA/pg_wal — Normally, I’m using ZFS with different filesystem
> properties.  It’s also a good idea to manage the space separately.
>
> As far as absolute mount points that’s a preference; my current gig is
> using the following with the instance names as a directory under those
> mount points.
>
> /pg_data
> /pg_wal
>
>
>
>

-- 

*Samuel Stearns*
Lead Database Administrator
*c:* 971 762 6879 | *o:* 503 672 5115 | DAT.com
[image: DAT]
<https://www.dat.com/?utm_medium=email&utm_source=DAT_email_signature_link;


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Postgresql Software Location
  2024-08-29 18:12 Postgresql Software Location Henry Ashu <[email protected]>
  2024-08-30 02:22 ` Re: Postgresql Software Location Rui DeSousa <[email protected]>
  2024-08-30 02:33   ` Re: Postgresql Software Location Sam Stearns <[email protected]>
@ 2024-08-30 03:56     ` ji hwan song <[email protected]>
  0 siblings, 0 replies; 5+ messages in thread

From: ji hwan song @ 2024-08-30 03:56 UTC (permalink / raw)
  To: Sam Stearns <[email protected]>; +Cc: Rui DeSousa <[email protected]>; Henry Ashu <[email protected]>; [email protected]

루트엔 설치 가급적 하지마시고 별도의 공간에 파일시스템을 만들고 해당 명칭으로 링크를 걸어주세요..

2024년 8월 30일 (금) 오전 11:34, Sam Stearns <[email protected]>님이 작성:

> Thanks, Rui!
>
> On Fri, Aug 30, 2024 at 11:52 AM Rui DeSousa <[email protected]>
> wrote:
>
>>
>>
>> On Aug 29, 2024, at 2:12 PM, Henry Ashu <[email protected]> wrote:
>>
>> We have installed our postgresql software in this location:
>>
>> [postgres@testdbapql01 data]$ pwd
>> /var/lib/pgsql/16/data
>> [postgres@testbapql01 data]$ df -h .
>> Filesystem             Size  Used Avail Use% Mounted on
>> /dev/mapper/rhel-root   28G  4.5G   23G  17% /
>> [postgres@testdbapql01 data]$
>>
>> Does this look correct? We are thinking that it should not be installed
>> on the root filesystem.
>>
>> Thank you
>>
>> *Henry Ashu*
>>
>> Database Administrator
>> *o:* 503.672.5114 | *f:* 800.551.8821 | DAT.com
>> [image: DAT Solutions] <https://www.dat.com/;    [image: Like us on
>> Facebook] <https://www.facebook.com/loadboards;  [image: Follow us on
>> Twitter] <https://twitter.com/loadboards;  [image: Connect with us on
>> LinkedIn] <https://www.linkedin.com/company/datsolutions;  [image: Visit
>> our YouTube Channel] <https://www.youtube.com/datloadboards;  [image:
>> Visit us on Instagram] <https://instagram.com/dat_solutions;
>>
>>
>> Yes, it is better to have more mount points than not.  Root should be its
>> own mount point; OSs do not like when the root volume is full thus it is
>> normally a very small filesystem.
>>
>> Disclaimer: I’ve seen servers with a single mount point /.  A lot of
>> devops servers are setup with a single mount point for the entire OS.
>> Seems like that is the case with your system.  The reason to have multiple
>> filesystem is space management, mount point options, and filesystem
>> corruption.  I haven’t had the need to run fsck in decades until last
>> month.  An xfs volume was corrupted and even fsck couldn’t fix it; had to
>> resort to a filesystem snapshot.
>>
>> I normally have three;
>>
>> 1. /var/log — for log files via syslog.  You don’t want a run away
>> application to full up the log directory and crash the server.
>> 2. $PGDATA — data volume
>> 3. $PGDATA/pg_wal — Normally, I’m using ZFS with different filesystem
>> properties.  It’s also a good idea to manage the space separately.
>>
>> As far as absolute mount points that’s a preference; my current gig is
>> using the following with the instance names as a directory under those
>> mount points.
>>
>> /pg_data
>> /pg_wal
>>
>>
>>
>>
>
> --
>
> *Samuel Stearns*
> Lead Database Administrator
> *c:* 971 762 6879 | *o:* 503 672 5115 | DAT.com
> [image: DAT]
> <https://www.dat.com/?utm_medium=email&utm_source=DAT_email_signature_link;
>


^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2024-08-30 03:56 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-08-29 18:12 Postgresql Software Location Henry Ashu <[email protected]>
2024-08-29 18:58 ` Ron Johnson <[email protected]>
2024-08-30 02:22 ` Rui DeSousa <[email protected]>
2024-08-30 02:33   ` Sam Stearns <[email protected]>
2024-08-30 03:56     ` ji hwan song <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox