Re: Further clarification in documentation: No deletion of unreferenced large objects

From: Oliver Marienfeld <oliver_marienfeld(at)outlook(dot)de>
To: "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: Further clarification in documentation: No deletion of unreferenced large objects
Date: 2023-06-13 10:57:24
Message-ID: F8F1431E-B08A-4C56-BDA3-FBD6C1B44C0F@outlook.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

This page isn't relevant to the discussion at hand as it doesn't have anything to do with large objects. Whether it should would be a different complaint.

Thanks for pointing this out. I picked the wrong page.

When deleting a row that references (contains) a large object, I think that
most users expect the DBMS to take care of the, now unreferenced, BLOB.

On what grounds? To me this looks just like any other foreign key situation and removing FK rows does not impact the PK. What would lead one to think large objects behave differently?

OK, thinking of a LOB as a PK makes sense. It’s just that as a JDBC user, it’s not clear that users must clean up unreferenced items. For example, java.sql.Blob has no id attribute which one could use to do this. On the other hand, maybe the JDBC driver should call lo_unlink if a row with a LOB gets deleted? I have to admit, that I do not yet have fully understood all implications in this matter.

Admittedly, that is not the best place. Perhaps the introductory chapter
in https://www.postgresql.org/docs/current/lo-intro.html would be a good
place to mention that there is no referential integrity to large objects.

Yes, that could help. After reading through your comments and the documentation again, I’m not sure whether my request is on or off topic. I would understand if you decided against extending the docs.

Kind regards
Oliver Marienfeld

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Umut TEKİN 2023-06-14 07:28:06 Re: Sequence Dependency
Previous Message Laurenz Albe 2023-06-12 16:48:54 Re: Further clarification in documentation: No deletion of unreferenced large objects