Re: [HACKERS] collations in shared catalogs?

2015-05-18 Thread Andres Freund
On 2015-05-18 19:59:29 -0400, Tom Lane wrote: Andres Freund and...@anarazel.de writes: On 2015-05-18 19:23:59 -0400, Tom Lane wrote: Hm, just forcing a collation and restricting the input to ascii should work, right? I think that's fragile as can be. Is there a *really really* good

Re: [HACKERS] collations in shared catalogs?

2015-05-18 Thread Tom Lane
Andres Freund and...@anarazel.de writes: On 2015-05-18 23:22:33 -0400, Tom Lane wrote: I'm inclined to think I should revert b82a7be603f1811a and instead make the seclabel provider columns use text_pattern_ops. That would fix their collation problem with less of a backwards compatibility

Re: [HACKERS] collations in shared catalogs?

2015-05-18 Thread Tom Lane
Andres Freund and...@anarazel.de writes: On 2015-05-18 19:59:29 -0400, Tom Lane wrote: I think that's fragile as can be. Hm. I think actually just forcing a collation would bring this on-par with name, right? We don't have any guarantees about the contents of e.g. pg_database.datname being

Re: [HACKERS] collations in shared catalogs?

2015-05-18 Thread Andres Freund
On 2015-05-18 23:22:33 -0400, Tom Lane wrote: Andres Freund and...@anarazel.de writes: On 2015-05-18 19:59:29 -0400, Tom Lane wrote: I think that's fragile as can be. Hm. I think actually just forcing a collation would bring this on-par with name, right? We don't have any guarantees

Re: [HACKERS] collations in shared catalogs?

2015-05-18 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2015-02-25 12:08:32 -0500, Tom Lane wrote: Andrew Gierth and...@tao11.riddles.org.uk writes: So while helping someone with an unrelated issue, I did a quick query to look for collation-dependent indexes, and was rather shocked to find that not

Re: [HACKERS] collations in shared catalogs?

2015-05-18 Thread Stephen Frost
* Andres Freund (and...@anarazel.de) wrote: On 2015-05-18 19:59:29 -0400, Tom Lane wrote: Andres Freund and...@anarazel.de writes: Hm, just forcing a collation and restricting the input to ascii should work, right? I think that's fragile as can be. Hm. I think actually just

Re: [HACKERS] collations in shared catalogs?

2015-05-18 Thread Andres Freund
On 2015-05-18 19:23:59 -0400, Tom Lane wrote: OK, now I'm on the warpath, because I went to fix this and discovered that since that discussion, somebody named Freund committed yet another shared catalog with a collation-dependent index. This time, at least, we can fix it *before* it gets into

Re: [HACKERS] collations in shared catalogs?

2015-05-18 Thread Tom Lane
Andres Freund and...@anarazel.de writes: On 2015-05-18 19:23:59 -0400, Tom Lane wrote: Is it okay to change pg_replication_origin.roname to type name, and if not what do you want to do instead? It was turned into text after it initially was name, because of length concerns. Hm, just

Re: [HACKERS] collations in shared catalogs?

2015-05-18 Thread Andres Freund
On 2015-05-18 20:19:29 -0400, Tom Lane wrote: Many people rely on UUIDs being impervious to chance collisions, so it's not clear to me why uniqueness within 63 characters is unachievable. Even more, if you can't do it in 63, what makes you think that 100 is better? Well UUIDs are also hard to

Re: [HACKERS] collations in shared catalogs?

2015-05-18 Thread Andres Freund
On 2015-05-18 21:20:29 -0400, Stephen Frost wrote: * Andres Freund (and...@anarazel.de) wrote: I'm right now toying with the idea of defining 'varname' as a text equivalent that always has a C type collation, and no length limitation. That'd generally imo be a good thing to have. A bunch of

Re: [HACKERS] collations in shared catalogs?

2015-05-18 Thread Stephen Frost
* Andres Freund (and...@anarazel.de) wrote: On 2015-05-18 21:20:29 -0400, Stephen Frost wrote: * Andres Freund (and...@anarazel.de) wrote: I'm right now toying with the idea of defining 'varname' as a text equivalent that always has a C type collation, and no length limitation. That'd

Re: [HACKERS] collations in shared catalogs?

2015-05-18 Thread Tom Lane
Andres Freund and...@anarazel.de writes: On 2015-05-18 19:59:29 -0400, Tom Lane wrote: I think that's fragile as can be. Is there a *really really* good argument why these things shouldn't be subject to identifier length restrictions? It's maybe not absolutely strictly necessary. In fact in

Re: [HACKERS] collations in shared catalogs?

2015-05-18 Thread Andres Freund
On 2015-05-18 19:59:29 -0400, Tom Lane wrote: Andres Freund and...@anarazel.de writes: Hm, just forcing a collation and restricting the input to ascii should work, right? I think that's fragile as can be. Hm. I think actually just forcing a collation would bring this on-par with name,

Re: [HACKERS] collations in shared catalogs?

2015-05-18 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 It's maybe not absolutely strictly necessary. In fact in earlier versions of the patch it was name. But replication solutions like bdr, slony, whatever will have to store a bunch of values identifying a node in there. And that's much easier

Re: [HACKERS] collations in shared catalogs?

2015-04-30 Thread Bruce Momjian
On Thu, Apr 30, 2015 at 08:16:09AM -0700, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: On 2015-02-25 12:08:32 -0500, Tom Lane wrote: The most obvious fix is to change provider to a NAME column. Where are we on this? Not done yet, but we should make a point of making that fix

Re: [HACKERS] collations in shared catalogs?

2015-04-30 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: On 2015-02-25 12:08:32 -0500, Tom Lane wrote: The most obvious fix is to change provider to a NAME column. Where are we on this? Not done yet, but we should make a point of making that fix before 9.5. Please add it to the open items page for 9.5. I am

Re: [HACKERS] collations in shared catalogs?

2015-04-30 Thread Bruce Momjian
On Wed, Feb 25, 2015 at 10:19:45PM +0100, Andres Freund wrote: On 2015-02-25 15:59:55 -0500, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2015-02-25 12:08:32 -0500, Tom Lane wrote: The most obvious fix is to change provider to a NAME column. Yea. I'm not sure why

Re: [HACKERS] collations in shared catalogs?

2015-03-04 Thread Robert Haas
On Wed, Feb 25, 2015 at 7:54 PM, David Steele da...@pgmasters.net wrote: +1 on 128/256 character names. /me runs and hides. /stands brazenly in the open and volunteers to try it if I don't get clobbered within seconds. I think the question is whether making lots of rows in system catalogs

Re: [HACKERS] collations in shared catalogs?

2015-03-04 Thread David Steele
Hi Robert, On 3/4/15 10:14 AM, Robert Haas wrote: On Wed, Feb 25, 2015 at 7:54 PM, David Steele da...@pgmasters.net wrote: +1 on 128/256 character names. /me runs and hides. /stands brazenly in the open and volunteers to try it if I don't get clobbered within seconds. I think the

Re: [HACKERS] collations in shared catalogs?

2015-02-25 Thread Andrew Gierth
Tom == Tom Lane t...@sss.pgh.pa.us writes: So while helping someone with an unrelated issue, I did a quick query to look for collation-dependent indexes, and was rather shocked to find that not only are there two such in the system catalogs, both set to default collation, but that one of

Re: [HACKERS] collations in shared catalogs?

2015-02-25 Thread Tom Lane
Andrew Gierth and...@tao11.riddles.org.uk writes: So while helping someone with an unrelated issue, I did a quick query to look for collation-dependent indexes, and was rather shocked to find that not only are there two such in the system catalogs, both set to default collation, but that one

Re: [HACKERS] collations in shared catalogs?

2015-02-25 Thread Alvaro Herrera
Tom Lane wrote: Andrew Gierth and...@tao11.riddles.org.uk writes: So while helping someone with an unrelated issue, I did a quick query to look for collation-dependent indexes, and was rather shocked to find that not only are there two such in the system catalogs, both set to default

Re: [HACKERS] collations in shared catalogs?

2015-02-25 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Tom Lane wrote: Andrew Gierth and...@tao11.riddles.org.uk writes: How did that happen? And how could it possibly work? It probably doesn't, and the reason nobody has noticed is that the security label stuff has fewer users than I have fingers

Re: [HACKERS] collations in shared catalogs?

2015-02-25 Thread Alvaro Herrera
Tom Lane wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Tom Lane wrote: Andrew Gierth and...@tao11.riddles.org.uk writes: How did that happen? And how could it possibly work? It probably doesn't, and the reason nobody has noticed is that the security label stuff has fewer

Re: [HACKERS] collations in shared catalogs?

2015-02-25 Thread Andres Freund
On 2015-02-25 12:08:32 -0500, Tom Lane wrote: Andrew Gierth and...@tao11.riddles.org.uk writes: So while helping someone with an unrelated issue, I did a quick query to look for collation-dependent indexes, and was rather shocked to find that not only are there two such in the system

Re: [HACKERS] collations in shared catalogs?

2015-02-25 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2015-02-25 12:08:32 -0500, Tom Lane wrote: The most obvious fix is to change provider to a NAME column. Yea. I'm not sure why that wasn't done initially. I can't really see the length be an issue. How about we add an error check enforcing ascii,

Re: [HACKERS] collations in shared catalogs?

2015-02-25 Thread Andres Freund
On 2015-02-25 15:59:55 -0500, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2015-02-25 12:08:32 -0500, Tom Lane wrote: The most obvious fix is to change provider to a NAME column. Yea. I'm not sure why that wasn't done initially. I can't really see the length be an

Re: [HACKERS] collations in shared catalogs?

2015-02-25 Thread Stephen Frost
* Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: Tom Lane wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Tom Lane wrote: Andrew Gierth and...@tao11.riddles.org.uk writes: How did that happen? And how could it possibly work? It probably doesn't, and the reason nobody has

Re: [HACKERS] collations in shared catalogs?

2015-02-25 Thread David Steele
On 2/25/15 5:47 PM, Stephen Frost wrote: * Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: Tom Lane wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Tom Lane wrote: Andrew Gierth and...@tao11.riddles.org.uk writes: How did that happen? And how could it possibly work? It probably