Re: [HACKERS] [bug-fix] Cannot select big bytea values (~600MB)

2018-02-27 Thread Robert Haas
On Tue, Feb 27, 2018 at 2:17 PM, Tom Lane wrote: > Robert Haas writes: >> +1. We don't have to support everything, but things that don't work >> should fail on insertion, not retrieval. Otherwise what we have is >> less a database and more a data black hole. > > That sounds nice as a principle

Re: [HACKERS] [bug-fix] Cannot select big bytea values (~600MB)

2018-02-27 Thread Tom Lane
Robert Haas writes: > +1. We don't have to support everything, but things that don't work > should fail on insertion, not retrieval. Otherwise what we have is > less a database and more a data black hole. That sounds nice as a principle but I'm not sure how workable it really is. Do you want t

Re: [HACKERS] [bug-fix] Cannot select big bytea values (~600MB)

2018-02-27 Thread Robert Haas
On Fri, Feb 16, 2018 at 2:00 PM, Anna Akenteva wrote: > It's not necessarily my goal. My goal is to avoid the confusing situation > where you insert something into a table and suddenly everything seems to > break for no reason and you don't get any information on what to do next. As > I see it, it

Re: [HACKERS] [bug-fix] Cannot select big bytea values (~600MB)

2018-02-16 Thread Anna Akenteva
Tom Lane writes 2018-02-16 17:58: Also, I don't entirely see how this fixes your stated goal of being able to select a bytea value whose textual representation exceeds 1GB. It's not necessarily my goal. My goal is to avoid the confusing situation where you insert something into a table and sudde

Re: [HACKERS] [bug-fix] Cannot select big bytea values (~600MB)

2018-02-16 Thread Alvaro Herrera
Tom Lane wrote: > Anna Akenteva writes: > > [ widen StringInfoData max length to size_t ] > > I find this scary as heck. Have you spent any time looking at the > side effects? There are probably hundreds of places that expect that > stringinfos won't get larger than 1GB. See these commits:

Re: [HACKERS] [bug-fix] Cannot select big bytea values (~600MB)

2018-02-16 Thread Tom Lane
Andres Freund writes: > On 2018-02-16 09:58:29 -0500, Tom Lane wrote: >> Anna Akenteva writes: >>> [ widen StringInfoData max length to size_t ] >> I find this scary as heck. Have you spent any time looking at the >> side effects? There are probably hundreds of places that expect that >> strin

Re: [HACKERS] [bug-fix] Cannot select big bytea values (~600MB)

2018-02-16 Thread Andres Freund
Hi, On 2018-02-16 09:58:29 -0500, Tom Lane wrote: > Anna Akenteva writes: > > [ widen StringInfoData max length to size_t ] > > I find this scary as heck. Have you spent any time looking at the > side effects? There are probably hundreds of places that expect that > stringinfos won't get large

Re: [HACKERS] [bug-fix] Cannot select big bytea values (~600MB)

2018-02-16 Thread Tom Lane
Anna Akenteva writes: > [ widen StringInfoData max length to size_t ] I find this scary as heck. Have you spent any time looking at the side effects? There are probably hundreds of places that expect that stringinfos won't get larger than 1GB. Also, I don't entirely see how this fixes your sta

[HACKERS] [bug-fix] Cannot select big bytea values (~600MB)

2018-02-16 Thread Anna Akenteva
Hello! If I create a big bytea value and try to select it from a table, I get an error, something like: "ERROR: invalid memory alloc request size ...". So basically we can insert data into a table but then we can't even work with it. Sounds like a bug. Attaching a patch that fixes it (appli