Re: [HACKERS] Declarative partitioning - another take

2016-11-30 Thread Robert Haas
On Tue, Nov 29, 2016 at 6:24 AM, Amit Langote wrote: > # All times in seconds (on my modestly-powerful development VM) > # > # nrows = 10,000,000 generated using: > # > # INSERT INTO $tab > # SELECT '$last'::date - ((s.id % $maxsecs + 1)::bigint || 's')::interval, >

[HACKERS] postgres 1 个(共 2 个) can pg 9.6 vacuum freeze skip page on index?

2016-11-30 Thread xu jian
Hello, Please execute me if I am using the wrong mailing list, but I ask the question in pgsql-admin, looks like no one know the answer. we upgraded our pg db to 9.6, as we know, pg9.6 doesn't need full table scan in vacuum freeze.

Re: [HACKERS] Re: [COMMITTERS] pgsql: Build HTML documentation using XSLT stylesheets by default

2016-11-30 Thread Tom Lane
Peter Eisentraut writes: > On 11/16/16 3:59 PM, Peter Eisentraut wrote: >> On my machine and on the build farm, the performance now almost matches >> the DSSSL build. Still sucks for me on an up-to-date RHEL6 box: about 1m5s to build oldhtml, about 4m50s to

Re: [HACKERS] Minor correction in alter_table.sgml

2016-11-30 Thread Amit Langote
Hi Stephen, On Thu, Dec 1, 2016 at 12:24 AM, Stephen Frost wrote: > Amit, > > * Amit Langote (langote_amit...@lab.ntt.co.jp) wrote: >> Perhaps, it should say something like: >> >> All the actions except RENAME, SET TABLESPACE (when using the ALL IN >> TABLESPACE form) and SET

Re: [HACKERS] patch: function xmltable

2016-11-30 Thread Pavel Stehule
Dne 30. 11. 2016 14:53 napsal uživatel "Pavel Stehule" < pavel.steh...@gmail.com>: > > > > 2016-11-30 13:38 GMT+01:00 Alvaro Herrera : >> >> Pavel Stehule wrote: >> > 2016-11-30 2:40 GMT+01:00 Craig Ringer : >> > >> > > On 30 November 2016 at 05:36,

Re: [HACKERS] Declarative partitioning - another take

2016-11-30 Thread Amit Langote
On Thu, Dec 1, 2016 at 12:48 AM, Robert Haas wrote: > On Fri, Nov 25, 2016 at 5:49 AM, Amit Langote wrote: >> On 2016/11/25 11:44, Robert Haas wrote: >>> On Thu, Nov 24, 2016 at 6:13 AM, Amit Langote wrote: Also, it does nothing to help the undesirable situation that

Re: [HACKERS] Minor correction in alter_table.sgml

2016-11-30 Thread Tom Lane
Stephen Frost writes: > Seems like this would be a bit better: > -- > All the actions, when acting on a single table and not using the ALL IN > TABLESPACE form, except RENAME and SET SCHEMA, can be combined into a > list of multiple alterations to be applied. > -- >

Re: [HACKERS] pgsql: Add putenv support for msvcrt from Visual Studio 2013

2016-11-30 Thread Christian Ullrich
* From: Michael Paquier > With 0005 I am seeing a compilation failure: you need to have the > declarations in the _MSC_VER block at the beginning of the routine. It Sorry, too used to C++. > would be nice to mention in a code comment that this what Noah has > mentioned upthread: if a CRT loads

Re: [HACKERS] Mail thread references in commits

2016-11-30 Thread Heikki Linnakangas
On 11/30/2016 04:52 PM, Peter Eisentraut wrote: On 11/27/16 8:37 AM, Magnus Hagander wrote: Ok, we now have it. https://postgr.es/m/messageid will redirect to that messageid in the main archives. I like the idea of recording the location of the discussion, but I'm not fond of the URL

Re: [HACKERS] GIN non-intrusive vacuum of posting tree

2016-11-30 Thread Andrew Borodin
Here is v1 of the patch. Now it has changes for README and contains more comments clarifying changes of locking model. Also I will elaborate some more on what is patched. Main portion of changes is made to function ginVacuumPostingTreeLeaves(). Before the patch it was traversing tree in

Re: [HACKERS] Re: [COMMITTERS] pgsql: Build HTML documentation using XSLT stylesheets by default

2016-11-30 Thread Peter Eisentraut
On 11/16/16 3:59 PM, Peter Eisentraut wrote: >>> Build HTML documentation using XSLT stylesheets by default >>> >>> The old DSSSL build is still available for a while using the make >>> target >>> "oldhtml". >> >> This xslt build takes 8+ minutes, compared to barely 1 minute for >> 'oldhtml'.

[HACKERS] Minor correction in alter_table.sgml

2016-11-30 Thread Amit Langote
The following sentence in the ALTER TABLE documentation is not entirely accurate: "All the actions except RENAME, SET TABLESPACE and SET SCHEMA can be combined into a list of multiple alterations to apply in parallel." SET TABLESPACE (in the ALTER TABLE form) can be combined with other

Re: [HACKERS] Minor correction in alter_table.sgml

2016-11-30 Thread Stephen Frost
Amit, * Amit Langote (langote_amit...@lab.ntt.co.jp) wrote: > Perhaps, it should say something like: > > All the actions except RENAME, SET TABLESPACE (when using the ALL IN > TABLESPACE form) and SET SCHEMA can be combined into a list of multiple > alterations to apply in parallel. Seems like

Re: [HACKERS] Declarative partitioning - another take

2016-11-30 Thread Robert Haas
On Fri, Nov 25, 2016 at 5:49 AM, Amit Langote wrote: > On 2016/11/25 11:44, Robert Haas wrote: >> On Thu, Nov 24, 2016 at 6:13 AM, Amit Langote wrote: >>> Also, it does nothing to help the undesirable situation that one can >>> insert a row with a null partition key

Re: [HACKERS] Mail thread references in commits

2016-11-30 Thread Andrew Dunstan
On 11/30/2016 10:46 AM, Heikki Linnakangas wrote: Agreed. I just did my first commit with the shortened URL, and I didn't like it. If we want to use URLs, let's use the canonical https://www.postgresql.org/message-id/ format. Do we know of an actual length limit that is useful to aim

Re: [HACKERS] pgbench - allow backslash continuations in \set expressions

2016-11-30 Thread Tom Lane
Rafia Sabih writes: > On Wed, Nov 9, 2016 at 3:28 PM, Fabien COELHO wrote: +1. My vote is for backslash continuations. >> I'm fine with that! > Looks good to me also. I concur that we don't want implicit continuation; that creates too

Re: [HACKERS] Random number generation, take two

2016-11-30 Thread Heikki Linnakangas
On 11/30/2016 09:05 PM, Alvaro Herrera wrote: Heikki Linnakangas wrote: On 11/30/2016 09:01 AM, Michael Paquier wrote: It is important that this value [nonce] be different for each authentication (see [RFC4086] for more details on how to achieve this) So the nonces need to be different for

Re: [HACKERS] Parallel execution and prepared statements

2016-11-30 Thread Robert Haas
On Tue, Nov 29, 2016 at 6:24 AM, Amit Kapila wrote: > On Tue, Nov 29, 2016 at 4:40 PM, Albe Laurenz wrote: >> Amit Kapila wrote: But with Tobias' complete patch "make installcheck-world" succeeds. >>> >>> Okay. I have looked into patch

Re: [HACKERS] Re: [COMMITTERS] pgsql: Build HTML documentation using XSLT stylesheets by default

2016-11-30 Thread Tom Lane
I wrote: > Still sucks for me on an up-to-date RHEL6 box: about 1m5s to build oldhtml, > about 4m50s to build html, both starting after "make maintainer-clean" in > the doc/src/sgml/ subdirectory. However, speed may be the least of its problems. I just noticed that it's inserting commas at

Re: [HACKERS] Mail thread references in commits

2016-11-30 Thread Greg Stark
On 30 November 2016 at 16:19, Andrew Dunstan wrote: > > https://www.postgresql.org/message-id/cab7npqthydyf-fo+fzvxrhz-7_hptm4rodbcsy9-noqhvet...@mail.gmail.com > > I'll be interested to know if it breaks anyone's MUA. If it doesn't all we > will be arguing about are

[HACKERS] Fix typo in ecpg.sgml

2016-11-30 Thread Tobias Bussmann
Hi, there is a missing "EXEC" in ecpg.sgml in the list of transaction management commands. Attached a trivial patch to fix this. Best regards Tobias ecpg-doc-typo.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] Random number generation, take two

2016-11-30 Thread Alvaro Herrera
Heikki Linnakangas wrote: > On 11/30/2016 09:01 AM, Michael Paquier wrote: > > It is important that this value [nonce] be different for each > > authentication (see [RFC4086] for more details on how to achieve > > this) > > So the nonces need to be different for each session, to avoid replay >

Re: [HACKERS] EvalPlanQual() doesn't follow LockTuple() pattern

2016-11-30 Thread Robert Haas
On Tue, Nov 29, 2016 at 6:26 AM, Simon Riggs wrote: > src/backend/access/heap/README.tuplock says we do this... > > LockTuple() > XactLockTableWait() > mark tuple as locked by me > UnlockTuple() > > only problem is we don't... because EvalPlanQualFetch() does this > >

Re: [HACKERS] Hash Indexes

2016-11-30 Thread Robert Haas
On Wed, Nov 23, 2016 at 8:50 AM, Amit Kapila wrote: > [ new patch ] Committed with some further cosmetic changes. I guess I won't be very surprised if this turns out to have a few bugs yet, but I think it's in fairly good shape at this point. I think it would be worth

Re: [HACKERS] pgsql: Add putenv support for msvcrt from Visual Studio 2013

2016-11-30 Thread Michael Paquier
On Thu, Dec 1, 2016 at 1:24 AM, Christian Ullrich wrote: > * From: Michael Paquier > >> With 0005 I am seeing a compilation failure: you need to have the >> declarations in the _MSC_VER block at the beginning of the routine. It > > Sorry, too used to C++. > >> would be nice

Re: [HACKERS] Logical Replication WIP

2016-11-30 Thread Peter Eisentraut
I have taken the libpqwalreceiver refactoring patch and split it into two: one for the latch change, one for the API change. I have done some mild editing. These two patches are now ready to commit in my mind. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development,

Re: [HACKERS] Add support for restrictive RLS policies

2016-11-30 Thread Stephen Frost
* Stephen Frost (sfr...@snowman.net) wrote: > * Jeevan Chalke (jeevan.cha...@enterprisedb.com) wrote: > > 4. It will be good if we have an example for this in section > > "5.7. Row Security Policies" > > I haven't added one yet, but will plan to do so. I've now added and cleaned up the Row

Re: [HACKERS] PSQL commands: \quit_if, \quit_unless

2016-11-30 Thread Fabien COELHO
Hello Andrew, I cannot remember a language with elseif* variants, and I find them quite ugly, so from an aethetical point of view I would prefer to avoid that... On the other hand having an "else if" capability makes sense (eg do something slightly different for various versions of pg), so

Re: [HACKERS] postgres_fdw : altering foreign table not invalidating prepare statement execution plan.

2016-11-30 Thread Etsuro Fujita
On 2016/11/22 15:24, Etsuro Fujita wrote: On 2016/11/22 4:49, Tom Lane wrote: Etsuro Fujita writes: On 2016/11/10 5:17, Tom Lane wrote: I think there's a very good argument that we should just treat any inval in pg_foreign_data_wrapper as a reason to blow away

Re: [HACKERS] Push down more UPDATEs/DELETEs in postgres_fdw

2016-11-30 Thread Etsuro Fujita
On 2016/11/23 20:28, Rushabh Lathia wrote: On Tue, Nov 22, 2016 at 6:24 PM, Etsuro Fujita > wrote: 1) -static void deparseExplicitTargetList(List *tlist, List **retrieved_attrs, +static void

Re: [HACKERS] postgres_fdw : altering foreign table not invalidating prepare statement execution plan.

2016-11-30 Thread Amit Langote
Fujita-san, On 2016/11/30 17:25, Etsuro Fujita wrote: > On 2016/11/22 15:24, Etsuro Fujita wrote: >> On 2016/11/22 4:49, Tom Lane wrote: > >>> OK, please update the patch to handle those catalogs that way. > >> Will do. > > Done. I modified the patch so that any inval in pg_foreign_server

[HACKERS] Minor correction in alter_table.sgml

2016-11-30 Thread Amit Langote
The following sentence in the ALTER TABLE documentation is not entirely accurate: "All the actions except RENAME, SET TABLESPACE and SET SCHEMA can be combined into a list of multiple alterations to apply in parallel." SET TABLESPACE (in the ALTER TABLE form) can be combined with other

Re: [HACKERS] postgres_fdw : altering foreign table not invalidating prepare statement execution plan.

2016-11-30 Thread Etsuro Fujita
On 2016/11/30 17:53, Amit Langote wrote: On 2016/11/30 17:25, Etsuro Fujita wrote: Done. I modified the patch so that any inval in pg_foreign_server also blows the whole plan cache. I noticed the following addition: + CacheRegisterSyscacheCallback(FOREIGNDATAWRAPPEROID,

Re: [HACKERS] Fix checkpoint skip logic on idle systems by tracking LSN progress

2016-11-30 Thread Amit Kapila
On Mon, Nov 21, 2016 at 11:08 AM, Michael Paquier wrote: > On Tue, Nov 15, 2016 at 9:59 PM, Amit Kapila wrote: >> On Tue, Nov 15, 2016 at 9:27 AM, Kyotaro HORIGUCHI >> wrote: >>> The term "WAL activity' is used

Re: [HACKERS] XactLockTableWait doesn't set wait_event correctly

2016-11-30 Thread Simon Riggs
On 29 November 2016 at 19:03, Amit Kapila wrote: > how will we distinguish it when some > process is actually waiting on tuple lock? The point is that both those actions are waiting for a tuple lock. Obtaining a tuple lock requires two separate actions: First we do

Re: [HACKERS] Proposal: scan key push down to heap [WIP]

2016-11-30 Thread Dilip Kumar
On Tue, Nov 29, 2016 at 11:21 PM, Robert Haas wrote: > On Mon, Nov 28, 2016 at 11:17 PM, Dilip Kumar wrote: >> Actually we want to call slot_getattr instead heap_getattr, because of >> problem mentioned by Andres upthread and we also saw in test

Re: [HACKERS] Random number generation, take two

2016-11-30 Thread Heikki Linnakangas
On 11/30/2016 09:01 AM, Michael Paquier wrote: On Tue, Nov 29, 2016 at 10:02 PM, Heikki Linnakangas wrote: Phew, this has been way more complicated than it seemed at first. Thoughts? One of the goals of this patch is to be able to have a strong random function as well for

Re: [HACKERS] PSQL commands: \quit_if, \quit_unless

2016-11-30 Thread Andrew Dunstan
On 11/30/2016 03:47 AM, Fabien COELHO wrote: Hello Andrew, I cannot remember a language with elseif* variants, and I find them quite ugly, so from an aethetical point of view I would prefer to avoid that... On the other hand having an "else if" capability makes sense (eg do something

Re: [HACKERS] Radix tree for character conversion

2016-11-30 Thread Heikki Linnakangas
On 10/31/2016 06:11 PM, Daniel Gustafsson wrote: On 27 Oct 2016, at 09:23, Kyotaro HORIGUCHI wrote: At Tue, 25 Oct 2016 12:23:48 +0300, Heikki Linnakangas wrote in <08e7892a-d55c-eefe-76e6-7910bc8dd...@iki.fi> [..] The perl scripts are

Re: [HACKERS] patch: function xmltable

2016-11-30 Thread Alvaro Herrera
Pavel Stehule wrote: > 2016-11-30 2:40 GMT+01:00 Craig Ringer : > > > On 30 November 2016 at 05:36, Pavel Stehule > > wrote: > > > > > The problem is in unreserved keyword "PASSING" probably. > > > > Yeah, I think that's what I hit when trying to

Re: [HACKERS] move collation import to backend

2016-11-30 Thread Peter Eisentraut
On 11/29/16 2:53 PM, Andres Freund wrote: > On 2016-11-29 12:16:37 -0500, Peter Eisentraut wrote: >> On 11/12/16 10:38 AM, Andres Freund wrote: /* * Also forbid matching an any-encoding entry. This test of course is not * backed up by the unique index, but it's not

Re: [HACKERS] Random number generation, take two

2016-11-30 Thread Michael Paquier
On Wed, Nov 30, 2016 at 8:51 PM, Heikki Linnakangas wrote: > On 11/30/2016 09:01 AM, Michael Paquier wrote: > I was thinking that with --disable-strong-random, we'd use plain random() in > libpq as well. I believe SCRAM is analogous to the MD5 salt generation in > the backend, in

[HACKERS] monitoring.sgml - clarify length of query text displayed in pg_stat_statements

2016-11-30 Thread Ian Barwick
Hi Small doc patch to clarify how much of the query text is show in pg_stat_statements and a link to the relevant GUC. Regards Ian Barwick -- Ian Barwick http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services diff --git

Re: [HACKERS] pgcrypto compilation error due to stack-allocated EVP_CIPHER_CTX

2016-11-30 Thread Andreas Karlsson
On 12/01/2016 02:48 AM, Andres Freund wrote: It appears openssl has removed the public definition of EVP_CIPHER_CTX leading to pgcrypto failing with: Yes, I believe this is one of the changes in OpenSSL 1.1. I guess you might be the first one to try to compile with 1.1 since

Re: [HACKERS] PATCH: two slab-like memory allocators

2016-11-30 Thread Tomas Vondra
Dne 11/27/2016 v 11:02 PM Andres Freund napsal(a): On 2016-11-27 22:21:49 +0100, Petr Jelinek wrote: On 27/11/16 21:47, Andres Freund wrote: Hi, +typedef struct SlabBlockData *SlabBlock; /* forward reference */ +typedef struct SlabChunkData *SlabChunk; Can we please not

Re: [HACKERS] Re: [COMMITTERS] pgsql: Build HTML documentation using XSLT stylesheets by default

2016-11-30 Thread Peter Eisentraut
On 11/30/16 1:52 PM, Tom Lane wrote: > However, speed may be the least of its problems. I just noticed that it's > inserting commas at random places in syntax summaries :-(. For instance, > the "overlay" entry in table 9.8 looks like > > overlay(string, placing > string, from int [for int]) >

Re: [HACKERS] pg_sequence catalog

2016-11-30 Thread Peter Eisentraut
On 11/11/16 10:06 PM, Andreas Karlsson wrote: > As pointed out by Peter this patch also requires the changes to > pg_upgrade. I have not looked at those patches. The required changes to pg_upgrade have been committed, so that will work now. > - The pg_dump tests fails due to the pg_dump code

Re: [HACKERS] Minor correction in alter_table.sgml

2016-11-30 Thread Amit Langote
On 2016/12/01 1:17, Tom Lane wrote: > Stephen Frost writes: >> Seems like this would be a bit better: > >> -- >> All the actions, when acting on a single table and not using the ALL IN >> TABLESPACE form, except RENAME and SET SCHEMA, can be combined into a >> list of

[HACKERS] pgcrypto compilation error due to stack-allocated EVP_CIPHER_CTX

2016-11-30 Thread Andres Freund
Hi, It appears openssl has removed the public definition of EVP_CIPHER_CTX leading to pgcrypto failing with: /home/andres/src/postgresql/contrib/pgcrypto/openssl.c:253:17: error: field ‘evp_ctx’ has incomplete type EVP_CIPHER_CTX evp_ctx; ^~~

Re: [HACKERS] Re: [COMMITTERS] pgsql: Build HTML documentation using XSLT stylesheets by default

2016-11-30 Thread Tom Lane
Peter Eisentraut writes: > OK, I got it. The component of concern is the DocBook XSL stylesheets, > called docbook-style-xsl on RH-like systems (docbook-xsl on Debian). If > it runs too slow, it's probably too old. OK, I updated docbook-style-xsl to 1.79.1

Re: [HACKERS] pgbench - allow backslash continuations in \set expressions

2016-11-30 Thread Fabien COELHO
Hello Tom, In short, I want to mark this RWF for today and ask for a version that applies globally to all backslash commands in psql and pgbench. Hmmm. The modus operandi of backslash command scanning is to switch to possibly another scanner just after scanning the backslash command, so I

Re: [HACKERS] Logical Replication WIP

2016-11-30 Thread Petr Jelinek
On 30/11/16 22:37, Peter Eisentraut wrote: > I have taken the libpqwalreceiver refactoring patch and split it into > two: one for the latch change, one for the API change. I have done some > mild editing. > > These two patches are now ready to commit in my mind. > Hi, looks good to me, do you

Re: [HACKERS] pgbench - allow backslash continuations in \set expressions

2016-11-30 Thread Tom Lane
Fabien COELHO writes: >> In short, I want to mark this RWF for today and ask for a version that >> applies globally to all backslash commands in psql and pgbench. > I'm not sure such a simple feature deserves so much energy. It's not a "simple feature". As you have it,

Re: [HACKERS] Hash Indexes

2016-11-30 Thread Amit Kapila
On Thu, Dec 1, 2016 at 2:18 AM, Robert Haas wrote: > On Wed, Nov 23, 2016 at 8:50 AM, Amit Kapila wrote: >> [ new patch ] > > Committed with some further cosmetic changes. > Thank you very much. > I think it would be worth testing this code with

Re: [HACKERS] Write Ahead Logging for Hash Indexes

2016-11-30 Thread Amit Kapila
On Wed, Nov 9, 2016 at 7:40 PM, Amit Kapila wrote: > On Tue, Nov 8, 2016 at 10:56 PM, Jeff Janes wrote: >> >> Unless we want to wait until that work is committed before doing more review >> and testing on this. >> > > The concurrent hash index patch

Re: [HACKERS] Broken SSL tests in master

2016-11-30 Thread Michael Paquier
On Fri, Nov 25, 2016 at 3:33 PM, Andreas Karlsson wrote: > On 11/25/2016 07:19 AM, Tsunakawa, Takayuki wrote: >> >> Specifying multiple hosts is a new feature to be introduced in v10, so >> that's here: >> >> https://www.postgresql.org/docs/devel/static/libpq-connect.html > > >

Re: [HACKERS] Remove the comment on the countereffectiveness of large shared_buffers on Windows

2016-11-30 Thread Peter Eisentraut
On 11/7/16 12:43 AM, amul sul wrote: > On Mon, Nov 7, 2016 at 10:46 AM, Tsunakawa, Takayuki > wrote: >> >> The third paragraph may be redundant, I'm a bit inclined to leave it for >> kindness and completeness. The attached revised patch just correct the >>

Re: [HACKERS] Mail thread references in commits

2016-11-30 Thread Peter Eisentraut
On 11/27/16 8:37 AM, Magnus Hagander wrote: > Ok, we now have it. https://postgr.es/m/messageid will redirect to that > messageid in the main archives. I like the idea of recording the location of the discussion, but I'm not fond of the URL shortener. Besides the general problem that URL

Re: [HACKERS] Improve hash-agg performance

2016-11-30 Thread Andres Freund
Hi, On 2016-11-03 04:07:21 -0700, Andres Freund wrote: > Hi, > > There's two things I found while working on faster expression > evaluation, slot deforming and batched execution. As those two issues > often seemed quite dominant cost-wise it seemed worthwhile to evaluate > them independently. > >

Re: [HACKERS] Re: [COMMITTERS] pgsql: Build HTML documentation using XSLT stylesheets by default

2016-11-30 Thread Pavel Stehule
2016-12-01 5:37 GMT+01:00 Tom Lane : > Peter Eisentraut writes: > > OK, I got it. The component of concern is the DocBook XSL stylesheets, > > called docbook-style-xsl on RH-like systems (docbook-xsl on Debian). If > > it runs too slow,

Re: [HACKERS] patch: function xmltable

2016-11-30 Thread Pavel Stehule
2016-11-30 13:38 GMT+01:00 Alvaro Herrera : > Pavel Stehule wrote: > > 2016-11-30 2:40 GMT+01:00 Craig Ringer : > > > > > On 30 November 2016 at 05:36, Pavel Stehule > > > wrote: > > > > > > > The problem is in unreserved