Re: [HACKERS] [DESIGN] ParallelAppend

2015-10-26 Thread Kouhei Kaigai
> -Original Message- > From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Robert Haas > Sent: Monday, October 26, 2015 8:53 PM > To: Kaigai Kouhei(海外 浩平) > Cc: pgsql-hackers@postgresql.org; Amit Kapila; Kyotaro HORIGUCHI > Subject: Re: [HACKE

Re: [HACKERS] Dangling Client Backend Process

2015-10-26 Thread Rajeev rastogi
On 23 October 2015 01:58, Robert Haas [mailto:robertmh...@gmail.com] Wrote: >Well, I'm not buying this extra PostmasterIsAlive() call on every pass >through the main loop. That seems more expensive than we can really >justify. Checking this when we're already calling WaitLatchOrSocket is >basical

Re: [HACKERS] questions about PG update performance

2015-10-26 Thread Amit Kapila
On Mon, Oct 26, 2015 at 4:31 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > > On Mon, Oct 26, 2015 at 4:09 PM, Amit Kapila > wrote: > >> On Mon, Oct 26, 2015 at 12:07 PM, Ashutosh Bapat < >> ashutosh.ba...@enterprisedb.com> wrote: >> >>> >>> >>> On Mon, Oct 26, 2015 at 10:19 AM, Am

Re: [HACKERS] pg_basebackup and replication slots

2015-10-26 Thread Joshua D. Drake
On 10/26/2015 08:14 PM, Michael Paquier wrote: On Tue, Oct 27, 2015 at 7:18 AM, José Luis Tallón wrote: Given the rest of the thread any possibility whatsoever that it'd be backpatched into 9.5 before release? Guess it'd be a very welcome addition This will be available in 9.6. 9.

Re: [HACKERS] pg_basebackup and replication slots

2015-10-26 Thread Michael Paquier
On Tue, Oct 27, 2015 at 7:18 AM, José Luis Tallón wrote: > Given the rest of the thread any possibility whatsoever that it'd be > backpatched into 9.5 before release? > Guess it'd be a very welcome addition This will be available in 9.6. 9.5 is aimed at being stabilized now, so no new

Re: [HACKERS] Multi-tenancy with RLS

2015-10-26 Thread Haribabu Kommi
On Wed, Oct 21, 2015 at 2:42 PM, Haribabu Kommi wrote: > Pending items: > 1. Need to add some more tests to verify all database catalog tables. > 2. Documentation changes for database catalog tenancy. Here I attached the updated database-catalog-security with more tests including system views, in

Re: Re : Re: [HACKERS] UTF-32 support in PostgreSQL ?

2015-10-26 Thread Peter Geoghegan
On Mon, Oct 26, 2015 at 6:20 PM, Craig Ringer wrote: > UTF-16 is like UCS-2, but adds UTF-8-like escape sequences to handle > the high 16 bits of the 32-bit Unicode space. It combines the worst > features of UTF-8 and UCS-2. UTF-16 is the character set used by > Windows APIs and the ICU library.

Re: Re : Re: [HACKERS] UTF-32 support in PostgreSQL ?

2015-10-26 Thread Craig Ringer
On 27 October 2015 at 05:39, wrote: > I mean for ALL, data stored, source code, and translation files. > For source code, I think then GCC must support UTF-32 before. Why? UTF-32 is an incredibly inefficient way to store text that's predominantly or entirely within the 7-bit ASCII space. UTF-8

Re: [HACKERS] Proposal: Trigonometric functions in degrees

2015-10-26 Thread Tom Lane
Dean Rasheed writes: > Personally I'd rather have sind(30) be exactly 0.5, even if > sind(29.999...) or sind(30.000...1) ended up the wrong side of it. TBH, sir, if you think that you are too dangerous to be allowed anywhere near any numerical analysis code. Preserving mathematical properties li

Re: [HACKERS] Proposal: Trigonometric functions in degrees

2015-10-26 Thread Jim Nasby
On 10/26/15 1:48 PM, Simon Riggs wrote: Deviation from SI units is no laughing matter. How would we even know how to capitalise "Fortnight"? It's all fun and games until someone pokes Mars' eye out with a spacecraft. https://en.wikipedia.org/wiki/Mars_Climate_Orbiter (Ok, I guess we just spra

Re: [HACKERS] questions about PG update performance

2015-10-26 Thread Gavin Flower
On 27/10/15 11:37, Jim Nasby wrote: On 10/25/15 9:36 PM, Kisung Kim wrote: I want to explain for our clients that PG's update performance is comparable to Oracle's. There's really only 2 ways you can answer that. You can either handwave the question away ("Yes, update performance is comparabl

Re: [HACKERS] Proposal: Trigonometric functions in degrees

2015-10-26 Thread Bear Giles
> > ​ > Stupid question - is sin(3m) a call-through to the math coprocessor?​ It probably only matters when doing a series of calculations (where the extra guard bits can matter) and not when doing a simple one-time lookup but it might be something to consider in regards to setting a precedent. B

Re: [HACKERS] questions about PG update performance

2015-10-26 Thread Jim Nasby
On 10/25/15 9:36 PM, Kisung Kim wrote: I want to explain for our clients that PG's update performance is comparable to Oracle's. There's really only 2 ways you can answer that. You can either handwave the question away ("Yes, update performance is comparable."), or you have to do actual bench

Re: [HACKERS] Proposal: Trigonometric functions in degrees

2015-10-26 Thread Dean Rasheed
On 26 October 2015 at 20:19, Tom Lane wrote: > Dean Rasheed writes: >> I'm thinking something along the lines of: > >> 1. Reduce the range of the input (say to 0..90 degrees). >> 2. Handle special cases (0, 30 and 90 for sind()). >> 3. Otherwise convert to radians for the general case. > > I'd be

Re : Re: [HACKERS] UTF-32 support in PostgreSQL ?

2015-10-26 Thread fortin . christian
 Do you mean data stored as UTF-32, or source code in UTF-32, or translation files as UTF-32? I mean for ALL, data stored, source code, and translation files. For source code, I think then GCC must support UTF-32 before. I sent an e-mail to Oracle to see what they tink about this huge idea.

Re: [HACKERS] pg_basebackup and replication slots

2015-10-26 Thread José Luis Tallón
On 10/26/2015 12:58 PM, Joshua D. Drake wrote: Hello, The fact that pg_basebackup doesn't use replicaiton slots, is that a technical limitation or just a, "we need a patch"? Given the rest of the thread any possibility whatsoever that it'd be backpatched into 9.5 before release? G

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2015-10-26 Thread Christopher Browne
On 26 October 2015 at 16:25, Peter Eisentraut wrote: > On 10/14/15 6:41 AM, Victor Wagner wrote: > > 1. It is allowed to specify several hosts in the connect string, either > > in URL-style (separated by comma) or in param=value form (several host > > parameters). > > I'm not fond of having URLs

Re: [HACKERS] UTF-32 support in PostgreSQL ?

2015-10-26 Thread Andrew Dunstan
On 10/23/2015 11:29 PM, fortin.christ...@videotron.ca wrote: Is PostgreSQL support UNICODE UTF-32 characters ? If not, I think it's a must to be internationnal. To help you in this task, you could use this UTF-32 editor: https://wxmedit.github.io/downloads.html thanks. Do you mean data

Re: [HACKERS] Patch (2): Implement failover on libpq connect level.

2015-10-26 Thread Peter Eisentraut
On 10/24/15 7:55 AM, Robert Haas wrote: > On Fri, Oct 23, 2015 at 4:02 PM, Korry Douglas > wrote: >> When you call pg_is_in_recovery(), you should schema-qualify the function >> name, just in case some other version of that function exists in the >> search_path. > > I wonder whether it's really a

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2015-10-26 Thread Peter Eisentraut
On 10/14/15 6:41 AM, Victor Wagner wrote: > 1. It is allowed to specify several hosts in the connect string, either > in URL-style (separated by comma) or in param=value form (several host > parameters). I'm not fond of having URLs that are not valid URLs according to the applicable standards. Be

Re: [HACKERS] Proposal: Trigonometric functions in degrees

2015-10-26 Thread Tom Lane
Dean Rasheed writes: > On 26 October 2015 at 19:45, Peter Eisentraut wrote: >> But how you are going to implement that? I don't see a sind() in the C >> library. > I'm thinking something along the lines of: > 1. Reduce the range of the input (say to 0..90 degrees). > 2. Handle special cases (0

Re: [HACKERS] Proposal: Trigonometric functions in degrees

2015-10-26 Thread Dean Rasheed
On 26 October 2015 at 19:45, Peter Eisentraut wrote: > On 10/24/15 5:24 AM, Dean Rasheed wrote: >> Additionally, functions that worked natively in degrees would be able >> to return exact answers in special cases like cosd(90) = 0, whereas >> cos(radians(90)) is not exactly 0 because pi/2 cannot b

Re: [HACKERS] Proposal: Trigonometric functions in degrees

2015-10-26 Thread Peter Eisentraut
On 10/24/15 5:24 AM, Dean Rasheed wrote: > Additionally, functions that worked natively in degrees would be able > to return exact answers in special cases like cosd(90) = 0, whereas > cos(radians(90)) is not exactly 0 because pi/2 cannot be represented > exactly as a floating point number. But ho

Re: [HACKERS] Proposal: Trigonometric functions in degrees

2015-10-26 Thread Dean Rasheed
On 26 October 2015 at 18:58, Tom Lane wrote: > Dean Rasheed writes: >> On 26 October 2015 at 14:18, Tom Lane wrote: >>> ... but having said that, your argument here is faulty, because 0.9 >>> in itself is not exactly representable in binary. You'd be relying >>> on roundoff happening in the rig

Re: [HACKERS] Proposal: Trigonometric functions in degrees

2015-10-26 Thread Tom Lane
Dean Rasheed writes: > On 26 October 2015 at 14:18, Tom Lane wrote: >> ... but having said that, your argument here is faulty, because 0.9 >> in itself is not exactly representable in binary. You'd be relying >> on roundoff happening in the right direction to get exact answers >> from such calcu

Re: [HACKERS] Proposal: Trigonometric functions in degrees

2015-10-26 Thread Simon Riggs
On 26 October 2015 at 13:58, Robert Haas wrote: > > Also -1 to furlongs, fortnights, pecks and hundredweight, amongst others. > > Aw, you're no fun. select '1 fortnight'::interval => '14 days' would be > cool. > Deviation from SI units is no laughing matter. How would we even know how to capit

Re: [HACKERS] Proposal: Trigonometric functions in degrees

2015-10-26 Thread Dean Rasheed
On 26 October 2015 at 14:18, Tom Lane wrote: >> Having degree-based functions would make it trivial to implement >> user-defined gradian-based functions, just by multiplying or dividing >> by 0.9, and they would return exact results in the smaller number of >> cases where gradian results are exact

Re: [HACKERS] UTF-32 support in PostgreSQL ?

2015-10-26 Thread Tom Lane
fortin.christ...@videotron.ca writes: > Is PostgreSQL support UNICODE UTF-32 characters ? There's no particular intention of supporting the UTF32 representation inside the database. We do support UTF8 representation of the entire Unicode character set. You can transcode to and from UTF32 easily

Re: [HACKERS] UTF-32 support in PostgreSQL ?

2015-10-26 Thread Andres Freund
On 2015-10-23 23:29:53 -0400, fortin.christ...@videotron.ca wrote: > Is PostgreSQL support UNICODE UTF-32 characters ? No. > If not, I think it's a must to be internationnal. Why? I think Unicode support is a must, but I don't see why utf-32 support is. Postgres supports UTF-8, and I haven't hea

[HACKERS] WIP: Fix parallel workers connection bug in pg_dump (Bug #13727)

2015-10-26 Thread Zeus Kronion
Parallel workers were failing to connect to the database when running pg_dump with a connection string. The first of the following two commands runs without errors, while the second one fails: pg_dump "postgres://my-user:my-passw...@my.hostname.com:5432/my-db" -Fd -f my-dump pg_dump "postgres://my-

[HACKERS] UTF-32 support in PostgreSQL ?

2015-10-26 Thread fortin . christian
Is PostgreSQL support UNICODE UTF-32 characters ? If not, I think it's a must to be internationnal. To help you in this task, you could use this UTF-32 editor: https://wxmedit.github.io/downloads.html thanks.

Re: [HACKERS] Proposal: Trigonometric functions in degrees

2015-10-26 Thread Robert Haas
On Mon, Oct 26, 2015 at 1:29 PM, Simon Riggs wrote: > On 26 October 2015 at 10:18, Tom Lane wrote: >> Dean Rasheed writes: >> > On 25 October 2015 at 09:16, Emre Hasegeli wrote: >> >> I would prefer gradian over degree. >> >> > I think gradians are generally less commonly used than degrees and

Re: [HACKERS] Proposal: Trigonometric functions in degrees

2015-10-26 Thread Simon Riggs
On 26 October 2015 at 10:18, Tom Lane wrote: > Dean Rasheed writes: > > On 25 October 2015 at 09:16, Emre Hasegeli wrote: > >> I would prefer gradian over degree. > > > I think gradians are generally less commonly used than degrees and > > radians, so I'm less inclined to include them. > > I ag

Re: [HACKERS] Patch (2): Implement failover on libpq connect level.

2015-10-26 Thread Thom Brown
On 24 October 2015 at 07:32, Victor Wagner wrote: > В Fri, 23 Oct 2015 22:14:56 +0100 > Thom Brown пишет: > > c> > >> > pg_basebackup -v -x -D standby1 \ >> > -d "host=localhost port=5532 user=rep_user readonly=1" >> >> Yes, this works: >> >> $ pg_basebackup -v -x -D standby1 -d "host=localhost

Re: [HACKERS] Proposal: Trigonometric functions in degrees

2015-10-26 Thread Tom Lane
Dean Rasheed writes: > On 25 October 2015 at 09:16, Emre Hasegeli wrote: >> I would prefer gradian over degree. > I think gradians are generally less commonly used than degrees and > radians, so I'm less inclined to include them. I agree. gradians are not often used at all, AFAICT. > Having d

Re: [HACKERS] Freezing without cleanup lock

2015-10-26 Thread Masahiko Sawada
On Mon, Oct 26, 2015 at 4:39 AM, Jim Nasby wrote: > On 10/22/15 6:39 PM, Alvaro Herrera wrote: >> >> Jim Nasby wrote: >> >>> That would be the minimal-impact version, yes. But I suspect if we went >>> through the trouble to do that, it would be just as easy to attempt the >>> freeze regardless of

Re: [HACKERS] Patch (3): Implement failover on libpq connect level.

2015-10-26 Thread Robert Haas
On Mon, Oct 26, 2015 at 3:58 AM, Victor Wagner wrote: > On 2015.10.14 at 13:41:51 +0300, Victor Wagner wrote: >> Attached patch which implements client library failover and >> loadbalancing as was described in the proposal >> <20150818041850.ga5...@wagner.pp.ru>. > > New version of patch > > 1. Ha

Re: [HACKERS] Avoid full page images in streaming replication?

2015-10-26 Thread Bernd Helmle
--On 23. Oktober 2015 00:03:30 +0200 Andres Freund wrote: > > Note that FPIs are often pretty good for replay performance, avoiding > lots of synchronous random reads. That's a very import argument, i think. The difference can be significant, even if you have a decent storage, rendering a rep

Re: [HACKERS] Avoid full page images in streaming replication?

2015-10-26 Thread Bernd Helmle
--On 22. Oktober 2015 22:23:58 -0300 Alvaro Herrera wrote: >> You can? The xlog format between 9.4 and 9.5 changed, so I can't see how >> that'd work? > > Oh, crap. Must have been some other cross-version trial run I did, > then. I would hope it's at least not terribly difficult to back-patc

Re: [HACKERS] Proposal: Trigonometric functions in degrees

2015-10-26 Thread Dean Rasheed
On 25 October 2015 at 09:16, Emre Hasegeli wrote: >> Currently PostgreSQL only has trigonometric functions that work in >> radians. I think it would be quite useful to have an equivalent set of >> functions that worked in degrees. In other environments these are >> commonly spelled sind(), cosd(),

Re: [HACKERS] pg_basebackup and replication slots

2015-10-26 Thread Shulgin, Oleksandr
On Mon, Oct 26, 2015 at 12:58 PM, Joshua D. Drake wrote: > Hello, > > The fact that pg_basebackup doesn't use replicaiton slots, is that a > technical limitation or just a, "we need a patch"? > I believe it does, but only in master so far, not even in 9.5: http://www.postgresql.org/docs/devel/st

Re: [HACKERS] pg_basebackup and replication slots

2015-10-26 Thread Euler Taveira
On 26-10-2015 08:58, Joshua D. Drake wrote: Hello, The fact that pg_basebackup doesn't use replicaiton slots, is that a technical limitation or just a, "we need a patch"? It is not in 9.5 but it is already there. commit 0dc848b0314d63188919f1ce943730eac684dccd Author: Peter Eisentraut Date:

Re: [HACKERS] questions about PG update performance

2015-10-26 Thread José Luis Tallón
On 10/26/2015 05:49 AM, Amit Kapila wrote: On Mon, Oct 26, 2015 at 9:03 AM, Любен Каравелов > wrote: > > > - Цитат от Kisung Kim (ks...@bitnine.co.kr ), на 26.10.2015 в 04:36 - > > > However, what I want to know is about the update p

[HACKERS] pg_basebackup and replication slots

2015-10-26 Thread Joshua D. Drake
Hello, The fact that pg_basebackup doesn't use replicaiton slots, is that a technical limitation or just a, "we need a patch"? JD -- Command Prompt, Inc. - http://www.commandprompt.com/ 503-667-4564 PostgreSQL Centered full stack support, consulting and development. Announcing "I'm offended"

Re: [HACKERS] [DESIGN] ParallelAppend

2015-10-26 Thread Robert Haas
On Sun, Oct 25, 2015 at 9:23 PM, Kouhei Kaigai wrote: > I entirely agree with your suggestion. > > We may be able to use an analogy between PartialSeqScan and the > parallel- aware Append node. > PartialSeqScan fetches blocks pointed by the index on shared memory > segment, thus multiple workers e

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2015-10-26 Thread Artur Zakirov
20.10.2015 17:00, Artur Zakirov пишет: These flag types are used in affix files of such dictionaries as ar, br_fr, ca, ca_valencia, da_dk, en_ca, en_gb, en_us, fr, gl_es, is, ne_np, nl_nl, si_lk (from http://cgit.freedesktop.org/libreoffice/dictionaries/tree/). Now almost all dictionaries are l

Re: [HACKERS] questions about PG update performance

2015-10-26 Thread Ashutosh Bapat
On Mon, Oct 26, 2015 at 4:09 PM, Amit Kapila wrote: > On Mon, Oct 26, 2015 at 12:07 PM, Ashutosh Bapat < > ashutosh.ba...@enterprisedb.com> wrote: > >> >> >> On Mon, Oct 26, 2015 at 10:19 AM, Amit Kapila >> wrote: >>> >>> >>> I think Oracle just copies the changed part of old row to rollback >>>

Re: [HACKERS] questions about PG update performance

2015-10-26 Thread Amit Kapila
On Mon, Oct 26, 2015 at 12:07 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > > > On Mon, Oct 26, 2015 at 10:19 AM, Amit Kapila > wrote: >> >> >> I think Oracle just copies the changed part of old row to rollback >> segment. >> Also in Redo logs, it just writes the changed column v

Re: [HACKERS] About BoringSSL, an OpenSSL fork

2015-10-26 Thread Geoff Winkless
On 26 October 2015 at 00:59, Michael Paquier wrote: > https://boringssl.googlesource.com/boringssl/+/HEAD/PORTING.md > Looking at the porting section many routines have changed compared to > OpenSSL. I can't imagine this fork to become a complete replacement of > OpenSSL, but it may be worth cons

Re: [HACKERS] [PATCH v3] GSSAPI encryption support

2015-10-26 Thread Michael Paquier
On Thu, Oct 22, 2015 at 11:36 PM, Robbie Harwood wrote: > To be clear, what I need to know is: > - What changes do you want to see in the wire protocol? (And how will > fallback be supported if that's affected?) Hm. Something essential will be to send the length of the wrapped gss_buffer_t obje

[HACKERS] Patch (3): Implement failover on libpq connect level.

2015-10-26 Thread Victor Wagner
On 2015.10.14 at 13:41:51 +0300, Victor Wagner wrote: > Attached patch which implements client library failover and > loadbalancing as was described in the proposal > <20150818041850.ga5...@wagner.pp.ru>. New version of patch 1. Handles replication connections correctly (i.e doesn't attempt to c