X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 938A5D1B481 for ; Wed, 26 Nov 2003 21:36:41 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 81697-04 for ; Wed, 26 Nov 2003 17:36:16 -0400 (AST) Received: from localhost.localdomain (unknown [166.70.154.50]) by svr1.postgresql.org (Postfix) with ESMTP id 81D2ED1B496 for ; Wed, 26 Nov 2003 17:36:05 -0400 (AST) Received: from [127.0.0.1] (strongbad [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id hAQLaAAv008520; Wed, 26 Nov 2003 14:36:11 -0700 In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v606) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Message-Id: <8D2CC478-2058-11D8-8479-000A959D1424@intercation.com> Content-Transfer-Encoding: quoted-printable Cc: pgsql-admin@postgresql.org, "Andrei Bintintan" From: Adam Ruth Subject: Re: pg_lo_import alternative ... Date: Wed, 26 Nov 2003 14:36:10 -0700 To: kent@wareham.k12.ma.us X-Mailer: Apple Mail (2.606) X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/456 X-Sequence-Number: 11443 I'm storing images and files in the database. I have a database server=20 with all of the binaries and several web servers that attach to it.=20=20 The web servers are for load balancing and each maintain a cache of=20 image files locally. It is the cached images that are served by the=20 web servers. When a request comes in, the web server checks to the=20 database server to see if there's a newer file, and if so it downloads=20 the file and stores it in the cache. If not, it just uses the cached=20 version. This helps us out because changes to images and files themselves are=20 part of transactions, not just changes to their names. Backup is=20 easier because I don't have to worry about a mismatch between the files=20 and the names in the database. Also, I can have one connection=20 changing making changes to a file or image while another downloads the=20 last committed version without having to worry about any contention for=20 it. Let me know if you're interested in any of our implementation details. Adam Ruth On Nov 26, 2003, at 9:10 AM, kent@wareham.k12.ma.us wrote: > I'm after experiences similar to what you are describing with=20 > lo_export. I have used lo_import and ol_export to test image storage=20 > and retrival. One problem that you mention is with super user access=20 > required to export to the local file system. The second problem is=20 > that it seems to add another layer to a web application. A table=20 > constructed that contains pointers outside the database seems to be=20 > the easiest to deal with in terms of retrieval of images and dislpay=20 > within a web page. > > Anyone that that is using Postgres for storage and retrival of images=20 > please post your experiences. Thank you. > >> -----Original Message----- >> From: Andrei Bintintan [mailto:klodoma@ar-sd.net] >> Sent: Wednesday, November 26, 2003 02:20 PM >> To: 'Daniel Rubio', pgsql-admin@postgresql.org >> Subject: Re: [ADMIN] pg_lo_import alternative ... >> >> Are there many images? >> >> I do not suggest to store the images in the database. Better save=20 >> them on >> the disk and in the database save only the path to the image. Think=20 >> also to >> the size of the dump(with images). >> >> It is more easy to handle this way. >> >> This is my opinion. >> >> Best regards. >> Andy. >> >> ----- Original Message ----- >> From: "Daniel Rubio" >> To: >> Sent: Wednesday, November 26, 2003 3:58 PM >> Subject: [ADMIN] pg_lo_import alternative ... >> >> >>> Hi all. >>> >>> One of our clients wants to store images into his postgres database >>> hosted by us. >>> >>> To do this is trying to use the PHP function pg_lo_import, receiving >>> this error message from server: >>> >>> Waning: pg_query() [function.pg-query]: Query failed: ERROR: You must >>> have Postgres superuser privilege to use server-side lo_import().=20 >>> Anyone >>> can use the client-side lo_import() provided by libpq. . in >>> /apps/web/html/funcions.php on line 121 >>> >>> I can read that there's a client-side function in libpq, but I can't >>> find any information about it and their use. >>> >>> Anyone knows something? >>> -- >>> ******************************************************** >>> Daniel Rubio Rodr=EDguez >>> OASI (Organisme Aut=F2nom Per la Societat de la Informaci=F3) >>> c/ Assalt, 12 >>> 43003 - Tarragona >>> Tef.: 977.244.007 - Fax: 977.224.517 >>> e-mail: drubio@oasi.org >>> ******************************************************** >>> >>> >>> ---------------------------(end of=20 >>> broadcast)--------------------------- >>> TIP 8: explain analyze is your friend >> >> >> ---------------------------(end of=20 >> broadcast)--------------------------- >> TIP 3: if posting/reading through Usenet, please send an appropriate >> subscribe-nomail command to majordomo@postgresql.org so that your >> message can get through to the mailing list cleanly >> > > > > ---------------------------(end of=20 > broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to=20 > majordomo@postgresql.org) >