Thread: postgres data permission

postgres data permission

From
Silvio Brandani
Date:
Hi all,

I need to start a postgres istance on a samba filesystems /data which
have rwxrwxrwx (777) permissions, Ic ould not change  such permissions.
If I try to start postgres it complain that should be 700 permission .

How can I skip this control by postgres startup process and be able to
startup istance on this "special folder"??


---






Utilizziamo i dati personali che la riguardano esclusivamente per nostre finalità amministrative e contabili, anche
quandoli comunichiamo a terzi. Informazioni dettagliate, anche in ordine al Suo diritto di accesso e agli altri Suoi
diritti,sono riportate alla pagina http://www.savinodelbene.com/news/privacy.html 
Se avete ricevuto questo messaggio per errore Vi preghiamo di ritornarlo al mittente eliminandolo assieme agli
eventualiallegati, ai sensi art. 616 codice penale http://www.savinodelbene.com/codice_penale_616.html 
L'Azienda non si assume alcuna responsabilità giuridica qualora pervengano da questo indirizzo messaggi estranei
all'attivitàlavorativa o contrari a norme. 
--

cache lookup failed for relation (just some data here)

From
"Burgholzer, Robert (DEQ)"
Date:
I have noticed a few threads pertaining to the "cache lookup failed"
error message, and thought I would add some data to the mix.  I have
suffered this error in the past, and worked around it by dumping,
dropping and restoring my database (which is what landed me asking for
help yesterday :)).  I thought I would throw some data out into the mix
in the hopes that it might find someone else who is suffering from the
trouble.

My circumstance leading to the error:
- postgresql 8.3.7 on Centos Linux
- PHP connections that create temp table and populate with 100-200K
records (environmental modeling simulation system) - tables dropped
explicitly at the end of a simulation run (just an effort to be tidy)
- at times database log gives error "cache lookup failed for relation
XYXY" as a result of the call: "create temp table tmp_tablname ..."
- inserts attempts to this table subsequently fail "relation
tmp_tablname does not exist"
- copying and pasting the CREATE and INSERT statements into a psql
command line session SUCCEED without any issue, but subsequent PHP
connections (via command line call to php) FAIL with same errors.
- dump, drop and recreating the database fixes the problem (for a while)

From what I gathered looking through archives yesterday, this makes ME
think that it is catalog corruption perhaps?  But it would seem that the
PHP connections should not behave differently than the psql connections,
but I don't know enough to really say that...

Regards,
r.b.


Re: postgres data permission

From
Tom Lane
Date:
Silvio Brandani <silvio.brandani@tech.sdb.it> writes:
> I need to start a postgres istance on a samba filesystems /data which
> have rwxrwxrwx (777) permissions, Ic ould not change  such permissions.
> If I try to start postgres it complain that should be 700 permission .

> How can I skip this control by postgres startup process and be able to
> startup istance on this "special folder"??

You can't, and it wouldn't be a good idea even if you could.

I think what you're really saying is that you are trying to create a
Postgres data directory directly on a filesystem mount point.  Don't do
that (it's a large-caliber foot-gun even aside from permissions issues).
Make a subdirectory in the mount point, and use that as the data
directory, and make sure it has the right ownership and permissions.

            regards, tom lane

Re: postgres data permission

From
David Bear
Date:
this doesn't make sense. why go through the overhead of smb to get to a database cluster over a network connection when pg can already work over tcpip sockets and work much more switfly on a local file system?

2010/7/15 Silvio Brandani <silvio.brandani@tech.sdb.it>
Hi all,

I need to start a postgres istance on a samba filesystems /data which have rwxrwxrwx (777) permissions, Ic ould not change  such permissions.
If I try to start postgres it complain that should be 700 permission .

How can I skip this control by postgres startup process and be able to startup istance on this "special folder"??


---






Utilizziamo i dati personali che la riguardano esclusivamente per nostre finalità amministrative e contabili, anche quando li comunichiamo a terzi. Informazioni dettagliate, anche in ordine al Suo diritto di accesso e agli altri Suoi diritti, sono riportate alla pagina http://www.savinodelbene.com/news/privacy.html
Se avete ricevuto questo messaggio per errore Vi preghiamo di ritornarlo al mittente eliminandolo assieme agli eventuali allegati, ai sensi art. 616 codice penale http://www.savinodelbene.com/codice_penale_616.html
L'Azienda non si assume alcuna responsabilità giuridica qualora pervengano da questo indirizzo messaggi estranei all'attività lavorativa o contrari a norme.
--


--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



--
David Bear
College of Public Programs at ASU
602-494-0424

Re: postgres data permission

From
Rob Wultsch
Date:
2010/7/15 David Bear <David.Bear@asu.edu>:
> this doesn't make sense. why go through the overhead of smb to get to a
> database cluster over a network connection when pg can already work over
> tcpip sockets and work much more switfly on a local file system?
>

Lets say you have to boxes:
#1: lots of disk but not much ram or cpu.
#2: lots of ram and cpu but not much disk.

Could it make sense to have box #2 run pg while mounting the fs of box #1?


--
Rob Wultsch
wultsch@gmail.com

Re: postgres data permission

From
Silvio Brandani
Date:
David Bear ha scritto:
> this doesn't make sense. why go through the overhead of smb to get to
> a database cluster over a network connection when pg can already work
> over tcpip sockets and work much more switfly on a local file system?
>
> 2010/7/15 Silvio Brandani <silvio.brandani@tech.sdb.it
> <mailto:silvio.brandani@tech.sdb.it>>
>
>     Hi all,
>
>     I need to start a postgres istance on a samba filesystems /data
>     which have rwxrwxrwx (777) permissions, Ic ould not change  such
>     permissions.
>     If I try to start postgres it complain that should be 700 permission .
>
>     How can I skip this control by postgres startup process and be
>     able to startup istance on this "special folder"??
>
>
>     ---
>
>
>
>
>
>
>
> --
> David Bear
> College of Public Programs at ASU
> 602-494-0424
It is just a special occasion to restore a very big production database
in the only place we find enough space...

Thanks

---






Utilizziamo i dati personali che la riguardano esclusivamente per nostre finalit� amministrative e contabili, anche
quandoli comunichiamo a terzi. Informazioni dettagliate, anche in ordine al Suo diritto di accesso e agli altri Suoi
diritti,sono riportate alla pagina http://www.savinodelbene.com/news/privacy.html 
Se avete ricevuto questo messaggio per errore Vi preghiamo di ritornarlo al mittente eliminandolo assieme agli
eventualiallegati, ai sensi art. 616 codice penale http://www.savinodelbene.com/codice_penale_616.html 
L'Azienda non si assume alcuna responsabilit� giuridica qualora pervengano da questo indirizzo messaggi estranei
all'attivit�lavorativa o contrari a norme. 
--

Re: postgres data permission

From
Jim Montgomery
Date:
Remove me from your email chain please
I will react very badly if I recieve any more emails from you.
 
> From: wultsch@gmail.com
> Date: Fri, 16 Jul 2010 00:14:45 -0700
> Subject: Re: [ADMIN] postgres data permission
> To: David.Bear@asu.edu
> CC: silvio.brandani@tech.sdb.it; pgsql-admin@postgresql.org
>
> 2010/7/15 David Bear <David.Bear@asu.edu>:
> > this doesn't make sense. why go through the overhead of smb to get to a
> > database cluster over a network connection when pg can already work over
> > tcpip sockets and work much more switfly on a local file system?
> >
>
> Lets say you have to boxes:
> #1: lots of disk but not much ram or cpu.
> #2: lots of ram and cpu but not much disk.
>
> Could it make sense to have box #2 run pg while mounting the fs of box #1?
>
>
> --
> Rob Wultsch
> wultsch@gmail.com
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin


Get a new e-mail account with Hotmail - Free. Sign-up now.

Re: postgres data permission

From
Rob Wultsch
Date:
On Fri, Jul 16, 2010 at 12:30 AM, Jim Montgomery <monty1967@hotmail.com> wrote:
> Remove me from your email chain please
> I will react very badly if I recieve any more emails from you.
>

Jim Montgomery,
This is the second message of this form I have received from you. Tom
Lane recently suggested that you unsubscribe from these mailing list
via the like at the bottom of every message. I think this would be a
good idea. I would like to take this one step further and suggest you
unsubscribe from this plane of existence.

Nothing personal but you are dragging down the species,

Rob Wultsch