pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Practical usage of large objects.
6+ messages / 6 participants
[nested] [flat]

* Practical usage of large objects.
@ 2020-05-13 17:53 Dmitry Igrishin <dmitigr@gmail.com>
  2020-05-13 17:55 ` Re: Practical usage of large objects. Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-14 03:05 ` Re: Practical usage of large objects. Ron <ronljohnsonjr@gmail.com>
  0 siblings, 2 replies; 6+ messages in thread

From: Dmitry Igrishin @ 2020-05-13 17:53 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

Hello all,

As you know, PostgreSQL has a large objects facility [1]. I'm curious
are there real systems which are use this feature? I'm asking because
and I'm in doubt should the Pgfe driver [2] provide the convenient API
for working with large objects or not.

Thanks!

[1] https://www.postgresql.org/docs/12/largeobjects.html
[2] https://github.com/dmitigr/pgfe





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Practical usage of large objects.
  2020-05-13 17:53 Practical usage of large objects. Dmitry Igrishin <dmitigr@gmail.com>
@ 2020-05-13 17:55 ` Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-14 03:59   ` Re: Practical usage of large objects. Michael Paquier <michael@paquier.xyz>
  1 sibling, 1 reply; 6+ messages in thread

From: Tom Lane @ 2020-05-13 17:55 UTC (permalink / raw)
  To: Dmitry Igrishin <dmitigr@gmail.com>; +Cc: pgsql-general@lists.postgresql.org

Dmitry Igrishin <dmitigr@gmail.com> writes:
> As you know, PostgreSQL has a large objects facility [1]. I'm curious
> are there real systems which are use this feature?

We get questions about it regularly, so yeah people use it.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Practical usage of large objects.
  2020-05-13 17:53 Practical usage of large objects. Dmitry Igrishin <dmitigr@gmail.com>
  2020-05-13 17:55 ` Re: Practical usage of large objects. Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-05-14 03:59   ` Michael Paquier <michael@paquier.xyz>
  2020-05-14 13:36     ` Re: Practical usage of large objects. Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 1 reply; 6+ messages in thread

From: Michael Paquier @ 2020-05-14 03:59 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Dmitry Igrishin <dmitigr@gmail.com>; pgsql-general@lists.postgresql.org

On Wed, May 13, 2020 at 01:55:48PM -0400, Tom Lane wrote:
> Dmitry Igrishin <dmitigr@gmail.com> writes:
>> As you know, PostgreSQL has a large objects facility [1]. I'm curious
>> are there real systems which are use this feature?
> 
> We get questions about it regularly, so yeah people use it.

I recall that some applications where I work make use of it for some
rather large log-like data.  At the end of the day, it really boils
down to if you wish to store blobs of data which are larger than 1GB,
the limit for toasted fields, as LOs can be up to 4TB.  Also, updating
or reading a LO can be much cheaper than a toasted field, as the
latter would update/read the value as a whole.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Practical usage of large objects.
  2020-05-13 17:53 Practical usage of large objects. Dmitry Igrishin <dmitigr@gmail.com>
  2020-05-13 17:55 ` Re: Practical usage of large objects. Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-14 03:59   ` Re: Practical usage of large objects. Michael Paquier <michael@paquier.xyz>
@ 2020-05-14 13:36     ` Laurenz Albe <laurenz.albe@cybertec.at>
  2020-05-14 18:30       ` Re: Practical usage of large objects. Thomas Markus <t.markus@proventis.net>
  0 siblings, 1 reply; 6+ messages in thread

From: Laurenz Albe @ 2020-05-14 13:36 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Dmitry Igrishin <dmitigr@gmail.com>; pgsql-general@lists.postgresql.org

On Thu, 2020-05-14 at 12:59 +0900, Michael Paquier wrote:
> On Wed, May 13, 2020 at 01:55:48PM -0400, Tom Lane wrote:
> > Dmitry Igrishin <dmitigr@gmail.com> writes:
> > > As you know, PostgreSQL has a large objects facility [1]. I'm curious
> > > are there real systems which are use this feature?
> > 
> > We get questions about it regularly, so yeah people use it.
> 
> I recall that some applications where I work make use of it for some
> rather large log-like data.  At the end of the day, it really boils
> down to if you wish to store blobs of data which are larger than 1GB,
> the limit for toasted fields, as LOs can be up to 4TB.  Also, updating
> or reading a LO can be much cheaper than a toasted field, as the
> latter would update/read the value as a whole.

Interesting; only recently I played with that a little and found that
that is not necessarily true:

https://www.cybertec-postgresql.com/en/binary-data-performance-in-postgresql/

Yours,
Laurenz Albe






^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Practical usage of large objects.
  2020-05-13 17:53 Practical usage of large objects. Dmitry Igrishin <dmitigr@gmail.com>
  2020-05-13 17:55 ` Re: Practical usage of large objects. Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-14 03:59   ` Re: Practical usage of large objects. Michael Paquier <michael@paquier.xyz>
  2020-05-14 13:36     ` Re: Practical usage of large objects. Laurenz Albe <laurenz.albe@cybertec.at>
@ 2020-05-14 18:30       ` Thomas Markus <t.markus@proventis.net>
  0 siblings, 0 replies; 6+ messages in thread

From: Thomas Markus @ 2020-05-14 18:30 UTC (permalink / raw)
  To: ; +Cc: pgsql-general@lists.postgresql.org


Am 14.05.20 um 15:36 schrieb Laurenz Albe:
> Interesting; only recently I played with that a little and found that
> that is not necessarily true:
>
> https://www.cybertec-postgresql.com/en/binary-data-performance-in-postgresql/
>
> Yours,
> Laurenz Albe
We used lo a lot in a project for large uploads (>4GB files). Really 
useful in a cloud environment.

I was interested in speed camparison myself and made a similar test with 
network connection and without pg specific code.
https://github.com/5UtJAjiRWj1q/psql-lob-performance

File access is really fast and lo access is much slower than bytea (as 
expected). But content size limitation and memory consumption for bytea 
is problematic.

regards
Thomas






^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Practical usage of large objects.
  2020-05-13 17:53 Practical usage of large objects. Dmitry Igrishin <dmitigr@gmail.com>
@ 2020-05-14 03:05 ` Ron <ronljohnsonjr@gmail.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Ron @ 2020-05-14 03:05 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

Our databases use bytea instead.  (I don't know why the application vendor 
decided on that.)

On 5/13/20 12:53 PM, Dmitry Igrishin wrote:
> Hello all,
>
> As you know, PostgreSQL has a large objects facility [1]. I'm curious
> are there real systems which are use this feature? I'm asking because
> and I'm in doubt should the Pgfe driver [2] provide the convenient API
> for working with large objects or not.
>
> Thanks!
>
> [1] https://www.postgresql.org/docs/12/largeobjects.html
> [2] https://github.com/dmitigr/pgfe
>
>

-- 
Angular momentum makes the world go 'round.





^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2020-05-14 18:30 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13 17:53 Practical usage of large objects. Dmitry Igrishin <dmitigr@gmail.com>
2020-05-13 17:55 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-05-14 03:59   ` Michael Paquier <michael@paquier.xyz>
2020-05-14 13:36     ` Laurenz Albe <laurenz.albe@cybertec.at>
2020-05-14 18:30       ` Thomas Markus <t.markus@proventis.net>
2020-05-14 03:05 ` Ron <ronljohnsonjr@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox