Re: [HACKERS] [COMMITTERS] pgsql: Use gender-neutral language in documentation

2015-09-21 Thread Peter Geoghegan
On Mon, Sep 21, 2015 at 9:32 PM, Erik Rijkers wrote: > I think this compulsive 'he'-avoiding is making the text worse. > > > - environment variable); any user can make such a change for his > session. > + environment variable); any user can make such a change for their > session. -1. It

Re: [HACKERS] [COMMITTERS] pgsql: Use gender-neutral language in documentation

2015-09-21 Thread Erik Rijkers
On 2015-09-22 04:59, Peter Eisentraut wrote: Use gender-neutral language in documentation Based on patch by Thomas Munro , although I rephrased most of the initial work. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/741ccd5015f82e31f80cdc5d2ae81263ea92d794

Re: [HACKERS] row_security GUC, BYPASSRLS

2015-09-21 Thread Noah Misch
On Mon, Sep 21, 2015 at 09:30:15AM -0400, Stephen Frost wrote: > * Noah Misch (n...@leadboat.com) wrote: > > Right now, if a BYPASSRLS user creates a SECURITY DEFINER function, any > > caller > > can change that function's behavior by toggling the GUC. Users won't test > > accordingly; better to

Re: [HACKERS] Obsolete use of volatile in walsender.c, walreceiver.c, walreceiverfuncs.c?

2015-09-21 Thread Thomas Munro
On Tue, Sep 22, 2015 at 8:19 AM, Alvaro Herrera wrote: > Thomas Munro wrote: > >> In walsender.c, walreceiver.c, walreceiverfuncs.c there are several >> places where volatile qualifiers are used apparently only to prevent >> reordering around spinlock operations. > > In replication/slot.c there ar

Re: [HACKERS] jsonb_set array append hack?

2015-09-21 Thread Thom Brown
On 21 September 2015 at 22:21, Andrew Dunstan wrote: > > > On 09/21/2015 12:13 PM, Dmitry Dolgov wrote: > >> > I would expect some kind of error. We're trying to address a position >> in an array, and we're instead passing a key. If it completes >> successfully, the chances are it isn't what th

Re: [HACKERS] Streaming Replication clusters and load balancing

2015-09-21 Thread Josh Berkus
On 09/17/2015 07:27 PM, James Sewell wrote: > Hello all, > > I have recently been working with PostgreSQL and HAProxy to provide > seamless load balancing to a group of database servers. This on it's own > isn't a hard thing: I have an implementation finished and am now > thinking about the best w

Re: [HACKERS] jsonb_set array append hack?

2015-09-21 Thread Andrew Dunstan
On 09/21/2015 12:13 PM, Dmitry Dolgov wrote: > I would expect some kind of error. We're trying to address a position in an array, and we're instead passing a key. If it completes successfully, the chances are it isn't what the user intended. Thanks for the explanation. So, basically, it sh

Re: [HACKERS] Streaming Replication clusters and load balancing

2015-09-21 Thread Dmitry Vasilyev
Hi! By default, HAproxy configuration can not be changed without breaking a connection with the client :) -- Dmitry Vasilyev Postgres Professional: http://www.postgrespro.com The Russian Postgres Company On Fri, 2015-09-18 at 12:27 +1000, James Sewell wrote: > Hello all, > > I have recently

Re: [HACKERS] Obsolete use of volatile in walsender.c, walreceiver.c, walreceiverfuncs.c?

2015-09-21 Thread Alvaro Herrera
Thomas Munro wrote: > In walsender.c, walreceiver.c, walreceiverfuncs.c there are several > places where volatile qualifiers are used apparently only to prevent > reordering around spinlock operations. In replication/slot.c there are a number of places (12, I think) that introduce a block specifi

Re: [HACKERS] COPY planning

2015-09-21 Thread Tom Lane
Alvaro Herrera writes: > I noticed that COPY calls planner() (this was introduced in 85188ab88). > I think it should be calling pg_plan_query() instead. +1 --- AFAICS, this is the *only* place that is going directly to planner() without going through pg_plan_query(); other utility functions such

Re: [HACKERS] LW_SHARED_MASK macro

2015-09-21 Thread Andres Freund
On 2015-09-21 22:34:46 +0300, Alexander Korotkov wrote: > Great. BTW, are you going to commit this? Yes, will do so tomorrow. Thanks, Andres -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hac

Re: [HACKERS] LW_SHARED_MASK macro

2015-09-21 Thread Alexander Korotkov
On Thu, Sep 17, 2015 at 5:38 PM, Andres Freund wrote: > On 2015-09-17 14:35:20 +0300, Alexander Korotkov wrote: > > while exploring lwlock.c I found following macro to be strange. > > > > #define LW_SHARED_MASK ((uint32)(1 << 23)) > > > > This is macro is used to extract number of shared locks fr

[HACKERS] COPY planning

2015-09-21 Thread Alvaro Herrera
I noticed that COPY calls planner() (this was introduced in 85188ab88). I think it should be calling pg_plan_query() instead. The latter is a very thin wrapper around the former which simply adds a couple of logging entries, DTrace hooks for start/end, and a debugging cross-check for plan node cop

Re: [HACKERS] COMPARE_POINTER_FIELD been dead 13 years after living 2 weeks

2015-09-21 Thread Tom Lane
Alvaro Herrera writes: > I happened to notice that we have a macro COMPARE_POINTER_FIELD in > nodes/equalfuncs.c that Tom introduced in 2eafcf68d563d (25 Nov 2002) > and then removed its only callers a0bf885f9ea (12 Dec 2002). Hm. I think it was meant to correspond to copyfuncs.c's COPY_POINTER_

Re: [HACKERS] TEXT vs VARCHAR join qual push down diffrence, bug or expected?

2015-09-21 Thread Tom Lane
Jeevan Chalke writes: > It is observed that, when we have one remote (huge) table and one local > (small) table and a join between them, then > 1. If the column type is text, then we push the join qual to the remote > server, so that we will have less rows to fetch, and thus execution time >

[HACKERS] COMPARE_POINTER_FIELD been dead 13 years after living 2 weeks

2015-09-21 Thread Alvaro Herrera
I happened to notice that we have a macro COMPARE_POINTER_FIELD in nodes/equalfuncs.c that Tom introduced in 2eafcf68d563d (25 Nov 2002) and then removed its only callers a0bf885f9ea (12 Dec 2002). Should we just remove it? -- Álvaro Herrera Developer, http://www.PostgreS

Re: [HACKERS] Rework the way multixact truncations work

2015-09-21 Thread Andres Freund
On 2015-09-21 10:30:59 -0700, Josh Berkus wrote: > On 09/21/2015 07:36 AM, Andres Freund wrote: > > On 2015-09-21 10:31:17 -0400, Robert Haas wrote: > >> So, where are we with this patch? > > > > Uh. I'd basically been waiting on further review and then forgot about > > it. > > Does the current p

Re: [HACKERS] Rework the way multixact truncations work

2015-09-21 Thread Josh Berkus
On 09/21/2015 07:36 AM, Andres Freund wrote: > On 2015-09-21 10:31:17 -0400, Robert Haas wrote: >> So, where are we with this patch? > > Uh. I'd basically been waiting on further review and then forgot about > it. Does the current plan to never expire XIDs in 9.6 affect multixact truncation at al

Re: [HACKERS] [patch] Proposal for \rotate in psql

2015-09-21 Thread Marcin Mańk
W dniu piątek, 18 września 2015 Daniel Verite napisał(a): > Pavel Stehule wrote: > > > in the help inside your last patch, you are using "crosstab". Cannto be > > crosstab the name for this feature? > > If it wasn't taken already by contrib/tablefunc, that would be a first > choice. But n

[HACKERS] Streaming Replication clusters and load balancing

2015-09-21 Thread James Sewell
Hello all, I have recently been working with PostgreSQL and HAProxy to provide seamless load balancing to a group of database servers. This on it's own isn't a hard thing: I have an implementation finished and am now thinking about the best way to bring it to a production ready state which could b

[HACKERS] TEXT vs VARCHAR join qual push down diffrence, bug or expected?

2015-09-21 Thread Jeevan Chalke
Hi, It is observed that, when we have one remote (huge) table and one local (small) table and a join between them, then 1. If the column type is text, then we push the join qual to the remote server, so that we will have less rows to fetch, and thus execution time is very less. 2. If the

Re: [HACKERS] Bug in numeric multiplication

2015-09-21 Thread Tom Lane
Dean Rasheed writes: > On 21 September 2015 at 16:09, Tom Lane wrote: >> After trying to rework the comment to explain what maxdig really meant >> after your changes, I came to the conclusion that it'd be better to do >> it as per attached. Does this look sane to you? > Yes that looks better. I

Re: [HACKERS] jsonb_set array append hack?

2015-09-21 Thread Dmitry Dolgov
> I would expect some kind of error. We're trying to address a position in an array, and we're instead passing a key. If it completes successfully, the chances are it isn't what the user intended. Thanks for the explanation. So, basically, it should be like this, am I right? postgres=# SELECT j

Re: [HACKERS] Bug in numeric multiplication

2015-09-21 Thread Dean Rasheed
On 21 September 2015 at 16:09, Tom Lane wrote: > I wrote: >> Dean Rasheed writes: >>> The problem then arises in the final carry propagation pass. During >>> this phase of the computation, the carry from one digit (which can be >>> a shade under INT_MAX / NBASE) is added to the next digit, and th

Re: [HACKERS] Bug in numeric multiplication

2015-09-21 Thread Tom Lane
I wrote: > Dean Rasheed writes: >> The problem then arises in the final carry propagation pass. During >> this phase of the computation, the carry from one digit (which can be >> a shade under INT_MAX / NBASE) is added to the next digit, and that's >> where the overflow happens. > Nice catch! I

Re: [HACKERS] Bug in numeric multiplication

2015-09-21 Thread Tom Lane
Dean Rasheed writes: > The problem then arises in the final carry propagation pass. During > this phase of the computation, the carry from one digit (which can be > a shade under INT_MAX / NBASE) is added to the next digit, and that's > where the overflow happens. Nice catch! I think the comment

Re: [HACKERS] proposal: multiple psql option -c

2015-09-21 Thread Adam Brightwell
Pavel, > with -1 option support FWIW, I have tried to apply this patch against master (7f11724) and there is a minor error, see below. >From patch: patching file src/bin/psql/settings.h Hunk #2 FAILED at 135. 1 out of 2 hunks FAILED -- saving rejects to file src/bin/psql/settings.h.rej >From s

Re: [HACKERS] Rework the way multixact truncations work

2015-09-21 Thread Andres Freund
On 2015-09-21 10:31:17 -0400, Robert Haas wrote: > On Sun, Jul 5, 2015 at 3:16 PM, Andres Freund wrote: > >>On the other hand, in the common case, by the time we perform a > >>restartpoint, we're consistent: I think the main exception to that is > >>if we do a base backup that spans multiple check

Re: [HACKERS] Rework the way multixact truncations work

2015-09-21 Thread Robert Haas
On Sun, Jul 5, 2015 at 3:16 PM, Andres Freund wrote: >>On the other hand, in the common case, by the time we perform a >>restartpoint, we're consistent: I think the main exception to that is >>if we do a base backup that spans multiple checkpoints. I think that >>in the new location, the chances

[HACKERS] Bug in numeric multiplication

2015-09-21 Thread Dean Rasheed
Hi, By chance, while testing the nearby numeric log/exp/pow patch, I came across the following case which generates an initially puzzling looking error on HEAD -- (5.6-1e-500) ^ (3.2-1e-200). This computation actually works OK with that other patch, but only by blind luck. It turns out that the un

Re: [HACKERS] [patch] Proposal for \rotate in psql

2015-09-21 Thread Daniel Verite
Pavel Stehule wrote: > > So not using \crosstab is deliberate; it's to prevent confusion with > > the server-side function. > > I don't afraid about this - crosstab is a function in extension. Psql > backslash commands living in different worlds. Sure, but the confusion would be assumin

[HACKERS] planstate_tree_walker oversight CustomScan

2015-09-21 Thread Kouhei Kaigai
Hi, The planstate_tree_walker() oversight custom_ps of CustomScanState; that should be a list of underlying PlanState object if any. ExplainPreScanNode() treated ForeignScan and CustomScan in special way (it is sufficient for ExplainPreScanNode() purpose), thus, it didn't implement its recursive

Re: [HACKERS] row_security GUC, BYPASSRLS

2015-09-21 Thread Stephen Frost
* Noah Misch (n...@leadboat.com) wrote: > Right now, if a BYPASSRLS user creates a SECURITY DEFINER function, any caller > can change that function's behavior by toggling the GUC. Users won't test > accordingly; better to have just one success-case behavior. I agree that's not good, though the fu

Re: [HACKERS] Speed up Clog Access by increasing CLOG buffers

2015-09-21 Thread Jesper Pedersen
On 09/18/2015 11:11 PM, Amit Kapila wrote: I have done various runs on an Intel Xeon 28C/56T w/ 256Gb mem and 2 x RAID10 SSD (data + xlog) with Min(64,). The benefit with this patch could be seen at somewhat higher client-count as you can see in my initial mail, can you please once try with cl

Re: [HACKERS] tsvector work with citext

2015-09-21 Thread Teodor Sigaev
Fixed (9acb9007de30b3daaa9efc16763c3bc6e3e0a92d), but didn't backpatch because it isn't a critical bug. For those on older versions, whatтАЩs the simplest workaround? FWIW, I thought this would be a reasonable thing to back-patch. It's not as though contrib/citext hasn't been around for awhile.