Re: [HACKERS] Escaping from blocked send() reprised.

2014-08-25 Thread Heikki Linnakangas
On 08/26/2014 09:17 AM, Kyotaro HORIGUCHI wrote: but I don't think we want to define the behavior as "usually, pq_terminate_backend() will kill a backend that's blocked on sending to the client, but sometimes you have to call it twice (or more!) to really kill it". I agree that it is desirable

Re: [HACKERS] postgresql latency & bgwriter not doing its job

2014-08-25 Thread Fabien COELHO
[oops, wrong from, resent...] Hello Jeff, The culprit I found is "bgwriter", which is basically doing nothing to prevent the coming checkpoint IO storm, even though there would be ample time to write the accumulating dirty pages so that checkpoint would find a clean field and pass in a blink.

Re: [HACKERS] postgresql latency & bgwriter not doing its job

2014-08-25 Thread Jeff Janes
On Monday, August 25, 2014, Fabien COELHO wrote: > > I have not found any mean to force bgwriter to send writes when it can. > (Well, I have: create a process which sends "CHECKPOINT" every 0.2 > seconds... it works more or less, but this is not my point:-) > There is scan_whole_pool_millisecond

Re: [HACKERS] Escaping from blocked send() reprised.

2014-08-25 Thread Kyotaro HORIGUCHI
Sorry, I was absorbed by other tasks.. Thank you for reviewing thiis. > On 07/01/2014 06:26 AM, Kyotaro HORIGUCHI wrote: > > At Mon, 30 Jun 2014 11:27:47 -0400, Robert Haas > > wrote in > > > >> 1. I think it's the case that there are platforms around where a > >> signal won't cause send() to r

Re: [HACKERS] postgresql latency & bgwriter not doing its job

2014-08-25 Thread Fabien COELHO
Hello Josh, So I think that you're confusing the roles of bgwriter vs. spread checkpoint. What you're experiencing above is pretty common for nonspread checkpoints on slow storage (and RAID5 is slow for DB updates, no matter how fast the disks are), or for attempts to do spread checkpoint on f

Re: [HACKERS] [GSoC2014] Patch ALTER TABLE ... SET LOGGED

2014-08-25 Thread Fabrízio de Royes Mello
On Fri, Aug 22, 2014 at 5:23 PM, Alvaro Herrera wrote: > > Fabrízio de Royes Mello wrote: > > On Fri, Aug 22, 2014 at 4:45 PM, Alvaro Herrera < alvhe...@2ndquadrant.com> > > wrote: > > > > I pointed out, in the email just before pushing the patch, that perhaps > > > we should pass down the new rel

Re: [HACKERS] SSL renegotiation

2014-08-25 Thread Noah Misch
On Mon, Aug 25, 2014 at 11:46:13PM -0400, Alvaro Herrera wrote: > Tom Lane wrote: > > OK, then maybe end-of-beta is too long. But how much testing will it get > > during development? I know I never use SSL on development installs. > > How many hackers do? > > Just a reminder that I intend to bac

Re: [HACKERS] Final Patch for GROUPING SETS

2014-08-25 Thread Pavel Stehule
2014-08-26 2:45 GMT+02:00 Andrew Gierth : > > "Pavel" == Pavel Stehule writes: > > Pavel> Hi > Pavel> I checked this patch, and it working very well > > Pavel> I found only two issue - I am not sure if it is issue > > Pavel> It duplicate rows > > Pavel> postgres=# explain select name, pl

Re: [HACKERS] postgresql latency & bgwriter not doing its job

2014-08-25 Thread Amit Kapila
On Tue, Aug 26, 2014 at 1:53 AM, Fabien COELHO wrote: > > > Hello pgdevs, > > I've been playing with pg for some time now to try to reduce the maximum latency of simple requests, to have a responsive server under small to medium load. > > On an old computer with a software RAID5 HDD attached, pgbe

Re: [HACKERS] SSL renegotiation

2014-08-25 Thread Alvaro Herrera
Tom Lane wrote: > Andres Freund writes: > > On 2013-11-15 10:43:23 -0500, Tom Lane wrote: > >> Another reason I'm not in a hurry is that the problem we're trying > >> to solve doesn't seem to be causing real-world trouble. So by > >> "awhile", I'm thinking "let's let it get through 9.4 beta testi

Re: [HACKERS] Concurrently option for reindexdb

2014-08-25 Thread Michael Paquier
On Tue, Aug 26, 2014 at 12:28 PM, Fujii Masao wrote: >> +many. Although I'm not sure if we managed to find a safe relation swap. Well we didn't AFAIK. With the latest patch provided I could not really find any whole in the logic, and Andres felt that something may be wrong miles away. If I'd revi

Re: [HACKERS] Concurrently option for reindexdb

2014-08-25 Thread Fujii Masao
On Tue, Aug 26, 2014 at 5:46 AM, Andres Freund wrote: > On August 25, 2014 10:35:20 PM CEST, Alvaro Herrera > wrote: >>Michael Paquier wrote: >>> On Tue, Aug 26, 2014 at 3:48 AM, Fujii Masao >>wrote: >>> > On Mon, Aug 25, 2014 at 4:33 PM, Sawada Masahiko >> wrote: >>> >> this might be difficult

Re: [HACKERS] Optimization for updating foreign tables in Postgres FDW

2014-08-25 Thread Etsuro Fujita
(2014/08/25 21:58), Albe Laurenz wrote: Here is my review: Thank you for the review! I played with it, and apart from Hanada's comments I have found the following: test=> EXPLAIN (ANALYZE, VERBOSE) UPDATE rtest SET val=NULL WHERE id > 3;

Re: [HACKERS] Misaligned BufferDescriptors causing major performance problems on AMD

2014-08-25 Thread Bruce Momjian
On Thu, Apr 17, 2014 at 11:23:24AM +0200, Andres Freund wrote: > On 2014-04-16 19:18:02 -0400, Bruce Momjian wrote: > > On Thu, Feb 6, 2014 at 09:40:32AM +0100, Andres Freund wrote: > > > On 2014-02-05 12:36:42 -0500, Robert Haas wrote: > > > > >> It may well be that your proposal is spot on. But

Re: [HACKERS] Hardening pg_upgrade

2014-08-25 Thread Bruce Momjian
On Mon, Aug 25, 2014 at 06:34:38PM -0400, Bruce Momjian wrote: > > OK, I will move in the direction of removing 8.3 support and use a > > single query to pull schema information. I was hesistant to remove 8.3 > > support as I know we have kept pg_dump support all the way back to 7.0, > > but it s

[HACKERS] Question about coding of free space map

2014-08-25 Thread Tatsuo Ishii
While looking into backend/storage/freespace/freespace.c, I noticed that struct FSMAddress is passed to functions by value, rather than reference. I thought our code practice is defining pointer to a struct data and using the pointer for parameter passing etc. typedef struct RelationData *Relation

Re: [HACKERS] postgresql latency & bgwriter not doing its job

2014-08-25 Thread Jeff Janes
On Monday, August 25, 2014, Fabien COELHO wrote: > > > The culprit I found is "bgwriter", which is basically doing nothing to > prevent the coming checkpoint IO storm, even though there would be ample > time to write the accumulating dirty pages so that checkpoint would find a > clean field and p

Re: [HACKERS] improving speed of make check-world

2014-08-25 Thread Peter Eisentraut
On 8/25/14 1:32 PM, Heikki Linnakangas wrote: > The new EXTRA_INSTALL makefile variable ought to be documented in > extend.sgml, where we list REGRESS_OPTS and others. But EXTRA_INSTALL is only of use inside the main source tree, not by extensions. -- Sent via pgsql-hackers mailing list (pgsql-

Re: [HACKERS] Add .NOTPARALLEL to contrib/Makefile

2014-08-25 Thread Andres Freund
On 2014-08-25 20:16:50 -0400, Tom Lane wrote: > Andres Freund writes: > > Currently running "make -j16 all check" in contrib/ results in a mess > > because > > all pg_regress invocations fight over the same port. Adding a simple > > .NOTPARALLEL: check-%-recurse > > into contrib/Makefile fixes th

[HACKERS] What in the world is happening with castoroides and protosciurus?

2014-08-25 Thread Tom Lane
For the last month or so, these two buildfarm animals (which I believe are the same physical machine) have been erratically failing with errors that reflect low-order differences in floating-point calculations. A recent example is at http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=protosci

Re: [HACKERS] Final Patch for GROUPING SETS

2014-08-25 Thread Andrew Gierth
> "Pavel" == Pavel Stehule writes: Pavel> Hi Pavel> I checked this patch, and it working very well Pavel> I found only two issue - I am not sure if it is issue Pavel> It duplicate rows Pavel> postgres=# explain select name, place, sum(count), grouping(name), Pavel> grouping(place) fr

Re: [HACKERS] Add .NOTPARALLEL to contrib/Makefile

2014-08-25 Thread Tom Lane
Andres Freund writes: > Currently running "make -j16 all check" in contrib/ results in a mess because > all pg_regress invocations fight over the same port. Adding a simple > .NOTPARALLEL: check-%-recurse > into contrib/Makefile fixes that. Do we want that? Dunno, but if we do, it should be appli

[HACKERS] Add .NOTPARALLEL to contrib/Makefile

2014-08-25 Thread Andres Freund
Hi, Currently running "make -j16 all check" in contrib/ results in a mess because all pg_regress invocations fight over the same port. Adding a simple .NOTPARALLEL: check-%-recurse into contrib/Makefile fixes that. Do we want that? Greetings, Andres Freund -- Andres Freund

Re: [HACKERS] Add CREATE support to event triggers

2014-08-25 Thread Michael Paquier
On Tue, Aug 26, 2014 at 5:33 AM, Alvaro Herrera wrote: > Michael Paquier wrote: > And 4. Yes, they are. I wanted to get trivial stuff out of the way > while I had some other trivial patch at hand. I'm dealing with another > patch from the commitfest now, so I'm not posting a rebased version > r

Re: [HACKERS] postgresql latency & bgwriter not doing its job

2014-08-25 Thread Andres Freund
Hi, On 2014-08-25 22:23:40 +0200, Fabien COELHO wrote: > seconds followed by 16 seconds at about 0 tps for the checkpoint induced IO > storm. The server is totally unresponsive 75% of the time. That's bandwidth > optimization for you. Hmmm... why not. > > Now, given this setup, if pgbench is thro

Re: [HACKERS] postgresql latency & bgwriter not doing its job

2014-08-25 Thread Josh Berkus
On 08/25/2014 01:23 PM, Fabien COELHO wrote: > > Hello pgdevs, > > I've been playing with pg for some time now to try to reduce the maximum > latency of simple requests, to have a responsive server under small to > medium load. > > On an old computer with a software RAID5 HDD attached, pgbench s

Re: [HACKERS] Hardening pg_upgrade

2014-08-25 Thread Bruce Momjian
On Mon, Aug 25, 2014 at 02:15:18PM -0400, Bruce Momjian wrote: > On Mon, Aug 25, 2014 at 06:34:12AM -0700, Kevin Grittner wrote: > > Bernd Helmle wrote: > > > Magnus Hagander wrote: > > > > >>> I vote for discarding 8.3 support in pg_upgrade.  There are already > > >>> enough limitations on pg_u

Re: [HACKERS] SKIP LOCKED DATA (work in progress)

2014-08-25 Thread Thomas Munro
On 25 August 2014 02:57, Alvaro Herrera wrote: > Thomas Munro wrote: >> The difficulty of course will be testing all these racy cases reproducibly... > > Does this help? > http://www.postgresql.org/message-id/51fb4305.3070...@2ndquadrant.com > The useful trick there is forcing a query to get its s

Re: [HACKERS] Is this a bug?

2014-08-25 Thread Bruce Momjian
On Fri, Aug 22, 2014 at 10:04:50PM -0400, Bruce Momjian wrote: > On Fri, Aug 22, 2014 at 03:12:47PM -0400, Robert Haas wrote: > > On Fri, Aug 22, 2014 at 2:33 PM, Bruce Momjian wrote: > > >> Yes, you remember well. I will have to find a different way for > > >> pg_upgrade to call a no-op ALTER TA

Re: [HACKERS] Final Patch for GROUPING SETS

2014-08-25 Thread Pavel Stehule
Hi I checked this patch, and it working very well I found only two issue - I am not sure if it is issue with data from https://wiki.postgresql.org/wiki/Grouping_Sets postgres=# select name, place, sum(count), grouping(name), grouping(place) from cars group by rollup(name, place); name | pla

Re: [HACKERS] Concurrently option for reindexdb

2014-08-25 Thread Andres Freund
On August 25, 2014 10:35:20 PM CEST, Alvaro Herrera wrote: >Michael Paquier wrote: >> On Tue, Aug 26, 2014 at 3:48 AM, Fujii Masao >wrote: >> > On Mon, Aug 25, 2014 at 4:33 PM, Sawada Masahiko > wrote: >> >> this might be difficult to call this as --concurrently. >> >> It might need to be change

Re: [HACKERS] Concurrently option for reindexdb

2014-08-25 Thread Alvaro Herrera
Michael Paquier wrote: > On Tue, Aug 26, 2014 at 3:48 AM, Fujii Masao wrote: > > On Mon, Aug 25, 2014 at 4:33 PM, Sawada Masahiko > > wrote: > >> this might be difficult to call this as --concurrently. > >> It might need to be change the name. > > > > I'm OK to say that as --concurrently if the

Re: [HACKERS] Add CREATE support to event triggers

2014-08-25 Thread Alvaro Herrera
Michael Paquier wrote: > On Sat, Jun 14, 2014 at 5:31 AM, Alvaro Herrera > wrote: > > > Here's a refreshed version of this patch. I have split it up in a > > largish number of pieces, which hopefully makes it easier to understand > > what is going on. > > > Alvaro, > > Could you confirm that th

Re: [HACKERS] pg_upgrade: allow multiple -o/-O options

2014-08-25 Thread Bruce Momjian
On Fri, Aug 22, 2014 at 10:02:11AM -0400, Bruce Momjian wrote: > On Fri, Aug 22, 2014 at 10:52:12AM +0200, Pavel Raiskup wrote: > > On Thursday 21 of August 2014 18:26:37 Bruce Momjian wrote: > > > On Tue, Mar 4, 2014 at 04:52:56PM +0100, Pavel Raiskup wrote: > > > > RFE: Consider that you want t

[HACKERS] postgresql latency & bgwriter not doing its job

2014-08-25 Thread Fabien COELHO
Hello pgdevs, I've been playing with pg for some time now to try to reduce the maximum latency of simple requests, to have a responsive server under small to medium load. On an old computer with a software RAID5 HDD attached, pgbench simple update script run for a some time (scale 100, fill

Re: [HACKERS] Add CREATE support to event triggers

2014-08-25 Thread Michael Paquier
On Sat, Jun 14, 2014 at 5:31 AM, Alvaro Herrera wrote: > Here's a refreshed version of this patch. I have split it up in a > largish number of pieces, which hopefully makes it easier to understand > what is going on. > Alvaro, Could you confirm that the patches you just committed are 1, 3 and 6

Re: [HACKERS] Concurrently option for reindexdb

2014-08-25 Thread Michael Paquier
On Tue, Aug 26, 2014 at 3:48 AM, Fujii Masao wrote: > On Mon, Aug 25, 2014 at 4:33 PM, Sawada Masahiko > wrote: >> this might be difficult to call this as --concurrently. >> It might need to be change the name. > > I'm OK to say that as --concurrently if the document clearly > explains that rest

Re: [HACKERS] Set new system identifier using pg_resetxlog

2014-08-25 Thread Heikki Linnakangas
On 08/25/2014 10:45 PM, Tom Lane wrote: Heikki Linnakangas writes: It would not need to have the capability to set the system ID to a particular value, only a randomly assigned one (setting it to a particular value could be added to pg_resetxlog, where other dangerous options are). I'm less c

Re: [HACKERS] psql \watch versus \timing

2014-08-25 Thread Heikki Linnakangas
On 08/25/2014 10:48 PM, Heikki Linnakangas wrote: On 08/25/2014 09:22 PM, Fujii Masao wrote: On Tue, Aug 26, 2014 at 1:34 AM, Heikki Linnakangas wrote: I agree that refactoring this would be nice in the long-term, and I also agree that it's probably OK as it is in the short-term. I don't like

Re: [HACKERS] Set new system identifier using pg_resetxlog

2014-08-25 Thread Andres Freund
On August 25, 2014 9:45:50 PM CEST, Tom Lane wrote: >Heikki Linnakangas writes: >> In summary, I think we want this feature in some form, but we'll >somehow >> need to be make the distinction to the dangerous pg_resetxlog usage. >It >> might be best, after all, to make this a separate utility,

Re: [HACKERS] Set new system identifier using pg_resetxlog

2014-08-25 Thread Tom Lane
Heikki Linnakangas writes: > In summary, I think we want this feature in some form, but we'll somehow > need to be make the distinction to the dangerous pg_resetxlog usage. It > might be best, after all, to make this a separate utility, > pg_resetsystemid. That sounds fairly reasonable given y

Re: [HACKERS] psql \watch versus \timing

2014-08-25 Thread Heikki Linnakangas
On 08/25/2014 09:22 PM, Fujii Masao wrote: On Tue, Aug 26, 2014 at 1:34 AM, Heikki Linnakangas wrote: I agree that refactoring this would be nice in the long-term, and I also agree that it's probably OK as it is in the short-term. I don't like the name PSQLexecInternal, though. PSQLexec is used

Re: [HACKERS] pg_dumpall reccomendation in release notes

2014-08-25 Thread Bruce Momjian
On Thu, Aug 21, 2014 at 12:18:46PM -0400, Bruce Momjian wrote: > I have developed the attached patch to address the issues raised above: > > o non-text output of pg_dump is mentioned > o mentions of using OID for keys is removed > o the necessity of pg_dumpall --globals-only is mentioned > o u

Re: [HACKERS] Hardening pg_upgrade

2014-08-25 Thread Bruce Momjian
On Mon, Aug 25, 2014 at 03:04:52PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > OK, I will move in the direction of removing 8.3 support and use a > > single query to pull schema information. I was hesistant to remove 8.3 > > support as I know we have kept pg_dump support all the way back

Re: [HACKERS] Set new system identifier using pg_resetxlog

2014-08-25 Thread Heikki Linnakangas
On 06/18/2014 09:17 PM, Josh Berkus wrote: On 06/18/2014 11:03 AM, Andres Freund wrote: Well, all those actually do write to the xlog (to write a new checkpoint, containing the updated control file). Since pg_resetxlog has done all this pretty much since forever renaming it now seems to be a big

Re: [HACKERS] Hardening pg_upgrade

2014-08-25 Thread Tom Lane
Bruce Momjian writes: > OK, I will move in the direction of removing 8.3 support and use a > single query to pull schema information. I was hesistant to remove 8.3 > support as I know we have kept pg_dump support all the way back to 7.0, > but it seems pg_upgrade need not have the same version r

Re: [HACKERS] Concurrently option for reindexdb

2014-08-25 Thread Fujii Masao
On Mon, Aug 25, 2014 at 4:33 PM, Sawada Masahiko wrote: > On Mon, Aug 25, 2014 at 3:48 PM, Michael Paquier > wrote: >> On Mon, Aug 25, 2014 at 3:36 PM, Sawada Masahiko >> wrote: >>> Attached WIP patch adds "-C (--concurrently)" option for reindexdb >>> command for concurrently reindexing. >>> I

Re: [HACKERS] Verbose output of pg_dump not show schema name

2014-08-25 Thread Heikki Linnakangas
On 08/20/2014 11:11 PM, Fabrízio de Royes Mello wrote: On Wed, Aug 20, 2014 at 2:43 AM, Michael Paquier wrote: I had a look at this patch, and here are a couple of comments: 1) Depending on how ArchiveEntry is called to register an object to dump, namespace may be NULL, but it is not the case

Re: [HACKERS] [GSoC2014] Patch ALTER TABLE ... SET LOGGED

2014-08-25 Thread Fabrízio de Royes Mello
On Mon, Aug 25, 2014 at 2:55 PM, Alvaro Herrera wrote: > > Fabrízio de Royes Mello wrote: > > On Sat, Aug 23, 2014 at 8:53 AM, Michael Paquier < michael.paqu...@gmail.com> > > wrote: > > > > > > On Sat, Aug 23, 2014 at 3:32 AM, Alvaro Herrera > > > wrote: > > > > Great. Pushed. Thanks for the p

Re: [HACKERS] Specifying the unit in storage parameter

2014-08-25 Thread Alvaro Herrera
Fujii Masao wrote: > On Thu, Aug 21, 2014 at 4:20 PM, Michael Paquier > wrote: > > Looking at the patch, the parameter "fillfactor" in the category > > RELOPT_KIND_HEAP (the first element in intRelOpts of reloptions.c) is > > not updated with the new field. It is only a one-line change. > > @@ -9

Re: [HACKERS] LIMIT for UPDATE and DELETE

2014-08-25 Thread Jeff Janes
On Sun, Aug 24, 2014 at 11:48 PM, Etsuro Fujita wrote: > Hi Rukh, > > > (2014/08/15 6:18), Rukh Meski wrote: > >> Based on the feedback on my previous patch, I've separated only the >> LIMIT part into its own feature. This version plays nicely with >> inheritance. The intended use is splitting

Re: [HACKERS] psql \watch versus \timing

2014-08-25 Thread Fujii Masao
On Tue, Aug 26, 2014 at 1:34 AM, Heikki Linnakangas wrote: > On 08/18/2014 10:51 AM, Michael Paquier wrote: >> >> On Mon, Aug 18, 2014 at 4:12 PM, Fujii Masao >> wrote: >>> >>> On Mon, Aug 18, 2014 at 3:19 PM, Michael Paquier >>> wrote: On Thu, Aug 14, 2014 at 11:10 PM, Fujii Masao >>

Re: [HACKERS] Hardening pg_upgrade

2014-08-25 Thread Bruce Momjian
On Mon, Aug 25, 2014 at 06:34:12AM -0700, Kevin Grittner wrote: > Bernd Helmle wrote: > > Magnus Hagander wrote: > > >>> I vote for discarding 8.3 support in pg_upgrade.  There are already > >>> enough limitations on pg_upgrade from pre-8.4 to make it of questionable > >>> value; if it's going t

Re: [HACKERS] Specifying the unit in storage parameter

2014-08-25 Thread Fujii Masao
On Thu, Aug 21, 2014 at 4:20 PM, Michael Paquier wrote: > On Fri, Aug 8, 2014 at 12:32 PM, Fujii Masao wrote: >> This is not user-friendly. I'd like to propose the attached patch which >> introduces the infrastructure which allows us to specify the unit when >> setting INTEGER storage parameter l

Re: [HACKERS] [GSoC2014] Patch ALTER TABLE ... SET LOGGED

2014-08-25 Thread Alvaro Herrera
Fabrízio de Royes Mello wrote: > On Sat, Aug 23, 2014 at 8:53 AM, Michael Paquier > wrote: > > > > On Sat, Aug 23, 2014 at 3:32 AM, Alvaro Herrera > > wrote: > > > Great. Pushed. Thanks for the patch. > > There is a typo in what has been pushed. Patch attached. > > > > Thanks... I fixed that i

Re: [HACKERS] improving speed of make check-world

2014-08-25 Thread Heikki Linnakangas
On 08/15/2014 08:45 AM, Peter Eisentraut wrote: make check-world creates a temporary installation in every subdirectory it runs a test in, which is stupid: it's very slow and uses a lot of disk space. It's enough to do this once per run. That is the essence of what I have implemented. It cuts

Re: [HACKERS] SKIP LOCKED DATA (work in progress)

2014-08-25 Thread Heikki Linnakangas
On 07/31/2014 12:29 AM, Thomas Munro wrote: On 29 July 2014 02:35, Alvaro Herrera wrote: David Rowley wrote: I've also been looking at the isolation tests and I see that you've added a series of tests for NOWAIT. I was wondering why you did that as that's really existing code, probably if you

Re: [HACKERS] [TODO] Track number of files ready to be archived in pg_stat_archiver

2014-08-25 Thread Gilles Darold
Le 21/08/2014 10:17, Julien Rouhaud a écrit : > Hello, > > Attached patch implements the following TODO item : > > Track number of WAL files ready to be archived in pg_stat_archiver > > However, it will track the total number of any file ready to be > archived, not only WAL files. > > Please let me

Re: [HACKERS] psql \watch versus \timing

2014-08-25 Thread Heikki Linnakangas
On 08/18/2014 10:51 AM, Michael Paquier wrote: On Mon, Aug 18, 2014 at 4:12 PM, Fujii Masao wrote: On Mon, Aug 18, 2014 at 3:19 PM, Michael Paquier wrote: On Thu, Aug 14, 2014 at 11:10 PM, Fujii Masao wrote: Attached patch changes \watch so that it displays how long the query takes if \timi

Re: [HACKERS] pg_stat_statements cluttered with "DEALLOCATE dbdpg_p*"

2014-08-25 Thread Heikki Linnakangas
On 07/20/2014 11:51 PM, Peter Geoghegan wrote: On Sun, Jul 20, 2014 at 10:56 AM, Tom Lane wrote: However, this is certainly a behavioral change. Perhaps squeeze it into 9.4, but not the back braches? +1 Ok, done. (We're a month closer to releasing 9.4 than we were when this consensus was

Re: [HACKERS] Allow multi-byte characters as escape in SIMILAR TO and SUBSTRING

2014-08-25 Thread Heikki Linnakangas
On 08/25/2014 06:14 PM, Tom Lane wrote: Heikki Linnakangas writes: On 08/25/2014 04:48 PM, Tom Lane wrote: [ scratches head... ] Surely similar_escape is marked immutable, and will therefore be executed exactly once in either of these formulations, because the planner will fold the expression

Re: [HACKERS] SKIP LOCKED DATA (work in progress)

2014-08-25 Thread Alvaro Herrera
Thomas Munro wrote: > On 22 August 2014 23:02, Alvaro Herrera wrote: > Forgive me if I have misunderstood but it looks like your incremental > patch included a couple of unrelated changes, namely > s/0/InvalidCommandId/ and a reversion of ConditionalMultiXactIdWait. Yeah, sorry about those, will

Re: [HACKERS] Allow multi-byte characters as escape in SIMILAR TO and SUBSTRING

2014-08-25 Thread Tom Lane
Heikki Linnakangas writes: > On 08/25/2014 04:48 PM, Tom Lane wrote: >> [ scratches head... ] Surely similar_escape is marked immutable, and >> will therefore be executed exactly once in either of these formulations, >> because the planner will fold the expression to a constant. > Yeah, just not

Re: [HACKERS] Unwanted LOG during recovery of DROP TABLESPACE REDO

2014-08-25 Thread Heikki Linnakangas
On 08/15/2014 12:31 PM, Marko Tiikkaja wrote: On 7/16/14 4:33 PM, Tom Lane wrote: Rajeev rastogi writes: I found and fixed a bug that causes recovery (crash recovery , PITR) to throw unwanted LOG message if the tablespace symlink is not found during the processing of DROP TABLESPACE redo.

Re: [HACKERS] Allow multi-byte characters as escape in SIMILAR TO and SUBSTRING

2014-08-25 Thread Heikki Linnakangas
On 08/25/2014 04:48 PM, Tom Lane wrote: Heikki Linnakangas writes: On 07/12/2014 05:16 AM, Jeff Davis wrote: I was able to see about a 2% increase in runtime when using the similar_escape function directly. I made a 10M tuple table and did: explain analyze select similar_escape('ΣΣΣΣΣΣÎ

Re: [HACKERS] Allow multi-byte characters as escape in SIMILAR TO and SUBSTRING

2014-08-25 Thread Heikki Linnakangas
On 07/12/2014 05:16 AM, Jeff Davis wrote: On Fri, 2014-07-11 at 11:51 -0400, Tom Lane wrote: Jeff Davis writes: Attached is a small patch to $SUBJECT. In master, only single-byte characters are allowed as an escape. Of course, with the patch it must still be a single character, but it may be m

Re: [HACKERS] Built-in binning functions

2014-08-25 Thread Petr Jelinek
Hi, I finally had some time to get back to this. I attached version3 of the patch which "fixes" Tom's complaint about int8 version by removing the int8 version as it does not seem necessary (the float8 can handle integers just fine). This patch now basically has just one optimized function f

Re: [HACKERS] Allow multi-byte characters as escape in SIMILAR TO and SUBSTRING

2014-08-25 Thread Tom Lane
Heikki Linnakangas writes: > On 07/12/2014 05:16 AM, Jeff Davis wrote: >> I was able to see about a 2% increase in runtime when using the >> similar_escape function directly. I made a 10M tuple table and did: >> >> explain analyze >> select >> similar_escape('ΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣÎ

Re: [HACKERS] Hardening pg_upgrade

2014-08-25 Thread Kevin Grittner
Bernd Helmle wrote: > Magnus Hagander wrote: >>> I vote for discarding 8.3 support in pg_upgrade.  There are already >>> enough limitations on pg_upgrade from pre-8.4 to make it of questionable >>> value; if it's going to create problems like this, it's time to cut the >>> rope. >> >> +1. 8.3 ha

Re: [HACKERS] LIMIT for UPDATE and DELETE

2014-08-25 Thread Kevin Grittner
Etsuro Fujita wrote: > (2014/08/15 6:18), Rukh Meski wrote: >> Based on the feedback on my previous patch, I've separated only the >> LIMIT part into its own feature.  This version plays nicely with >> inheritance.  The intended use is splitting up big UPDATEs and DELETEs >> into batches more easi

Re: [HACKERS] Allow multi-byte characters as escape in SIMILAR TO and SUBSTRING

2014-08-25 Thread Heikki Linnakangas
On 07/12/2014 05:16 AM, Jeff Davis wrote: I was able to see about a 2% increase in runtime when using the similar_escape function directly. I made a 10M tuple table and did: explain analyze select similar_escape('','#')

Re: [HACKERS] Optimization for updating foreign tables in Postgres FDW

2014-08-25 Thread Albe Laurenz
Etsuro Fujita wrote: > Done. (I've left deparseDirectUpdateSql/deparseDirectDeleteSql as-is, > though.) > > Other changes: > > * Address the comments from Eitoku-san. > * Add regression tests. > * Fix a bug, which fails to show the actual row counts in EXPLAIN > ANALYZE for UPDATE/DELETE without

Re: [HACKERS] LIMIT for UPDATE and DELETE

2014-08-25 Thread Amit Kapila
On Mon, Aug 25, 2014 at 12:18 PM, Etsuro Fujita wrote: > (2014/08/15 6:18), Rukh Meski wrote: >> >> Based on the feedback on my previous patch, I've separated only the >> LIMIT part into its own feature. This version plays nicely with >> inheritance. The intended use is splitting up big UPDATEs

Re: [HACKERS] Escaping from blocked send() reprised.

2014-08-25 Thread Heikki Linnakangas
On 07/01/2014 06:26 AM, Kyotaro HORIGUCHI wrote: At Mon, 30 Jun 2014 11:27:47 -0400, Robert Haas wrote in 1. I think it's the case that there are platforms around where a signal won't cause send() to return EINTR and I'd be entirely unsurprised if SSL_write() doesn't necessarily return EI

[HACKERS] Switch pg_basebackup to use -X stream instead of -X fetch by default?

2014-08-25 Thread Andres Freund
Hi, currently pg_basebackup uses fetch mode when only -x is specified - which imo isn't a very good thing to use due to the increased risk of not fetching everything. How about switching to stream mode for 9.5+? Greetings, Andres Freund -- Andres Freund http://www.2ndQuadr

Re: [HACKERS] implement subject alternative names support for SSL connections

2014-08-25 Thread Heikki Linnakangas
On 08/25/2014 01:07 PM, Andres Freund wrote: On 2014-08-25 13:02:50 +0300, Heikki Linnakangas wrote: But actually, I wonder if we should delegate the whole hostname matching to OpenSSL? There's a function called X509_check_host for that, although it's new in OpenSSL 1.1.0 so we'd need to add a c

Re: [HACKERS] implement subject alternative names support for SSL connections

2014-08-25 Thread Andres Freund
On 2014-08-25 13:02:50 +0300, Heikki Linnakangas wrote: > But actually, I wonder if we should delegate the whole hostname matching to > OpenSSL? There's a function called X509_check_host for that, although it's > new in OpenSSL 1.1.0 so we'd need to add a configure test for that and keep > the curr

Re: [HACKERS] implement subject alternative names support for SSL connections

2014-08-25 Thread Heikki Linnakangas
On 08/24/2014 03:11 PM, Alexey Klyukin wrote: On Wed, Aug 20, 2014 at 11:53 AM, Heikki Linnakangas < hlinnakan...@vmware.com> wrote: On 07/25/2014 07:10 PM, Alexey Klyukin wrote: Greetings, I'd like to propose a patch for checking subject alternative names entry in the SSL certificate for DN

Re: [HACKERS] Extended Prefetching using Asynchronous IO - proposal and patch

2014-08-25 Thread Heikki Linnakangas
On 08/25/2014 12:49 AM, johnlumby wrote: On 08/19/14 18:27, Heikki Linnakangas wrote: Please write the patch without atomic CAS operation. Just use a spinlock. Umm, this is a new criticism I think. Yeah. Be prepared that new issues will crop up as the patch gets slimmer and easier to revi

Re: [HACKERS] Hardening pg_upgrade

2014-08-25 Thread Bernd Helmle
--On 21. August 2014 22:08:58 +0200 Magnus Hagander wrote: I vote for discarding 8.3 support in pg_upgrade. There are already enough limitations on pg_upgrade from pre-8.4 to make it of questionable value; if it's going to create problems like this, it's time to cut the rope. +1. 8.3 has

Re: [HACKERS] Concurrently option for reindexdb

2014-08-25 Thread Sawada Masahiko
On Mon, Aug 25, 2014 at 3:48 PM, Michael Paquier wrote: > On Mon, Aug 25, 2014 at 3:36 PM, Sawada Masahiko > wrote: >> Attached WIP patch adds "-C (--concurrently)" option for reindexdb >> command for concurrently reindexing. >> If we specify "-C" option with any table then reindexdb do reindexi

[HACKERS] minor config doc update

2014-08-25 Thread Fabien COELHO
Find a small documentation patch attached: - show the valid range for segment_timeout - remove one spurious empty line (compared to other descriptions) -- Fabien.diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index f23e5dc..49547ee 100644 --- a/doc/src/sgml/config.sgml +++ b