Re: [HACKERS] moving from contrib to bin

2015-04-15 Thread Peter Eisentraut
On 4/12/15 8:00 PM, Alvaro Herrera wrote: Peter Eisentraut wrote: On 3/11/15 8:21 PM, Michael Paquier wrote: Attached is a series of patch rebased on current HEAD, there were some conflicts after perl-tidying the refactoring patch for MSVC. Note that this series still uses PGXS in the

[HACKERS] TAP tests of pg_rewind not stopping servers used for the tests

2015-04-15 Thread Michael Paquier
Hi all, In the refactoring of pg_rewind tests committed as 53ba107, it happens that some of the servers used for the tests are not stopped at the end of the test. The issue is that RewindTest.pm uses END to stop the servers, but now that the local and remote tests are grouped half of the servers

Re: [HACKERS] [COMMITTERS] pgsql: Move pg_upgrade from contrib/ to src/bin/

2015-04-15 Thread Michael Paquier
On Wed, Apr 15, 2015 at 7:54 PM, Peter Eisentraut pete...@gmx.net wrote: On 4/14/15 8:32 PM, Peter Eisentraut wrote: Move pg_upgrade from contrib/ to src/bin/ Oh dear. It appears the buildfarm client code needs to be updated to support this. How do we do this? (I guess the critters that

Re: [HACKERS] FPW compression leaks information

2015-04-15 Thread Michael Paquier
On Wed, Apr 15, 2015 at 9:20 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Wed, Apr 15, 2015 at 2:22 PM, Fujii Masao wrote: On Wed, Apr 15, 2015 at 11:55 AM, Michael Paquier wrote: 1) Doc patch to mention that it is possible that compression can give hints to attackers when working

Re: [HACKERS] Turning off HOT/Cleanup sometimes

2015-04-15 Thread Simon Riggs
On 15 April 2015 at 08:04, Robert Haas robertmh...@gmail.com wrote: On Wed, Apr 15, 2015 at 3:37 AM, Simon Riggs si...@2ndquadrant.com wrote: On 14 April 2015 at 21:53, Robert Haas robertmh...@gmail.com wrote: Peter commented previously that README.HOT should get an update. The relevant

Re: Custom/Foreign-Join-APIs (Re: [HACKERS] [v9.5] Custom Plan API)

2015-04-15 Thread Kouhei Kaigai
Attached explain_forein_join.patch adds capability to show join combination of a ForeignScan in EXPLAIN output as an additional item “Relations”. I thought that using array to list relations is a good way too, but I chose one string value because users would like to know order and

Re: [HACKERS] Clock sweep not caching enough B-Tree leaf pages?

2015-04-15 Thread Amit Kapila
On Wed, Apr 15, 2015 at 10:07 AM, Robert Haas robertmh...@gmail.com wrote: On Wed, Apr 15, 2015 at 12:15 AM, Amit Kapila amit.kapil...@gmail.com wrote: IIUC, this will allow us to increase usage count only when the buffer is touched by clocksweep to decrement the usage count. Yes. I

Re: [HACKERS] Turning off HOT/Cleanup sometimes

2015-04-15 Thread Simon Riggs
On 15 April 2015 at 09:10, Andres Freund and...@anarazel.de wrote: On 2015-04-15 08:42:33 -0400, Simon Riggs wrote: Because it makes it subsequent accesses to the page cheaper. Cheaper for whom? Everyone. I think what you mean is Everyone else. It is demonstrably quicker and more

Re: [HACKERS] Turning off HOT/Cleanup sometimes

2015-04-15 Thread Robert Haas
On Wed, Apr 15, 2015 at 3:37 AM, Simon Riggs si...@2ndquadrant.com wrote: On 14 April 2015 at 21:53, Robert Haas robertmh...@gmail.com wrote: Peter commented previously that README.HOT should get an update. The relevant section seems to be When can/should we prune or defragment?. That's

Re: [HACKERS] FPW compression leaks information

2015-04-15 Thread Michael Paquier
On Wed, Apr 15, 2015 at 2:22 PM, Fujii Masao wrote: On Wed, Apr 15, 2015 at 11:55 AM, Michael Paquier wrote: 1) Doc patch to mention that it is possible that compression can give hints to attackers when working on sensible fields that have a non-fixed size. I think that this patch is enough

Re: [HACKERS] Turning off HOT/Cleanup sometimes

2015-04-15 Thread Andres Freund
On 2015-04-15 08:42:33 -0400, Simon Riggs wrote: Because it makes it subsequent accesses to the page cheaper. Cheaper for whom? Everyone. Including further readers. Following HOT chains in read mostly workloads can be really expensive. If you have workloads with a 'hot' value range that's

Re: [HACKERS] INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0

2015-04-15 Thread Heikki Linnakangas
On 04/15/2015 07:51 AM, Peter Geoghegan wrote: +heap_finish_speculative(Relation relation, HeapTuple tuple, bool conflict) +{ + if (!conflict) + { + /* +* Update the tuple in-place, in the common case where no conflict was +* detected

Re: [HACKERS] WAL format changes break the suppression of do-nothing checkpoints.

2015-04-15 Thread Heikki Linnakangas
On 03/31/2015 09:09 PM, Jeff Janes wrote: On Tue, Mar 31, 2015 at 6:19 AM, Heikki Linnakangas hlinn...@iki.fi wrote: On 03/30/2015 09:01 PM, Jeff Janes wrote: commit 2c03216d831160bedd72d45f7 has invalidated the part of the docs saying If no WAL has been written since the previous

Re: [HACKERS] Turning off HOT/Cleanup sometimes

2015-04-15 Thread Alvaro Herrera
Simon Riggs wrote: On 15 April 2015 at 09:10, Andres Freund and...@anarazel.de wrote: I don't really see the downside to this suggestion. The suggestion makes things better than they are now but is still less than I have proposed. If what you both mean is IMHO this is an acceptable

Re: [HACKERS] [COMMITTERS] pgsql: Move pg_upgrade from contrib/ to src/bin/

2015-04-15 Thread Andrew Dunstan
On 04/15/2015 10:51 AM, Andrew Dunstan wrote: On 04/15/2015 08:31 AM, Michael Paquier wrote: On Wed, Apr 15, 2015 at 7:54 PM, Peter Eisentraut pete...@gmx.net wrote: On 4/14/15 8:32 PM, Peter Eisentraut wrote: Move pg_upgrade from contrib/ to src/bin/ Oh dear. It appears the buildfarm

Re: [HACKERS] Turning off HOT/Cleanup sometimes

2015-04-15 Thread Heikki Linnakangas
On 04/15/2015 05:44 PM, Alvaro Herrera wrote: Simon Riggs wrote: On 15 April 2015 at 09:10, Andres Freund and...@anarazel.de wrote: I don't really see the downside to this suggestion. The suggestion makes things better than they are now but is still less than I have proposed. If what you

Re: [HACKERS] INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0

2015-04-15 Thread Andres Freund
On 2015-04-15 17:58:54 +0300, Heikki Linnakangas wrote: On 04/15/2015 07:51 AM, Peter Geoghegan wrote: +heap_finish_speculative(Relation relation, HeapTuple tuple, bool conflict) +{ +if (!conflict) +{ +/* + * Update the tuple in-place, in the common case

Re: [HACKERS] Auditing extension for PostgreSQL (Take 2)

2015-04-15 Thread Sawada Masahiko
On Wed, Apr 15, 2015 at 10:52 AM, Sawada Masahiko sawada.m...@gmail.com wrote: On Wed, Apr 15, 2015 at 8:57 AM, David Steele da...@pgmasters.net wrote: On 4/14/15 7:13 PM, Tatsuo Ishii wrote: This patch does not apply cleanly due to the moving of pgbench (patch to filelist.sgml failed).

Re: [HACKERS] [COMMITTERS] pgsql: Move pg_upgrade from contrib/ to src/bin/

2015-04-15 Thread Andrew Dunstan
On 04/15/2015 08:31 AM, Michael Paquier wrote: On Wed, Apr 15, 2015 at 7:54 PM, Peter Eisentraut pete...@gmx.net wrote: On 4/14/15 8:32 PM, Peter Eisentraut wrote: Move pg_upgrade from contrib/ to src/bin/ Oh dear. It appears the buildfarm client code needs to be updated to support this.

Re: [HACKERS] INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0

2015-04-15 Thread Heikki Linnakangas
On 04/15/2015 06:01 PM, Andres Freund wrote: On 2015-04-15 17:58:54 +0300, Heikki Linnakangas wrote: On 04/15/2015 07:51 AM, Peter Geoghegan wrote: +heap_finish_speculative(Relation relation, HeapTuple tuple, bool conflict) +{ + if (!conflict) + { + /* +

Re: [HACKERS] TAP tests of pg_rewind not stopping servers used for the tests

2015-04-15 Thread Heikki Linnakangas
On 04/15/2015 03:07 PM, Michael Paquier wrote: Hi all, In the refactoring of pg_rewind tests committed as 53ba107, it happens that some of the servers used for the tests are not stopped at the end of the test. The issue is that RewindTest.pm uses END to stop the servers, but now that the local

[HACKERS] Bugs in CreateCheckPoint

2015-04-15 Thread Zhang Zq
hi, To avoid inserting duplicate checkpoints when the system is idle, the code of CreateCheckPoint make two tests to determine that nothing has happened since the start of the last checkpoint. But because the layout of XLOG record was changed, the condition would never to be true. The

Re: [HACKERS] Turning off HOT/Cleanup sometimes

2015-04-15 Thread Alvaro Herrera
Heikki Linnakangas wrote: On 04/15/2015 05:44 PM, Alvaro Herrera wrote: Robert's proposal is when reading a page, if dirty HOT-clean it; if not dirty, also HOT-clean it but only 5 times in each scan. This runs HOT-cleanup some number of times (as many as there are dirty), and causes at most

Re: [HACKERS] Turning off HOT/Cleanup sometimes

2015-04-15 Thread Robert Haas
On Wed, Apr 15, 2015 at 8:42 AM, Simon Riggs si...@2ndquadrant.com wrote: I won't take responsibility for paying my neighbor's tax bill, but I might take responsibility for picking up his mail while he's on holiday. That makes it sound like this is an occasional, non-annoying thing. It's

[HACKERS] Assert there is no duplicated exit callbacks

2015-04-15 Thread Qingqing Zhou
Attached is a patch to assert there is no duplicated exit callbacks. Along the way, I downgrade the runtime enough room check to an assertion: the callbacks are registered in pretty fixed initialization code path, thus assertion is good enough to prevent overlook there. If we don't agree with

Re: [HACKERS] Turning off HOT/Cleanup sometimes

2015-04-15 Thread Heikki Linnakangas
On 04/15/2015 07:11 PM, Alvaro Herrera wrote: Heikki Linnakangas wrote: On 04/15/2015 05:44 PM, Alvaro Herrera wrote: Robert's proposal is when reading a page, if dirty HOT-clean it; if not dirty, also HOT-clean it but only 5 times in each scan. This runs HOT-cleanup some number of times

Re: [HACKERS] Assert there is no duplicated exit callbacks

2015-04-15 Thread Heikki Linnakangas

Re: [HACKERS] Bugs in CreateCheckPoint

2015-04-15 Thread Heikki Linnakangas
On 04/15/2015 07:02 PM, Zhang Zq wrote: hi, To avoid inserting duplicate checkpoints when the system is idle, the code of CreateCheckPoint make two tests to determine that nothing has happened since the start of the last checkpoint. But because the layout of XLOG record was changed, the

Re: [HACKERS] [COMMITTERS] pgsql: Move pg_upgrade from contrib/ to src/bin/

2015-04-15 Thread Alvaro Herrera
Andrew Dunstan wrote: OK, the fix is here: https://github.com/PGBuildFarm/client-code/commit/47b24efa758360699413640dd14c4096e1643fb2 and the new TestUpgrade.pm can be grabbed from here:

Re: [HACKERS] Assert there is no duplicated exit callbacks

2015-04-15 Thread David Fetter
On Wed, Apr 15, 2015 at 11:14:43AM -0700, Qingqing Zhou wrote: Hmm, the email text seems corrupted? I think it was an encoding issue. Here's what I got when I piped it through less. Cheers, David. On 04/15/2015 07:52 PM, Qingqing Zhou wrote: Attached is a patch to assert there is no

Re: [HACKERS] Auditing extension for PostgreSQL (Take 2)

2015-04-15 Thread David Steele
On 4/14/15 8:37 PM, Tatsuo Ishii wrote: BTW, in my understanding pg_audit allows to track a table access even if it's used in a view. I think this is a nice feature and it would be better explicitly stated in the document and the test case is better included in the regression test. Here is

Re: [HACKERS] Assert there is no duplicated exit callbacks

2015-04-15 Thread Qingqing Zhou
Hmm, the email text seems corrupted? Regards, Qingqing On Wed, Apr 15, 2015 at 10:03 AM, Heikki Linnakangas hlinn...@iki.fi wrote: 湏〠⼴㔱㈯㄰‵㜰㔺′䵐‬楑杮楱杮娠潨⁵牷瑯㩥਍‾瑁慴档摥椠⁳⁡慰捴⁨潴愠獳牥⁴ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

[HACKERS] show xl_prev in xlog.c errcontext

2015-04-15 Thread Alvaro Herrera
I found this patch in my local repo that I wrote some weeks or months ago while debugging some XLog corruption problem: it was difficult to pinpoint what XLog record in a long sequence of WAL files was causing a problem, and the displaying the prev pointer in errcontext made finding it much easier

[HACKERS] reparsing query

2015-04-15 Thread Andrzej Barszcz
Hi I knock once again with this : reparse query to XML ( last knock 5-6 years before) . Motivation: more info for front-end developers about query. Users of jdbc driver are not able to gather information from meta data about such simple query : select x.a,y.b from xxx x, yyy y Solution :

Re: [HACKERS] reparsing query

2015-04-15 Thread Qingqing Zhou
On Wed, Apr 15, 2015 at 1:40 PM, Andrzej Barszcz abus...@gmail.com wrote: I knock once again with this : reparse query to XML ( last knock 5-6 years before) . What exactly reparse query to XML does? Regards, Qingqing -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

Re: [HACKERS] [COMMITTERS] pgsql: Move pg_upgrade from contrib/ to src/bin/

2015-04-15 Thread Andrew Dunstan
On 04/15/2015 12:23 PM, Alvaro Herrera wrote: Andrew Dunstan wrote: OK, the fix is here: https://github.com/PGBuildFarm/client-code/commit/47b24efa758360699413640dd14c4096e1643fb2 and the new TestUpgrade.pm can be grabbed from here:

Re: [HACKERS] Turning off HOT/Cleanup sometimes

2015-04-15 Thread Simon Riggs
On 15 April 2015 at 12:39, Robert Haas robertmh...@gmail.com wrote: On Wed, Apr 15, 2015 at 8:42 AM, Simon Riggs si...@2ndquadrant.com wrote: I won't take responsibility for paying my neighbor's tax bill, but I might take responsibility for picking up his mail while he's on holiday. That

Re: [HACKERS] Turning off HOT/Cleanup sometimes

2015-04-15 Thread Alvaro Herrera
Simon Riggs wrote: On 15 April 2015 at 12:39, Robert Haas robertmh...@gmail.com wrote: On 04/15/2015 05:44 PM, Alvaro Herrera wrote: Robert's proposal is when reading a page, if dirty HOT-clean it; if not dirty, also HOT-clean it but only 5 times in each scan. This runs HOT-cleanup some

Re: [HACKERS] raw output from copy

2015-04-15 Thread Peter Eisentraut
On 4/10/15 5:26 PM, Pavel Stehule wrote: Hi I wrote a prototype of this patch, and it works well postgres=# set client_encoding to 'latin2'; SET Time: 1.488 ms postgres=# \copy (select xmlelement(name xx, d) from d) to ~/d.xml (format 'raw') COPY 1 Time: 1.108 ms postgres=# copy

Re: [HACKERS] Turning off HOT/Cleanup sometimes

2015-04-15 Thread Simon Riggs
On 15 April 2015 at 16:01, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Simon Riggs wrote: On 15 April 2015 at 12:39, Robert Haas robertmh...@gmail.com wrote: On 04/15/2015 05:44 PM, Alvaro Herrera wrote: Robert's proposal is when reading a page, if dirty HOT-clean it; if not dirty, also

Re: [HACKERS] raw output from copy

2015-04-15 Thread Pavel Stehule
It would be nice, but it is not true. You can get correct non utf8 xml with encoding specification only when binary mode is used. Psql doesn't support binary mode. Regards Pavel Dne 15. 4. 2015 22:06 napsal uživatel Peter Eisentraut pete...@gmx.net: On 4/10/15 5:26 PM, Pavel Stehule wrote:

Re: [HACKERS] [COMMITTERS] pgsql: Move pg_upgrade from contrib/ to src/bin/

2015-04-15 Thread Alvaro Herrera
Andrew Dunstan wrote: Yes, we do want support for testmodules. I think that needs to be built into src/tools/msvc, probably in vcregress.pl. Once we have that the buildfarm changes will be trivial. But if that's not forthcoming quickly I can just avoid the step on msvc for now. Well, *I*

[HACKERS] Use outerPlanState() consistently in executor code

2015-04-15 Thread Qingqing Zhou
In executor context, outerPlanState(node) is the same as node-ss.ps.lefttree. We follow this in most places except a few. This patch clean up the outliers and might save us a few instructions by removing indirection. Most of changes are trivial. Except I take out an outerPlan nullable check in

Re: [HACKERS] reparsing query

2015-04-15 Thread Qingqing Zhou
On Wed, Apr 15, 2015 at 2:04 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: His old posting: https://www.postgresql.org/message-id/1247323023.16438.35.camel%40ab-desktop Is this a proposal to have a better formatted (JSON etc) debug_print_parse results? Thanks, Qingqing -- Sent via

[HACKERS] PATCH: default_index_tablespace

2015-04-15 Thread jltallon
Hi, This small patch implements a new GUC (default_index_tablespace) plus supporting code. Originated from a customer request, the feature intends to make creation of indexes on SSD-backed tablespaces easy and convenient (almost transparent) for users: the DBA can just set it and indexes will

Re: [HACKERS] PATCH: default_index_tablespace

2015-04-15 Thread Tom Lane
jltal...@adv-solutions.net writes: This small patch implements a new GUC (default_index_tablespace) plus supporting code. Originated from a customer request, the feature intends to make creation of indexes on SSD-backed tablespaces easy and convenient (almost transparent) for users: the

Re: [HACKERS] inherit support for foreign tables

2015-04-15 Thread Etsuro Fujita
On 2015/04/15 3:52, Alvaro Herrera wrote: On 4/14/15 5:49 AM, Etsuro Fujita wrote: postgres=# create foreign table ft1 (c1 int) server myserver options (table_name 't1'); CREATE FOREIGN TABLE postgres=# create foreign table ft2 (c1 int) server myserver options (table_name 't2'); CREATE FOREIGN

Re: [HACKERS] reparsing query

2015-04-15 Thread Qingqing Zhou
On Wed, Apr 15, 2015 at 5:19 PM, Lukas Fittl lu...@fittl.com wrote: It'd be interesting to explore if there is some way to make this less hack-ish, and enable tools to parse queries in a better way. Essentially what is needed is some way to reliably translate SQL into an AST-like output, from

Re: [HACKERS] TAP tests of pg_rewind not stopping servers used for the tests

2015-04-15 Thread Michael Paquier
On Thu, Apr 16, 2015 at 1:57 AM, Heikki Linnakangas wrote: Thanks, committed. I kept the END block, though, so that we still clean up if the test dies with an exception. That makes sense. Thanks. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] [COMMITTERS] pgsql: Move pg_upgrade from contrib/ to src/bin/

2015-04-15 Thread Alvaro Herrera
Michael Paquier wrote: On Thu, Apr 16, 2015 at 4:15 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Well, *I* can't write the MSVC patch, but I can't find anyone to volunteer some time either :-( I think it's best to have MSVC skip the step and have the Makefile-based animals run it.

Re: [HACKERS] PATCH: default_index_tablespace

2015-04-15 Thread Stephen Frost
* Bruce Momjian (br...@momjian.us) wrote: On Wed, Apr 15, 2015 at 07:12:11PM -0400, Tom Lane wrote: jltal...@adv-solutions.net writes: This small patch implements a new GUC (default_index_tablespace) plus supporting code. Originated from a customer request, the feature intends to make

Re: [HACKERS] Improve sleep processing of pg_rewind TAP tests

2015-04-15 Thread Alvaro Herrera
Michael Paquier wrote: However after discussion with a colleague we have noticed that those values may not be enough in slow environments, a value of up to 10s being sometimes needed after promotion to make tests pass. Yeah, hardcoded sleep times are not reliable. (/me would love to get rid

Re: [HACKERS] Turning off HOT/Cleanup sometimes

2015-04-15 Thread Peter Geoghegan
On Wed, Apr 15, 2015 at 6:10 AM, Andres Freund and...@anarazel.de wrote: Of course, that applies in all cases, but when the page is already dirty, the cost of pruning it is probably quite small - we're going to have to write the page anyway, and pruning it before it gets evicted (perhaps

Re: [HACKERS] PATCH: default_index_tablespace

2015-04-15 Thread Bruce Momjian
On Wed, Apr 15, 2015 at 07:12:11PM -0400, Tom Lane wrote: jltal...@adv-solutions.net writes: This small patch implements a new GUC (default_index_tablespace) plus supporting code. Originated from a customer request, the feature intends to make creation of indexes on SSD-backed

Re: [HACKERS] PATCH: default_index_tablespace

2015-04-15 Thread Amit Kapila
On Thu, Apr 16, 2015 at 8:01 AM, Bruce Momjian br...@momjian.us wrote: On Wed, Apr 15, 2015 at 07:12:11PM -0400, Tom Lane wrote: jltal...@adv-solutions.net writes: This small patch implements a new GUC (default_index_tablespace) plus supporting code. Originated from a customer

Re: [HACKERS] reparsing query

2015-04-15 Thread Lukas Fittl
On Wed, Apr 15, 2015 at 8:39 PM, Qingqing Zhou zhouqq.postg...@gmail.com wrote: It is not difficult to output parsed query in some tool readable format but it comes with a maintain overhead: once tools rely on it, we have to conform to some schema continuously, like the xml/xmlns. Do we want

Re: [HACKERS] reparsing query

2015-04-15 Thread Lukas Fittl
On Wed, Apr 15, 2015 at 2:43 PM, Qingqing Zhou zhouqq.postg...@gmail.com wrote: Is this a proposal to have a better formatted (JSON etc) debug_print_parse results? I've run into the need for this as well for monitoring purposes, my solution was to compile the needed object files into a

[HACKERS] Improve sleep processing of pg_rewind TAP tests

2015-04-15 Thread Michael Paquier
Hi all, TAP tests of pg_rewind are using in 2 places hardcoded values to wait for a given amount of time for some events. In HEAD, those things are: 1) Wait for 1s for standby to catch up. 2) Wait for 2s for promotion of standby. However after discussion with a colleague we have noticed that

Re: [HACKERS] Improve sleep processing of pg_rewind TAP tests

2015-04-15 Thread Michael Paquier
On Thu, Apr 16, 2015 at 12:51 PM, Alvaro Herrera wrote: Michael Paquier wrote: However after discussion with a colleague we have noticed that those values may not be enough in slow environments, a value of up to 10s being sometimes needed after promotion to make tests pass. Yeah, hardcoded

Re: [HACKERS] [COMMITTERS] pgsql: Move pg_upgrade from contrib/ to src/bin/

2015-04-15 Thread Michael Paquier
On Thu, Apr 16, 2015 at 4:15 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Andrew Dunstan wrote: Yes, we do want support for testmodules. I think that needs to be built into src/tools/msvc, probably in vcregress.pl. Once we have that the buildfarm changes will be trivial. But if that's

Re: [HACKERS] Clock sweep not caching enough B-Tree leaf pages?

2015-04-15 Thread Martijn van Oosterhout
On Wed, Apr 15, 2015 at 12:37:44AM -0400, Robert Haas wrote: I think such a solution will be good for the cases when many evictions needs to be performed to satisfy the workload, OTOH when there are not too many evictions that needs to be done, in such a case some of the buffers that are

Re: [HACKERS] reparsing query

2015-04-15 Thread Alvaro Herrera
Qingqing Zhou wrote: On Wed, Apr 15, 2015 at 1:40 PM, Andrzej Barszcz abus...@gmail.com wrote: I knock once again with this : reparse query to XML ( last knock 5-6 years before) . What exactly reparse query to XML does? His old posting:

Re: [HACKERS] Clock sweep not caching enough B-Tree leaf pages?

2015-04-15 Thread Greg Stark
On Wed, Apr 15, 2015 at 5:26 AM, Robert Haas robertmh...@gmail.com wrote: The way our cache works we promote when a buffer is accessed but we only demote when a buffer is flushed. We flush a lot less often than we touch buffers so it's not surprising that the cache ends up full of buffers that

Re: [HACKERS] initdb -S and tablespaces

2015-04-15 Thread Abhijit Menon-Sen
At 2015-04-06 10:16:36 -0300, alvhe...@2ndquadrant.com wrote: Well, we have many things that can be set as symlinks; some you can have initdb create the links for you (initdb --xlogdir), others you can move manually. Looking at sendDir() in backend/replication/basebackup.c, I notice that the

Re: [HACKERS] FPW compression leaks information

2015-04-15 Thread Heikki Linnakangas
On 04/10/2015 05:17 AM, Robert Haas wrote: I bet that there are at least 1000 covert channel attacks that are more practically exploitable than this. When this is anywhere near the top of the list of things to worry about, I recommend we throw a huge party and then fly home in our

Re: [HACKERS] Turning off HOT/Cleanup sometimes

2015-04-15 Thread Simon Riggs
On 14 April 2015 at 21:53, Robert Haas robertmh...@gmail.com wrote: Peter commented previously that README.HOT should get an update. The relevant section seems to be When can/should we prune or defragment?. That's easy enough to change once we agree to commit. I wonder if it would be a

Re: [HACKERS] Make more portable TAP tests of initdb

2015-04-15 Thread Michael Paquier
On Wed, Apr 15, 2015 at 2:38 PM, Noah Misch wrote: Solaris 10 ships Perl 5.8.4, and RHEL 5.11 ships Perl 5.8.8. Therefore, Perl installations lacking this File::Path feature will receive vendor support for years to come. Replacing the use of keep_root with rmtree+mkdir will add 2-10 lines of

Re: [HACKERS] PATCH: adaptive ndistinct estimator v4

2015-04-15 Thread Jeff Janes
On Tue, Mar 31, 2015 at 12:02 PM, Tomas Vondra tomas.von...@2ndquadrant.com wrote: Hi all, attached is v4 of the patch implementing adaptive ndistinct estimator. Hi Tomas, I have a case here where the adaptive algorithm underestimates ndistinct by a factor of 7 while the default estimator

Re: [HACKERS] initdb -S and tablespaces

2015-04-15 Thread Abhijit Menon-Sen
At 2015-04-15 11:40:34 +0530, a...@2ndquadrant.com wrote: Still, thanks to the example in basebackup.c, I've got most of a patch that should follow any symlinks in PGDATA. I notice that src/bin/pg_rewind/copy_fetch.c has a traverse_datadir() function that does what we want (but it recurses

Re: [HACKERS] [COMMITTERS] pgsql: Move pg_upgrade from contrib/ to src/bin/

2015-04-15 Thread Peter Eisentraut
On 4/14/15 8:32 PM, Peter Eisentraut wrote: Move pg_upgrade from contrib/ to src/bin/ Oh dear. It appears the buildfarm client code needs to be updated to support this. How do we do this? (I guess the critters that are still green are not running this test.) Should I revert this patch while