From: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: BLOBs |
Date: | 2016-01-12 07:09:12 |
Message-ID: | VisenaEmail.28.b34dfb9e97714ef1.15234a51da7@tc7-visena |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
På tirsdag 12. januar 2016 kl. 02:32:46, skrev Eugene Yin <eugeneymail(at)ymail(dot)com
<mailto:eugeneymail(at)ymail(dot)com>>:
I did some search on the OID data type. Here is something I found regarding
to the deletion of the OID data.
QUOTE:
"The Large Object method for storing binary data is better suited to storing
very large values, but it has its own limitations. Specifically deleting a row
that contains a Large Object reference does not delete the Large Object.
Deleting the Large Object is a separate operation that needs to be performed.
Large Objects also have some security issues since anyone connected to the
database can view and/or modify any Large Object, even if they don't have
permissions to view/update the row containing the Large Object reference."
F <mailto:pgsql-sql(at)postgresql(dot)org>rom:
https://jdbc.postgresql.org/documentation/84/binary-data.html
<https://jdbc.postgresql.org/documentation/84/binary-data.html>
So I have two questions:
1) If it is true that "Deleting the Large Object is a separate operation that
needs to be performed.", after the deletion, what operation I need to perform,
in order to delete the OID data in the table? Possiblely put into an after
trigger
2) "Large Objects also have some security issues since anyone connected to the
database can view and/or modify any Large Object". Will this pose a real risk
to the security? or just a forethought?
1) You don't need to perform any "after delete"-operation as a developer. But
the DBA (or someone else) has to execute vacuumlo (see "man vacuumlo" for more
info) using cron or some other periodic scheduling tool.
2) Your mileage may vary, but for our app this isn't an issue.
PS: 8.4 is EOL, use a more current version, preferably 9.5.
I also recommend the -ng driver as it's the only one with proper BLOB-support,
as mentioned earlier in this thread.
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
www.visena.com <https://www.visena.com>
<https://www.visena.com>
From | Date | Subject | |
---|---|---|---|
Next Message | Eugene Yin | 2016-01-13 01:45:06 | BYTEA vs BLOB |
Previous Message | Eugene Yin | 2016-01-12 01:32:46 | Re: BLOBs |