pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedUse bytearray for blobs or not?
6+ messages / 3 participants
[nested] [flat]
* Use bytearray for blobs or not?
@ 2019-01-04 11:41 Thomas Güttler <guettliml@thomas-guettler.de>
2019-01-04 11:48 ` Re: Use bytearray for blobs or not? Achilleas Mantzios <achill@matrix.gatewaynet.com>
2019-01-07 10:12 ` Re: Use bytearray for blobs or not? Thomas Güttler <guettliml@thomas-guettler.de>
0 siblings, 2 replies; 6+ messages in thread
From: Thomas Güttler @ 2019-01-04 11:41 UTC (permalink / raw)
To: pgsql-general
Some months ago I wrote a little application with Python+Django which stores
blob data in bytearrays.
It works.
In the future there will be a lot more traffic, and I am unsure
if this is really a good solution. I know this is more FUD than
concrete PG issue.
What do you think?
Which alternatives could be useful?
Regards,
Thomas
--
Thomas Guettler http://www.thomas-guettler.de/
I am looking for feedback: https://github.com/guettli/programming-guidelines
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Use bytearray for blobs or not?
2019-01-04 11:41 Use bytearray for blobs or not? Thomas Güttler <guettliml@thomas-guettler.de>
@ 2019-01-04 11:48 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
2019-01-04 13:15 ` Re: Use bytearray for blobs or not? Thomas Güttler <guettliml@thomas-guettler.de>
2019-01-04 16:02 ` Re: Use bytearray for blobs or not? Rob Sargent <robjsargent@gmail.com>
1 sibling, 2 replies; 6+ messages in thread
From: Achilleas Mantzios @ 2019-01-04 11:48 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On 4/1/19 1:41 μ.μ., Thomas Güttler wrote:
> Some months ago I wrote a little application with Python+Django which stores
> blob data in bytearrays.
>
> It works.
>
> In the future there will be a lot more traffic, and I am unsure
> if this is really a good solution. I know this is more FUD than
> concrete PG issue.
>
> What do you think?
Performance (at least for JDBC) is known to be better with blobs.
However, with bytea life is just easier for many reasons (backups, logical replication, other types of replication, sys management, etc).
>
> Which alternatives could be useful?
>
> Regards,
> Thomas
>
>
>
>
--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Use bytearray for blobs or not?
2019-01-04 11:41 Use bytearray for blobs or not? Thomas Güttler <guettliml@thomas-guettler.de>
2019-01-04 11:48 ` Re: Use bytearray for blobs or not? Achilleas Mantzios <achill@matrix.gatewaynet.com>
@ 2019-01-04 13:15 ` Thomas Güttler <guettliml@thomas-guettler.de>
1 sibling, 0 replies; 6+ messages in thread
From: Thomas Güttler @ 2019-01-04 13:15 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Am 04.01.19 um 12:48 schrieb Achilleas Mantzios:
> On 4/1/19 1:41 μ.μ., Thomas Güttler wrote:
>> Some months ago I wrote a little application with Python+Django which stores
>> blob data in bytearrays.
>>
>> It works.
>>
>> In the future there will be a lot more traffic, and I am unsure
>> if this is really a good solution. I know this is more FUD than
>> concrete PG issue.
>>
>> What do you think?
>
> Performance (at least for JDBC) is known to be better with blobs.
> However, with bytea life is just easier for many reasons (backups, logical replication, other types of replication, sys
> management, etc).
I could switch to a s3 like storage server, too. Up to now, this would only be
some lines of code. I could store the s3 IDs in postgres.
--
Thomas Guettler http://www.thomas-guettler.de/
I am looking for feedback: https://github.com/guettli/programming-guidelines
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Use bytearray for blobs or not?
2019-01-04 11:41 Use bytearray for blobs or not? Thomas Güttler <guettliml@thomas-guettler.de>
2019-01-04 11:48 ` Re: Use bytearray for blobs or not? Achilleas Mantzios <achill@matrix.gatewaynet.com>
@ 2019-01-04 16:02 ` Rob Sargent <robjsargent@gmail.com>
2019-01-07 07:35 ` Re: Use bytearray for blobs or not? Achilleas Mantzios <achill@matrix.gatewaynet.com>
1 sibling, 1 reply; 6+ messages in thread
From: Rob Sargent @ 2019-01-04 16:02 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On 1/4/19 4:48 AM, Achilleas Mantzios wrote:
> On 4/1/19 1:41 μ.μ., Thomas Güttler wrote:
>> Some months ago I wrote a little application with Python+Django which
>> stores
>> blob data in bytearrays.
>>
>> It works.
>>
>> In the future there will be a lot more traffic, and I am unsure
>> if this is really a good solution. I know this is more FUD than
>> concrete PG issue.
>>
>> What do you think?
>
> Performance (at least for JDBC) is known to be better with blobs.
Do you have any details on which part is slower with bytea? Original
insert, read back to client, general (p)sql access. I'm moving towards
bytea but still have time to change my mind if I cannot afford the
performance hit.
> However, with bytea life is just easier for many reasons (backups,
> logical replication, other types of replication, sys management, etc).
Yes, and in my case I even get a cheap compression from the original file.
>
>>
>> Which alternatives could be useful?
>>
>> Regards,
>> Thomas
>>
>>
>>
>>
>
>
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Use bytearray for blobs or not?
2019-01-04 11:41 Use bytearray for blobs or not? Thomas Güttler <guettliml@thomas-guettler.de>
2019-01-04 11:48 ` Re: Use bytearray for blobs or not? Achilleas Mantzios <achill@matrix.gatewaynet.com>
2019-01-04 16:02 ` Re: Use bytearray for blobs or not? Rob Sargent <robjsargent@gmail.com>
@ 2019-01-07 07:35 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
0 siblings, 0 replies; 6+ messages in thread
From: Achilleas Mantzios @ 2019-01-07 07:35 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On 4/1/19 6:02 μ.μ., Rob Sargent wrote:
>
> On 1/4/19 4:48 AM, Achilleas Mantzios wrote:
>> On 4/1/19 1:41 μ.μ., Thomas Güttler wrote:
>>> Some months ago I wrote a little application with Python+Django which stores
>>> blob data in bytearrays.
>>>
>>> It works.
>>>
>>> In the future there will be a lot more traffic, and I am unsure
>>> if this is really a good solution. I know this is more FUD than
>>> concrete PG issue.
>>>
>>> What do you think?
>>
>> Performance (at least for JDBC) is known to be better with blobs.
>
> Do you have any details on which part is slower with bytea? Original insert, read back to client, general (p)sql access. I'm moving towards bytea but still have time to change my mind if I cannot
> afford the performance hit.
No since I never used them (blobs) in production. Basically the java driver does not support streaming. So for very large data (e.g. videos, movies, etc) people use blobs.
>
>> However, with bytea life is just easier for many reasons (backups, logical replication, other types of replication, sys management, etc).
> Yes, and in my case I even get a cheap compression from the original file.
>>
>>>
>>> Which alternatives could be useful?
>>>
>>> Regards,
>>> Thomas
>>>
>>>
>>>
>>>
>>
>>
>
--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Use bytearray for blobs or not?
2019-01-04 11:41 Use bytearray for blobs or not? Thomas Güttler <guettliml@thomas-guettler.de>
@ 2019-01-07 10:12 ` Thomas Güttler <guettliml@thomas-guettler.de>
1 sibling, 0 replies; 6+ messages in thread
From: Thomas Güttler @ 2019-01-07 10:12 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
I came across this article, and now I think blob in s3 in s3-object-id in PostgreSQL
are the best solution for me:
https://wiki.postgresql.org/wiki/BinaryFilesInDB
I hope the wiki page is still valid.
Regards,
Thomas
Am 04.01.19 um 12:41 schrieb Thomas Güttler:
> Some months ago I wrote a little application with Python+Django which stores
> blob data in bytearrays.
>
> It works.
>
> In the future there will be a lot more traffic, and I am unsure
> if this is really a good solution. I know this is more FUD than
> concrete PG issue.
>
> What do you think?
>
> Which alternatives could be useful?
>
> Regards,
> Thomas
>
>
>
>
--
Thomas Guettler http://www.thomas-guettler.de/
I am looking for feedback: https://github.com/guettli/programming-guidelines
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2019-01-07 10:12 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-01-04 11:41 Use bytearray for blobs or not? Thomas Güttler <guettliml@thomas-guettler.de>
2019-01-04 11:48 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
2019-01-04 13:15 ` Thomas Güttler <guettliml@thomas-guettler.de>
2019-01-04 16:02 ` Rob Sargent <robjsargent@gmail.com>
2019-01-07 07:35 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
2019-01-07 10:12 ` Thomas Güttler <guettliml@thomas-guettler.de>
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