Unix Technical Forum

Re: Postgresql 8.0.3, symbolic link to /var/lib/pgsql/data/base

This is a discussion on Re: Postgresql 8.0.3, symbolic link to /var/lib/pgsql/data/base within the pgsql Admins forums, part of the PostgreSQL category; --> Why don't you copy/move the entire data directory (minus pg_xlog if you are separating them) -----Original Message----- From: Sergiusz ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 05:18 AM
Anjan Dave
 
Posts: n/a
Default Re: Postgresql 8.0.3, symbolic link to /var/lib/pgsql/data/base

Why don't you copy/move the entire data directory (minus pg_xlog if you are separating them)

-----Original Message-----
From: Sergiusz Jarczyk [mailto:sergiusz.jarczyk@qresc.com]
Sent: Wed 9/28/2005 3:34 PM
To: pgsql-admin@postgresql.org
Cc:
Subject: Re: [ADMIN] Postgresql 8.0.3, symbolic link to /var/lib/pgsql/data/base



Hi Jeffrey

Jeffrey Tenny wrote:

> I'm trying to move my databases to another drive.
>
> With postmaster off, I create:
>
> /home/pgsql
>
> mv /var/lib/pgsql/data/base /home/pgsql/
>
>
> I make sure that /home/pgsql is owned by postgres, and only 'rwx' for
> the owner. All the permissions look fine.
>
> from /var/lib/pgsql/data, I do
>
> ln -s /home/pgsql/base
>
> Of course the link permissions look like:
>
> lrwxrwxrwx 1 postgres postgres 16 Sep 28 14:21 base -> /home/pgsql/base
>
>
> The postmaster starts, but attempts to access the database complain
> that permission is denied:
>
> $ psql -l
> psql: FATAL: could not access directory "/var/lib/pgsql/data/base/1":
> Permission denied
>
>
> Any clues about why this won't work?
> I've searched the archives, but most references were to invalid
> permissions on the directories and I'm pretty sure I've got those right.
>
> All my pgsql dirs look pretty much like:
> drwx------ 3 postgres postgres 4096 Sep 28 14:21 pgsql
>
> Both in the original /var/lib/pgsql area, and the /home/pgsql area.
>


Try to issue chown -R postgres.postgres /home/pgsql

Sergiusz


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 05:18 AM
Jeffrey Tenny
 
Posts: n/a
Default Re: Postgresql 8.0.3, symbolic link to /var/lib/pgsql/data/base

Anjan Dave wrote:
> Why don't you copy/move the entire data directory (minus pg_xlog if you are separating them)


I tried that too, and then postmaster wouldn't even start. I don't
remember if it was a permission error or if it was complaining it
couldn't find the configuration files.

I suspect whatever symlink problems are manifesting in just moving
'base' also apply to moving 'data'.

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 05:18 AM
Chris Travers
 
Posts: n/a
Default Re: Postgresql 8.0.3, symbolic link to /var/lib/pgsql/data/base

Jeffrey Tenny wrote:

> Anjan Dave wrote:
>
>> Why don't you copy/move the entire data directory (minus pg_xlog if
>> you are separating them)

>
>
> I tried that too, and then postmaster wouldn't even start. I don't
> remember if it was a permission error or if it was complaining it
> couldn't find the configuration files.
>
> I suspect whatever symlink problems are manifesting in just moving
> 'base' also apply to moving 'data'.



Check the file ownerships. Maybe a chown -R postgres /home/postgres
might be in order...

Also, if you are using SE-Linux, this can make things interesting...

Best Wishes,
Chris Travers
Metatron Technology Consulting

>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>
>



---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:33 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com