Re: File Handling in pgsql

From: Vikram A <vikkiatbipl(at)yahoo(dot)in>
To: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: File Handling in pgsql
Date: 2010-04-12 09:58:55
Message-ID: 632838.70461.qm@web8503.mail.in.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you for the valuable reply.

If i go for the path store rather than the bytea. The disk sever [where files are stored] must be live always?

Is it possible to keep the DB and the files on the same server for avoiding the n/w failure. Is it good to have NFS on red hat linux enterprise edition[5.x].

And if it is bytea - the backup operation is only once, it is not needed to take the files along with DB backup.

Thank you very much for the suggestions.

Vikram A

________________________________
From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Vikram A <vikkiatbipl(at)yahoo(dot)in>
Cc: pgsql-general(at)postgresql(dot)org
Sent: Mon, 12 April, 2010 3:20:08 PM
Subject: Re: [GENERAL] File Handling in pgsql

On 12/04/10 17:17, Vikram A wrote:
> Hi,
> I would like to store the files(.doc, .xls , images, vedios) in the
> postgresql data base as a field.

If you really want to store them in the database your options are a bytea field (warning: size limits) or a large object. See the manual.

Do you really need ACID-compliant access to your files? Have you considered storing just the paths to the files in the database, and the files themselves externally to the database in the file system? This is MUCH more efficient if you don't need the facilities the database requires.

There has been lots of discussion of this in the past on this list, so consider searching the mailing list archives and Google.

--
Craig Ringer

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2010-04-12 11:01:34 Re: File Handling in pgsql
Previous Message Ben Martin 2010-04-12 09:52:05 Re: Creating a read/write virtual table?