Re: [HACKERS] SCRAM in the PG 10 release notes

2017-09-13 Thread Heikki Linnakangas
On 09/12/2017 04:09 AM, Noah Misch wrote: On Wed, May 10, 2017 at 10:50:51PM -0400, Bruce Momjian wrote: On Mon, May 1, 2017 at 08:12:51AM -0400, Robert Haas wrote: On Tue, Apr 25, 2017 at 10:16 PM, Bruce Momjian wrote: Well, we could add "MD5 users are encouraged to switch to SCRAM-SHA-256"

[HACKERS] Binary search in fmgr_isbuiltin() is a bottleneck.

2017-09-13 Thread Andres Freund
Hi, Surprising myself I discovered that in workloads that do a large number of fmgr_info* lookups, fmgr_isbuiltin() is actually quite the bottleneck. In my development build we have 2765 builtin functions, stored in a 88KB array. Apparently the ~12 steps are quite noticeable. Generally binary sea

Re: [HACKERS] WAL logging problem in 9.4.3?

2017-09-13 Thread Kyotaro HORIGUCHI
At Wed, 13 Sep 2017 17:42:39 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170913.174239.25978735.horiguchi.kyot...@lab.ntt.co.jp> > filterdiff seems to did something wrong.. # to did... The patch is broken by filterdiff so I send a new patch made directly by git format-patch. I c

[HACKERS] SendRowDescriptionMessage() is slow for queries with a lot of columns

2017-09-13 Thread Andres Freund
Hi, When running workloads that include fast queries with a lot of columns, SendRowDescriptionMessage(), and the routines it calls, becomes a bottleneck. Besides syscache lookups (see [1] and [2]) a major cost of that is manipulation of the StringBuffer and the version specific branches in the pe

[HACKERS] Improve catcache/syscache performance.

2017-09-13 Thread Andres Freund
Hi, There's plenty workloads where SearchSysCache()/SearchCatCache() shows up as a major runtime factor. Primarily in workloads with very fast queries. A fair while ago, before I had my commit bit, I'd posted [1]. Looking at the profiles/benchmarks I was easily able to confirm that it still helps

Re: [HACKERS] More efficient truncation of pg_stat_activity query strings

2017-09-13 Thread Andres Freund
On 2017-09-12 00:19:48 -0700, Andres Freund wrote: > Hi, > > I've recently seen a benchmark in which pg_mbcliplen() showed up > prominently. Which it will basically in any benchmark with longer query > strings, but fast queries. That's not that uncommon. > > I wonder if we could avoid the cost of

[HACKERS] pspg - Postgres Pager

2017-09-13 Thread Pavel Stehule
Hi I am sorry for spam - this is just info for not too wide community (I did pre-release), so I am using this mailing list. I wrote new pager designed primary for usage as psql pager. It is tested only on Linux, but it should to work on any ncurses ready platform. It is experiment - less or more

Re: [HACKERS] <> join selectivity estimate question

2017-09-13 Thread Ashutosh Bapat
On Thu, Sep 14, 2017 at 4:30 AM, Tom Lane wrote: > Thomas Munro writes: >> On Wed, Sep 6, 2017 at 11:14 PM, Ashutosh Bapat >> wrote: >>> I added some "stable" tests to your patch taking inspiration from the >>> test SQL file. I think those will be stable across machines and runs. >>> Please let

Re: [HACKERS] <> join selectivity estimate question

2017-09-13 Thread Ashutosh Bapat
On Thu, Sep 14, 2017 at 4:19 AM, Thomas Munro wrote: > On Wed, Sep 6, 2017 at 11:14 PM, Ashutosh Bapat > wrote: >> On Fri, Jul 21, 2017 at 4:10 AM, Thomas Munro >> wrote: >>> That just leaves the question of whether we should try to handle the >>> empty RHS and single-value RHS cases using stati

Re: [HACKERS] psql: new help related to variables are not too readable

2017-09-13 Thread Fabien COELHO
Hello, Personnally I'm fine with a pager, so vertical spacing is fine. I just do not like paging horizontally. ​-1​ [...] ​If I was going to try and read it like a book I'd want the extra white-space to make doing so easier (white-space gives the eye a breather when done with a particular co

Re: [HACKERS] Is it time to kill support for very old servers?

2017-09-13 Thread Andres Freund
Hi, On 2017-09-13 23:39:21 -0400, Tom Lane wrote: > Andres Freund writes: > > Re-upping this topic. > > > On 2016-10-07 10:06:07 -0400, Tom Lane wrote: > >> In the same line, maybe we should kill libpq's support for V2 protocol > >> (which would make the cutoff 7.4). And maybe the server's supp

Re: [HACKERS] Optimise default partition scanning while adding new partition

2017-09-13 Thread Amit Langote
Hi Jeevan, On 2017/09/12 18:22, Jeevan Ladhe wrote: > Commit 6f6b99d1335be8ea1b74581fc489a97b109dd08a introduced default > partitioning support. This commit added a new function > check_default_allows_bound(), > which checks if there exists a row in the default partition that would > belong to > t

Re: [HACKERS] A bug in mapping attributes in ATExecAttachPartition()

2017-09-13 Thread Amit Langote
On 2017/08/07 11:05, Amit Langote wrote: > By the way, bulk of 0004 is refactoring which it seems is what Jeevan's > default partition patch set also includes as one of the patches [1]. It > got a decent amount review from Ashutosh. I broke it down into a separate > patch, so that the patch to ad

Re: [HACKERS] utility commands benefiting from parallel plan

2017-09-13 Thread Rafia Sabih
On Wed, Sep 13, 2017 at 2:29 PM, Haribabu Kommi wrote: > > > On Wed, Sep 13, 2017 at 4:17 PM, Rafia Sabih > wrote: >> >> On Fri, Sep 1, 2017 at 12:31 PM, Haribabu Kommi >> wrote: >> > >> > Hi All, >> > >> > Attached a rebased patch that supports parallelism for the queries >> > that are undernea

Re: [HACKERS] GatherMerge misses to push target list

2017-09-13 Thread Amit Kapila
On Wed, Sep 13, 2017 at 5:30 PM, Rushabh Lathia wrote: > On Wed, Sep 6, 2017 at 10:04 AM, Amit Kapila > wrote: >> > > > This seems like a good optimization. I tried to simulate the test given > in the mail, initially wasn't able to generate the exact test - as index > creation is missing in the t

Re: [HACKERS] [PATCH] Call RelationDropStorage() for broader range of object drops.

2017-09-13 Thread Hadi Moshayedi
To provide more context, in cstore_fdw creating the storage is easy, we only need to hook into CREATE FOREIGN TABLE using event triggers. Removing the storage is not that easy, for DROP FOREIGN TABLE we can use event triggers. But when we do DROP EXTENSION, the event triggers don't get fired (becau

[HACKERS] Warnings "unrecognized node type" for some DDLs with log_statement = 'ddl'

2017-09-13 Thread Michael Paquier
Hi all, While reviewing another patch, I have bumped into a couple of failures when running installcheck if log_statement = 'ddl'. This pops regression failures for 4 tests: object_address, alter_generic, alter_operator and stats_ext involving commands CREATE STATISTICS and ALTER OPERATOR. You ca

Re: [HACKERS] [PATCH] Call RelationDropStorage() for broader range of object drops.

2017-09-13 Thread Hadi Moshayedi
On Wed, Sep 13, 2017 at 12:12 AM, Michael Paquier wrote: > > Foreign tables do not have physical storage assigned to by default. At > least heap_create() tells so, create_storage being set to false for a > foreign table. So there is nothing to clean up normally. Or is > cstore_fdw using directly h

Re: [HACKERS] Is it time to kill support for very old servers?

2017-09-13 Thread Tom Lane
Andres Freund writes: > Re-upping this topic. > On 2016-10-07 10:06:07 -0400, Tom Lane wrote: >> In the same line, maybe we should kill libpq's support for V2 protocol >> (which would make the cutoff 7.4). And maybe the server's support too, >> though that wouldn't save very much code. The argu

Re: [HACKERS] why not parallel seq scan for slow functions

2017-09-13 Thread Amit Kapila
On Wed, Sep 13, 2017 at 9:39 AM, Amit Kapila wrote: > On Tue, Sep 12, 2017 at 5:47 PM, Amit Khandekar > wrote: >> On 5 September 2017 at 14:04, Amit Kapila wrote: >> >> I started with a quick review ... a couple of comments below : >> >> - * If this is a baserel, consider gathering any partial

Re: [HACKERS] proposal: psql: check env variable PSQL_PAGER

2017-09-13 Thread Pavel Stehule
2017-09-13 23:36 GMT+02:00 Thomas Munro : > On Wed, Sep 6, 2017 at 4:12 AM, Pavel Stehule > wrote: > > 2017-09-05 18:06 GMT+02:00 Tom Lane : > >> Pushed, with some fooling with the documentation (notably, > >> re-alphabetizing relevant lists). > >> > > Thank you very much > > I've started setting

Re: [HACKERS] PG 10 release notes

2017-09-13 Thread Tsunakawa, Takayuki
It's embarrassing to ask about such a trivial thing, but I noticed the following line was missing in the latest release note, which was originally in Bruce's website: Remove documented restriction about using large shared buffers on Windows (Takayuki Tsunakawa) Is this intended? Regards Takay

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-09-13 Thread Amit Langote
On 2017/09/14 7:43, Robert Haas wrote: > On Wed, Sep 13, 2017 at 12:56 PM, Ashutosh Bapat > wrote: >> I debugged what happens in case of query "select 1 from t1 union all >> select 2 from t1;" with the current HEAD (without multi-level >> expansion patch attached). It doesn't set partitioned_rels

[HACKERS] Re: [COMMITTERS] pgsql: Use MINVALUE/MAXVALUE instead of UNBOUNDED for range partition b

2017-09-13 Thread Noah Misch
On Wed, Sep 13, 2017 at 12:06:40PM -0400, Robert Haas wrote: > On Wed, Sep 13, 2017 at 10:54 AM, Dean Rasheed > wrote: > > Oracle, MySQL and DB2 all use MINVALUE/MAXVALUE. Actually, Oracle and > > MySQL only use MAXVALUE, not MINVALUE, because they don't allow gaps > > between partitions and the

Re: [HACKERS] Supporting huge pages on Windows

2017-09-13 Thread Tsunakawa, Takayuki
From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Ashutosh Sharma > I have once again tested the latest patch (v14 patch) on Windows and the > results looked fine to me. Basically I have repeated the test cases which > I had done earlier on v8 patch

Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection

2017-09-13 Thread Tsunakawa, Takayuki
From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Tom Lane > The originally reported bug is fixed. Not making any claims about other > bugs ... I'm sorry I couldn't reply to you. I've recently been in a situation where I can't use my time for de

Re: [HACKERS] generated columns

2017-09-13 Thread David Fetter
On Wed, Sep 13, 2017 at 10:09:37AM +0200, Andreas Karlsson wrote: > On 09/13/2017 04:04 AM, Simon Riggs wrote: > >On 31 August 2017 at 05:16, Peter Eisentraut > > wrote: > >>- index support (and related constraint support) > > > >Presumably you can't index a VIRTUAL column. Or at least I don't > >t

Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction

2017-09-13 Thread Peter Eisentraut
On 9/13/17 09:56, Alvaro Herrera wrote: > Tom Lane wrote: >> Peter Eisentraut writes: > >>> - Disallow DROP SUBSCRIPTION in a transaction under certain >>> circumstances, for example if a transaction has previously manipulated >>> the same subscription. > >> ISTM the second of those (refuse to d

Re: [HACKERS] expanding inheritance in partition bound order

2017-09-13 Thread Amit Langote
On 2017/09/14 1:42, Robert Haas wrote: > On Wed, Sep 13, 2017 at 6:02 AM, Amit Langote > wrote: >> It seems to me we don't really need the first patch all that much. That >> is, let's keep PartitionDispatchData the way it is for now, since we don't >> really have any need for it beside tuple-rout

Re: [HACKERS] domain type smashing is expensive

2017-09-13 Thread Andres Freund
Hi, On 2017-09-12 14:28:51 -0400, Robert Haas wrote: > On Tue, Sep 12, 2017 at 1:37 PM, Tom Lane wrote: > > Robert Haas writes: > >> On short-running queries that return a lot of columns, > >> SendRowDescriptionMessage's calls to getBaseTypeAndTypmod() are a > >> noticeable expense. > > > > Yeah

Re: [HACKERS] Race between SELECT and ALTER TABLE NO INHERIT

2017-09-13 Thread Robert Haas
On Mon, Jun 26, 2017 at 4:46 AM, Kyotaro HORIGUCHI wrote: > The cause is that NO INHERIT doesn't take an exlusive lock on the > parent. This allows expand_inherited_rtentry to add the child > relation into appendrel after removal from the inheritance but > still exists. > > I see two ways to fix t

Re: [HACKERS] Is it time to kill support for very old servers?

2017-09-13 Thread Andres Freund
Hi, Re-upping this topic. On 2016-10-07 10:06:07 -0400, Tom Lane wrote: > In the same line, maybe we should kill libpq's support for V2 protocol > (which would make the cutoff 7.4). And maybe the server's support too, > though that wouldn't save very much code. The argument for cutting this > i

Re: [HACKERS] generated columns

2017-09-13 Thread Robert Haas
On Tue, Sep 12, 2017 at 10:04 PM, Simon Riggs wrote: > I think an option to decide whether the default is STORED or VIRTUAL > would be useful. That seems like it could be a bit of a foot-gun. For example, an extension author who uses generated columns will have to be careful to always specify on

Re: [HACKERS] Parallel Hash take II

2017-09-13 Thread Thomas Munro
On Thu, Sep 14, 2017 at 12:51 AM, Prabhat Sahu wrote: > Setting with lower "shared_buffers" and "work_mem" as below, query getting > crash but able to see explain plan. Thanks Prabhat. A small thinko in the batch reset code means that it sometimes thinks the shared skew hash table is present a

Re: [HACKERS] psql: new help related to variables are not too readable

2017-09-13 Thread Tom Lane
"David G. Johnston" writes: >​If I was going to try and read it like a book I'd want the extra > white-space to make doing so easier (white-space gives the eye a breather > when done with a particular concept) - and the length wouldn't really > matter since I'd just make a single pass and be done

Re: [HACKERS] psql: new help related to variables are not too readable

2017-09-13 Thread David G. Johnston
On Wed, Sep 13, 2017 at 12:46 PM, Fabien COELHO wrote: > > Hello Tom, > > Probably it needs some rebase after Tom committed result status variables. >>> >> >> As it is a style thing, ISTM that the patch is ready if most people agree >>> that it is better this way and there is no strong veto again

Re: [HACKERS] <> join selectivity estimate question

2017-09-13 Thread Tom Lane
Thomas Munro writes: > On Wed, Sep 6, 2017 at 11:14 PM, Ashutosh Bapat > wrote: >> I added some "stable" tests to your patch taking inspiration from the >> test SQL file. I think those will be stable across machines and runs. >> Please let me know if those look good to you. > Hmm. But they show

Re: [HACKERS] <> join selectivity estimate question

2017-09-13 Thread Thomas Munro
On Wed, Sep 6, 2017 at 11:14 PM, Ashutosh Bapat wrote: > On Fri, Jul 21, 2017 at 4:10 AM, Thomas Munro > wrote: >> That just leaves the question of whether we should try to handle the >> empty RHS and single-value RHS cases using statistics. My intuition >> is that we shouldn't, but I'll be happ

Re: [HACKERS] [RFC] What would be difficult to make data models pluggable for making PostgreSQL a multi-model database?

2017-09-13 Thread Henry
I was just reading the Postgresql 11 roadmap and it mentions native graph support. I would be interested in following the design work for this. Would this require a the new pluggable storage which is currently in development or would the existing storage engine be sufficient? I am just wondering i

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-09-13 Thread Robert Haas
On Wed, Sep 13, 2017 at 12:56 PM, Ashutosh Bapat wrote: > I debugged what happens in case of query "select 1 from t1 union all > select 2 from t1;" with the current HEAD (without multi-level > expansion patch attached). It doesn't set partitioned_rels in Append > path that gets converted into Appe

Re: [HACKERS] uninterruptible state in 10beta4

2017-09-13 Thread Tom Lane
Andres Freund writes: > Indeed that seems plausible. I guess something like the attached should > fix the issue? Ah, I see you came to the same conclusion I did. But see comment about adding a comment. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-ha

Re: [HACKERS] uninterruptible state in 10beta4

2017-09-13 Thread Tom Lane
Jeff Janes writes: > In 10beta4 and 11dev, If I run the below it enters an uninterruptible > state. After the insert starts, I give 15 or seconds or so until the > memory usage starts to grow due to enqueued triggers checks. Then I can't > interrupt it with either ctrl-C in psql or kill -15 from

Re: [HACKERS] uninterruptible state in 10beta4

2017-09-13 Thread Jeff Janes
On Wed, Sep 13, 2017 at 2:41 PM, Andres Freund wrote: > Hi, > > On 2017-09-13 14:28:34 -0700, Jeff Janes wrote: > > In 10beta4 and 11dev, If I run the below it enters an uninterruptible > > state. After the insert starts, I give 15 or seconds or so until the > > memory usage starts to grow due t

Re: [HACKERS] uninterruptible state in 10beta4

2017-09-13 Thread Andres Freund
Hi, On 2017-09-13 14:28:34 -0700, Jeff Janes wrote: > In 10beta4 and 11dev, If I run the below it enters an uninterruptible > state. After the insert starts, I give 15 or seconds or so until the > memory usage starts to grow due to enqueued triggers checks. Then I can't > interrupt it with either

Re: [HACKERS] proposal: psql: check env variable PSQL_PAGER

2017-09-13 Thread Thomas Munro
On Wed, Sep 6, 2017 at 4:12 AM, Pavel Stehule wrote: > 2017-09-05 18:06 GMT+02:00 Tom Lane : >> Pushed, with some fooling with the documentation (notably, >> re-alphabetizing relevant lists). >> > Thank you very much I've started setting PSQL_PAGER="~/bin/pspg -s0" to try your new column-aware pa

[HACKERS] uninterruptible state in 10beta4

2017-09-13 Thread Jeff Janes
In 10beta4 and 11dev, If I run the below it enters an uninterruptible state. After the insert starts, I give 15 or seconds or so until the memory usage starts to grow due to enqueued triggers checks. Then I can't interrupt it with either ctrl-C in psql or kill -15 from another terminal. I have t

Re: [HACKERS] psql: new help related to variables are not too readable

2017-09-13 Thread Fabien COELHO
Hello Tom, Probably it needs some rebase after Tom committed result status variables. As it is a style thing, ISTM that the patch is ready if most people agree that it is better this way and there is no strong veto against. FWIW, I think it's a bad idea. We already nearly-doubled the vert

Re: [HACKERS] Small patch for pg_basebackup argument parsing

2017-09-13 Thread Pierre Ducroquet
On Wednesday, September 13, 2017 2:06:50 AM CEST Daniel Gustafsson wrote: > > On 05 Jul 2017, at 08:32, Michael Paquier > > wrote:> > > On Wed, Jul 5, 2017 at 2:57 PM, Ryan Murphy wrote: > >> I tried to apply your patch to test it (though reading Robert's last > >> comment it seems we wish to ha

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-09-13 Thread Michael Banck
On Tue, Sep 12, 2017 at 07:38:40PM -0400, Stephen Frost wrote: > Further, really, I think we should provide a utility to do all of the > above instead of using rsync- and that utility should do some additional > things, such as: > > - Check that the control file on the primary and replica show tha

Re: [HACKERS] Bug with pg_basebackup and 'shared' tablespace

2017-09-13 Thread Pierre Ducroquet
On Wednesday, September 13, 2017 6:01:43 PM CEST you wrote: > > On 15 May 2017, at 07:26, Michael Paquier > > wrote:> > > On Tue, May 2, 2017 at 2:28 AM, Pierre Ducroquet wrote: > >> I will submit this patch in the current commit fest. > > > > I have not spotted any flaws in the refactored log

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-09-13 Thread Ashutosh Bapat
On Wed, Sep 13, 2017 at 12:51 PM, Ashutosh Bapat wrote: > On Wed, Sep 13, 2017 at 12:39 AM, Robert Haas wrote: >> On Tue, Sep 12, 2017 at 3:46 AM, Amit Langote >> wrote: >>> In this case, AcquireExecutorLocks will lock all the relations in >>> PlannedStmt.rtable, which must include all partition

Re: [HACKERS] expanding inheritance in partition bound order

2017-09-13 Thread Robert Haas
On Wed, Sep 13, 2017 at 6:02 AM, Amit Langote wrote: > It seems to me we don't really need the first patch all that much. That > is, let's keep PartitionDispatchData the way it is for now, since we don't > really have any need for it beside tuple-routing (EIBO as committed didn't > need it for on

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-09-13 Thread Stephen Frost
Bruce, * Bruce Momjian (br...@momjian.us) wrote: > I have applied the attached patch to show examples of using rsync on > PGDATA and tablespaces, documented that rsync is only useful when in > link mode, and explained more clearly how rsync handles links. You can > see the results here: > >

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use MINVALUE/MAXVALUE instead of UNBOUNDED for range partition b

2017-09-13 Thread Robert Haas
On Wed, Sep 13, 2017 at 10:54 AM, Dean Rasheed wrote: > Oracle, MySQL and DB2 all use MINVALUE/MAXVALUE. Actually, Oracle and > MySQL only use MAXVALUE, not MINVALUE, because they don't allow gaps > between partitions and the first partition implicitly starts at > MINVALUE, so the bounds that we c

Re: [HACKERS] Bug with pg_basebackup and 'shared' tablespace

2017-09-13 Thread Daniel Gustafsson
> On 15 May 2017, at 07:26, Michael Paquier wrote: > > On Tue, May 2, 2017 at 2:28 AM, Pierre Ducroquet wrote: > >> I will submit this patch in the current commit fest. > > I have not spotted any flaws in the refactored logic. This patch no longer applies, could you take a look at it and subm

Re: [HACKERS] Surjective functional indexes

2017-09-13 Thread Konstantin Knizhnik
On 13.09.2017 14:00, Simon Riggs wrote: On 13 September 2017 at 11:30, Konstantin Knizhnik wrote: The only reason of all this discussion about terms is that I need to choose name for correspondent index option. Simon think that we do not need this option at all. In this case we should not wo

Re: [HACKERS] pg_dump does not handle indirectly-granted permissions properly

2017-09-13 Thread Stephen Frost
Tom, all, * Stephen Frost (sfr...@snowman.net) wrote: > Alright, here's an updated patch which cleans things up a bit and adds > comments to explain what's going on. I also updated the comments in > acl.h to explain that ordering actually does matter. Getting back to this, here's rebased patches

Re: [HACKERS] Inconsistencies between pg_settings and postgresql.conf

2017-09-13 Thread Adrian Escoms
Hi, I realized that the parameter 'shared_preload_libraries' used to belong to category 'Resource Usage / Kernel Resources' but since postgresql version 9.4 it was changed in pg_settings to 'Client Connection Defaults / Shared Library Preloading' but in postgresql.conf it remains unchanged. I atta

Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction

2017-09-13 Thread Masahiko Sawada
On Thu, Sep 14, 2017 at 12:04 AM, Masahiko Sawada wrote: > On Wed, Sep 13, 2017 at 8:00 PM, Arseny Sher wrote: >> Peter Eisentraut writes: >>> We can break this in any number of ways: >>> >>> - (your patch) Kill workers right away after ALTER SUBSCRIPTION DISABLE, >>> thus breaking the appearanc

Re: [HACKERS] psql: new help related to variables are not too readable

2017-09-13 Thread Tom Lane
Alvaro Herrera writes: > Why is it that we're not opening the pager automatically when this help > is invoked via psql --help=variables? "\? variables" already does that. Hm, given that output from a -c option does get paginated (I just checked), maybe that should happen.

Re: [HACKERS] WIP patch: distinguish selectivity of < from <= and > from >=

2017-09-13 Thread Tom Lane
Kuntal Ghosh writes: > On Tue, Sep 12, 2017 at 9:47 PM, Tom Lane wrote: >> Aleksander Alekseev writes: >>> The following review has been posted through the commitfest application: >>> make installcheck-world: tested, passed >>> Implements feature: tested, passed >>> Spec compliant:

Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction

2017-09-13 Thread Masahiko Sawada
On Wed, Sep 13, 2017 at 8:00 PM, Arseny Sher wrote: > Peter Eisentraut writes: >> We can break this in any number of ways: >> >> - (your patch) Kill workers right away after ALTER SUBSCRIPTION DISABLE, >> thus breaking the appearance of transactional DDL somewhat. >> ... >> - Have DROP SUBSCRIPTI

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use MINVALUE/MAXVALUE instead of UNBOUNDED for range partition b

2017-09-13 Thread Dean Rasheed
On 13 September 2017 at 14:53, Robert Haas wrote: > On Wed, Sep 13, 2017 at 4:51 AM, Dean Rasheed > wrote: >> A drawback to doing this is that we lose compatibility with syntaxes >> supported by other databases, which was part of the reason for >> choosing the terms MINVALUE and MAXVALUE in the

Re: [HACKERS] psql: new help related to variables are not too readable

2017-09-13 Thread Alvaro Herrera
Most of the time I suppose you'd search (using the pager's search function) whatever you're looking for, rather than read the whole page from top to bottom. Why is it that we're not opening the pager automatically when this help is invoked via psql --help=variables? "\? variables" already does th

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-09-13 Thread Andreas Joseph Krogh
På onsdag 13. september 2017 kl. 15:26:27, skrev Bruce Momjian mailto:br...@momjian.us>>: On Wed, Sep 13, 2017 at 01:35:17AM +0200, Andreas Joseph Krogh wrote: [snip] > I know I'm being a little nitty-gritty here, but if it helps me understand it > might help others. I have applied the attach

Re: [HACKERS] OpenFile() Permissions Refactor

2017-09-13 Thread David Steele
Hi Peter, Here's a new patch based on your review. Where I had a question I made a choice as described below: On 9/1/17 1:58 PM, David Steele wrote: > On 9/1/17 1:15 PM, Peter Eisentraut wrote: >> On 8/29/17 12:15, David Steele wrote: >> >> I wonder whether we even need that much flexibility. W

Re: [HACKERS] psql: new help related to variables are not too readable

2017-09-13 Thread Pavel Stehule
2017-09-13 16:11 GMT+02:00 Tom Lane : > Fabien COELHO writes: > >> I'll assign this patch to next commitfest > > > Probably it needs some rebase after Tom committed result status > variables. > > > As it is a style thing, ISTM that the patch is ready if most people agree > > that it is better thi

Re: [HACKERS] SCRAM protocol documentation

2017-09-13 Thread Peter Eisentraut
On 8/11/17 09:27, Peter Eisentraut wrote: > On 8/11/17 09:06, Álvaro Hernández Tortosa wrote: >> Strictly speaking the RFC assumes that the username is at least 1 >> character. I understand this was precisely Peter's original comment. > > Well, my main point was that the documentation, the c

Re: [HACKERS] [POC] hash partitioning

2017-09-13 Thread Jesper Pedersen
Hi Amul, On 09/08/2017 08:40 AM, amul sul wrote: Rebased 0002 against this commit & renamed to 0001, PFA. This patch needs a rebase. Best regards, Jesper -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/

Re: [HACKERS] psql: new help related to variables are not too readable

2017-09-13 Thread Tom Lane
Fabien COELHO writes: >> I'll assign this patch to next commitfest > Probably it needs some rebase after Tom committed result status variables. > As it is a style thing, ISTM that the patch is ready if most people agree > that it is better this way and there is no strong veto against. FWIW, I t

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use MINVALUE/MAXVALUE instead of UNBOUNDED for range partition b

2017-09-13 Thread Robert Haas
On Wed, Sep 13, 2017 at 5:05 AM, Amit Langote wrote: >> So thinking about this afresh, my preference would actually be to just >> canonicalise the values stored rather than erroring out. > > Coincidentally, I just wrote the patch for canonicalizing stored values, > instead of erroring out. Please

Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction

2017-09-13 Thread Alvaro Herrera
Tom Lane wrote: > Peter Eisentraut writes: > > - Disallow DROP SUBSCRIPTION in a transaction under certain > > circumstances, for example if a transaction has previously manipulated > > the same subscription. > ISTM the second of those (refuse to drop an in-use subscription) is > by far the leas

Re: [HACKERS] POC: Cache data in GetSnapshotData()

2017-09-13 Thread Jesper Pedersen
Hi, On 08/29/2017 05:04 AM, Mithun Cy wrote: Test Setting: = Server configuration: ./postgres -c shared_buffers=8GB -N 300 -c min_wal_size=15GB -c max_wal_size=20GB -c checkpoint_timeout=900 -c maintenance_work_mem=1GB -c checkpoint_completion_target=0.9 -c wal_buffers=256MB & pgbench c

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use MINVALUE/MAXVALUE instead of UNBOUNDED for range partition b

2017-09-13 Thread Robert Haas
On Wed, Sep 13, 2017 at 4:51 AM, Dean Rasheed wrote: > A drawback to doing this is that we lose compatibility with syntaxes > supported by other databases, which was part of the reason for > choosing the terms MINVALUE and MAXVALUE in the first place. > > So thinking about this afresh, my preferen

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-09-13 Thread Bruce Momjian
On Wed, Sep 13, 2017 at 01:35:17AM +0200, Andreas Joseph Krogh wrote: > På onsdag 13. september 2017 kl. 01:00:20, skrev Bruce Momjian < > br...@momjian.us>: > (I know this isn't exactly -hackers food, but it seems natural to end this > thread here) >   > Ok, thanks. > It is clearer what happens no

Re: [HACKERS] Hooks to track changed pages for backup purposes

2017-09-13 Thread Tomas Vondra
On 09/13/2017 07:53 AM, Andrey Borodin wrote: >> * I see there are conditions like this: >> >>    if(xlogreader->blocks[nblock].forknum == MAIN_FORKNUM) >> >> Why is it enough to restrict the block-tracking code to main fork? >> Aren't we interested in all relation forks? > fsm, vm and others are

Re: [HACKERS] Hooks to track changed pages for backup purposes

2017-09-13 Thread Andrey Borodin
Hi! Thank you for your interest and experiment results. > 13 сент. 2017 г., в 15:43, Ants Aasma написал(а): > > On Thu, Aug 31, 2017 at 9:02 AM, Andrey Borodin wrote: >> When we have accumulated diff blocknumbers for most of segments we can >> significantly speed up method of WAL scanning. If w

Re: [HACKERS] Parallel Hash take II

2017-09-13 Thread Prabhat Sahu
Hi Thomas, Setting with lower "shared_buffers" and "work_mem" as below, query getting crash but able to see explain plan. shared_buffers = 1MB work_mem = 1MB max_parallel_workers_per_gather = 4 max_parallel_workers = 8 enable_mergejoin = off enable_nestloop = off enable_hashjoin = on force_paral

Re: [HACKERS] Patches that don't apply or don't compile: 2017-09-12

2017-09-13 Thread Tomas Vondra
Hi Aleksander, On 09/13/2017 11:49 AM, Aleksander Alekseev wrote: > Hi Tomas, > > I appreciate your feedback, although it doesn't seem to be completely > fair. Particularly: > >> You gave everyone about 4 hours to object > > This is not quite accurate since my proposal was sent 2017-09-11 > 09:

[HACKERS] Re: [COMMITTERS] pgsql: Logical replication support for initial data copy

2017-09-13 Thread Peter Eisentraut
On 3/30/17 14:04, Fujii Masao wrote: > On Thu, Mar 23, 2017 at 9:59 PM, Peter Eisentraut wrote: >> Logical replication support for initial data copy > > + case T_SQLCmd: > + if (MyDatabaseId == InvalidOid) > + ereport(ERROR, > + (errmsg("not connected to database"))); > > This error message does

Re: [HACKERS] Supporting huge pages on Windows

2017-09-13 Thread Magnus Hagander
On Wed, Sep 13, 2017 at 3:41 AM, Tsunakawa, Takayuki < tsunakawa.ta...@jp.fujitsu.com> wrote: > Hi Thomas, Magnus > > From: pgsql-hackers-ow...@postgresql.org > > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Thomas Munro > > Since it only conflicts with c7b8998e because of pgindent whi

Re: [HACKERS] Getting error message with latest PG source on Windows.

2017-09-13 Thread Peter Eisentraut
On 9/13/17 06:39, Ashutosh Sharma wrote: > Error 1 error C2065: 'LDAP_NO_ATTRS' : undeclared identifier > C:\Users\ashu\pgsql\src\backend\libpq\auth.c 2468 Googling around I see some indications that the macro may not be defined in all implementations and that some other proj

Re: [HACKERS] Patches that don't apply or don't compile: 2017-09-12

2017-09-13 Thread Daniel Gustafsson
> On 13 Sep 2017, at 11:49, Aleksander Alekseev > wrote: > > Hi Tomas, > > I appreciate your feedback, although it doesn't seem to be completely > fair. I would like to stress one thing (and I am speaking only for myself here), this has been feedback and not criticism. Your (and everyone invo

Re: [HACKERS] GatherMerge misses to push target list

2017-09-13 Thread Rushabh Lathia
On Wed, Sep 6, 2017 at 10:04 AM, Amit Kapila wrote: > During my recent work on costing of parallel paths [1], I noticed that > we are missing to push target list below GatherMerge in some simple > cases like below. > > Test prepration > - > create or replace function simple_fu

Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction

2017-09-13 Thread Arseny Sher
Peter Eisentraut writes: > We can break this in any number of ways: > > - (your patch) Kill workers right away after ALTER SUBSCRIPTION DISABLE, > thus breaking the appearance of transactional DDL somewhat. > ... > - Have DROP SUBSCRIPTION attempt to kill workers if the subscription is > disabled

Re: [HACKERS] Surjective functional indexes

2017-09-13 Thread Simon Riggs
On 13 September 2017 at 11:30, Konstantin Knizhnik wrote: > The only reason of all this discussion about terms is that I need to choose > name for correspondent index option. > Simon think that we do not need this option at all. In this case we should > not worry about right term. > From my point

Re: [HACKERS] UPDATE of partition key

2017-09-13 Thread amul sul
On Sun, Sep 10, 2017 at 8:47 AM, Amit Kapila wrote: > On Fri, Sep 8, 2017 at 4:51 PM, amul sul wrote: > > On Thu, May 18, 2017 at 9:13 AM, Amit Kapila > > wrote: > >> > >> On Wed, May 17, 2017 at 5:17 PM, Robert Haas > >> wrote: > >> > On Wed, May 17, 2017 at 6:29 AM, Amit Kapila > > >> > wr

Re: [HACKERS] Hooks to track changed pages for backup purposes

2017-09-13 Thread Ants Aasma
On Thu, Aug 31, 2017 at 9:02 AM, Andrey Borodin wrote: > When we have accumulated diff blocknumbers for most of segments we can > significantly speed up method of WAL scanning. If we have blocknumbers for > all segments we can skip WAL scanning at all. Have you measured that the WAL scanning is

Re: [HACKERS] Getting error message with latest PG source on Windows.

2017-09-13 Thread Ashutosh Sharma
Hi, On Wed, Sep 13, 2017 at 3:15 PM, Ashutosh Sharma wrote: > Hi Thomas, > > On Wed, Sep 13, 2017 at 2:57 PM, Thomas Munro > wrote: >> On Wed, Sep 13, 2017 at 9:11 PM, Thomas Munro >> wrote: >>> On Wed, Sep 13, 2017 at 8:58 PM, Ashutosh Sharma >>> wrote: I am getting the following error

Re: [HACKERS] Surjective functional indexes

2017-09-13 Thread Konstantin Knizhnik
On 13.09.2017 13:14, Christoph Berg wrote: Re: Konstantin Knizhnik 2017-09-13 <2393c4b3-2ec4-dc68-4ea9-670597b56...@postgrespro.ru> On 13.09.2017 10:51, Christoph Berg wrote: Re: Konstantin Knizhnik 2017-09-01 + Functional index is based on on projection function: function which e

Re: [HACKERS] expanding inheritance in partition bound order

2017-09-13 Thread Amit Khandekar
On 13 September 2017 at 15:32, Amit Langote wrote: > On 2017/09/11 18:56, Amit Langote wrote: >> Attached updated patch does it that way for both partitioned table indexes >> and leaf partition indexes. Thanks for pointing it out. > > It seems to me we don't really need the first patch all that m

Re: [HACKERS] Surjective functional indexes

2017-09-13 Thread Christoph Berg
Re: Konstantin Knizhnik 2017-09-13 <2393c4b3-2ec4-dc68-4ea9-670597b56...@postgrespro.ru> > > > On 13.09.2017 10:51, Christoph Berg wrote: > > Re: Konstantin Knizhnik 2017-09-01 > > > > > + Functional index is based on on projection function: function > > > which extract subset of its ar

Re: [HACKERS] Surjective functional indexes

2017-09-13 Thread Konstantin Knizhnik
On 13.09.2017 10:51, Christoph Berg wrote: Re: Konstantin Knizhnik 2017-09-01 + Functional index is based on on projection function: function which extract subset of its argument. + In mathematic such functions are called non-injective. For injective function if any attribute u

Re: [HACKERS] Supporting huge pages on Windows

2017-09-13 Thread Ashutosh Sharma
On Wed, Sep 13, 2017 at 7:11 AM, Tsunakawa, Takayuki wrote: > Hi Thomas, Magnus > > From: pgsql-hackers-ow...@postgresql.org >> [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Thomas Munro >> Since it only conflicts with c7b8998e because of pgindent whitespace >> movement, I applied it wi

Re: [HACKERS] expanding inheritance in partition bound order

2017-09-13 Thread Amit Langote
On 2017/09/11 18:56, Amit Langote wrote: > Attached updated patch does it that way for both partitioned table indexes > and leaf partition indexes. Thanks for pointing it out. It seems to me we don't really need the first patch all that much. That is, let's keep PartitionDispatchData the way it

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-09-13 Thread Amit Khandekar
On 13 September 2017 at 13:05, Ashutosh Bapat wrote: > On Wed, Sep 13, 2017 at 12:32 PM, Amit Khandekar > wrote: >> Hi, >> >> Rafia had done some testing on TPCH queries using Partition-wise join >> patch along with Parallel Append patch. >> >> There, we had observed that for query 4, even thoug

[HACKERS] Inconsistencies between pg_settings and postgresql.conf

2017-09-13 Thread Adrian Escoms
Hello, We are working with postgresql.conf configuration file and we have found some discrepancies between it and pg_settings in terms of categories and subcategories (we have split the field category in pg_settings by '/', the first part being 'category', the second 'subcategory') We suggest to c

Re: [HACKERS] Patches that don't apply or don't compile: 2017-09-12

2017-09-13 Thread Aleksander Alekseev
Hi Tomas, I appreciate your feedback, although it doesn't seem to be completely fair. Particularly: > You gave everyone about 4 hours to object This is not quite accurate since my proposal was sent 2017-09-11 09:41:32 and this thread started - 2017-09-12 14:14:55. > You just changed the status

Re: [HACKERS] Getting error message with latest PG source on Windows.

2017-09-13 Thread Ashutosh Sharma
Hi Thomas, On Wed, Sep 13, 2017 at 2:57 PM, Thomas Munro wrote: > On Wed, Sep 13, 2017 at 9:11 PM, Thomas Munro > wrote: >> On Wed, Sep 13, 2017 at 8:58 PM, Ashutosh Sharma >> wrote: >>> I am getting the following error message when trying to build latest >>> PG source on Windows, >>> >>> Erro

Re: [HACKERS] pgbench regression test failure

2017-09-13 Thread Fabien COELHO
I have a serious, serious dislike for tests that seem to work until they're run on a heavily loaded machine. I'm not that sure the error message was because of that. No, this particular failure (probably) wasn't. But now that I've realized that this test case is timing-sensitive, I'm worri

  1   2   >