[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 >>>

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

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

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

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 >

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

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, >> > >> >

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

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

[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

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

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

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

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: [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

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

[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 > >

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

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

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

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. > >>

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

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()

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

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 >

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

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

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

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

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. >>

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

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

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 >

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

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

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

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

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

[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

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

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

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

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

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

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

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 >

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

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.

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

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

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

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

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,

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

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

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

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 >: 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

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.

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

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

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:

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

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, >

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

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

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

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

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

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 >>

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

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 >

[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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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.

[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

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

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

Re: [HACKERS] increasing the default WAL segment size

2017-09-13 Thread Andres Freund
Hi, On 2017-09-06 20:24:16 +0530, Beena Emerson wrote: > > - pg_standby's RetrieveWALSegSize() does too much for it's name. It > > seems quite weird that a function named that way has the section below > > "/* check if clean up is necessary */" > > we set 2 cleanup related variables once

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

2017-09-13 Thread Thomas Munro
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, >> >> Error 1 error C2065:

Re: [HACKERS] psql - add special variable to reflect the last query status

2017-09-13 Thread Fabien COELHO
One thing we could think about if this seems too high is to drop ROW_COUNT. I'm unconvinced that it has a real use-case, and it seems to be taking more than its share of the work in non-error cases, because it turns out that PQcmdTuples() is not an amazingly cheap function. I do think that a

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

2017-09-13 Thread Alvaro Herrera
Aleksander Alekseev wrote: > Agree, especially regarding build logs. All of this currently is only an > experiment. For some reason I got a weird feeling that at this time it > will be not quite successful one. If there will be too many false > positives I'll just return the patches back to

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

2017-09-13 Thread Thomas Munro
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, > > Error 1 error C2065: 'LDAP_NO_ATTRS' : undeclared identifier > C:\Users\ashu\pgsql\src\backend\libpq\auth.c 2468 > > I

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

2017-09-13 Thread Amit Langote
Hi Dean, On 2017/09/13 17:51, Dean Rasheed wrote: > Robert Haas writes: >> On Tue, Sep 12, 2017 at 9:58 AM, Alvaro Herrera >> wrote: >>> Did anything happen on this, or did we just forget it completely? >> >> I forgot it. :-( >> >> I really

  1   2   >