Re: index row requires 10040 bytes, maximum size is 8191
От | Scott Marlowe |
---|---|
Тема | Re: index row requires 10040 bytes, maximum size is 8191 |
Дата | |
Msg-id | CAOR=d=1sf_wQP80NsvVYJS4dOg=2e11A8k=Va8b1LBuPfOfQ3w@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: index row requires 10040 bytes, maximum size is 8191 (Michael Shepanski <michael.shepanski@netpage.com>) |
Список | pgsql-general |
On Sun, Sep 18, 2011 at 11:07 PM, Michael Shepanski <michael.shepanski@netpage.com> wrote: > Craig Ringer writes: >> >>Thoughts, folks? Does this matter in practice, since anything you'd >> want to index will in practice be small enough or a candidate for >> full-text indexing? > > Here's my case: the field is meant to hold a person's name, so it's > usually well under the 8191-byte limit. I want it indexed so that I can > sort on it quickly. I also want it to be robust against abuse, so if > someone does enter the text of _War and Peace_ as their name, > I want to handle that gracefully. > > I can achieve that by my own programming, outside of postgresql, > and that's fine if I'm the only one who has gotten into this fix. Otoh > if it's a common problem then there's a reason why removing the > limitation might matter in practice. What if someone enters the text of war and piece * 1,000,000,000 or so? or * 10E26 or something. There has to be a limit where you tell the user, usually sooner rather than later, that some size is just too big. And in the case of a name field, 1,000 is probably a realistically high enough max that it should never be a problem, unless the name is one of the candidates for the very silly party. Allowing users to input some great big huge chunk of text is opening yourself up to a denial of service scenario. someone writes a bot that submits names of 100M over and over, and watch the system just fall over from network, io, or memory overload.
В списке pgsql-general по дате отправления: