Re: [HACKERS] "create publication..all tables" ignore 'partition not supported' error

2017-05-31 Thread Kuntal Ghosh
On Wed, May 31, 2017 at 12:58 AM, Masahiko Sawada wrote: > > I'd say we can fix this issue by just changing the query. Attached > patch changes the query so that it can handle publication name > correctly, the query gets complex, though. > In is_publishable_class function,

Re: [HACKERS] Get stuck when dropping a subscription during synchronizing table

2017-05-31 Thread Noah Misch
On Tue, May 30, 2017 at 01:30:35AM +, Noah Misch wrote: > On Thu, May 18, 2017 at 10:27:51PM -0400, Peter Eisentraut wrote: > > On 5/18/17 11:11, Noah Misch wrote: > > > IMMEDIATE ATTENTION REQUIRED. This PostgreSQL 10 open item is past due > > > for > > > your status update. Please

Re: [HACKERS] logical replication busy-waiting on a lock

2017-05-31 Thread Andres Freund
On 2017-05-29 23:49:33 +0200, Petr Jelinek wrote: > I am not quite sure I understand (both the vxid suggestion and for the > session dying badly). Maybe we can discuss bit more when you get to > computer so it's easier for you to expand on what you mean. The xid interlock when exporting a

Re: [HACKERS] Effect of changing the value for PARALLEL_TUPLE_QUEUE_SIZE

2017-05-31 Thread Ashutosh Bapat
> > I did a little bit of brief experimentation on this same topic a long > time ago and didn't see an improvement from boosting the queue size > beyond 64k but Rafia is testing Gather rather than Gather Merge and, > as I say, my test was very brief. I think it would be a good idea to > try to

[HACKERS] Re: transition table behavior with inheritance appears broken (was: Declarative partitioning - another take)

2017-05-31 Thread Noah Misch
On Tue, May 30, 2017 at 01:34:33AM +, Noah Misch wrote: > This PostgreSQL 10 open item is past due for your status update. Kindly send > a status update within 24 hours, and include a date for your subsequent status > update. Refer to the policy on open item ownership: >

Re: [HACKERS] Range Merge Join v1

2017-05-31 Thread Andrew Borodin
Hi, Jeff! Sorry for being late. Actually, I had several unsuccessful attempts to find something wrong with the patch. Here's my review. in pathkey.c ecs = (EquivalenceClass **) palloc(nClauses * sizeof(EquivalenceClass *)); scores = (int *) palloc(nClauses * sizeof(int)); range_ecs =

Re: [HACKERS] logical replication - still unstable after all these months

2017-05-31 Thread Erik Rijkers
On 2017-05-26 08:10, Erik Rijkers wrote: If you run a pgbench session of 1 minute over a logical replication connection and repeat that 100x this is what you get: At clients 90, 64, 8, scale 25: -- out_20170525_0944.txt 100 -- pgbench -c 90 -j 8 -T 60 -P 12 -n -- scale 25 7 -- Not

Re: [HACKERS] WIP Patch: Precalculate stable functions, infrastructure v1

2017-05-31 Thread Marina Polyakova
Hi Marina, Hello again! I still don't see anything particularly wrong with your patch. It applies, passes all test, it is well test-covered and even documented. Also I've run `make installcheck` under Valgrind and didn't find any memory-related errors. Thank you very much as usual! Is

Re: [HACKERS] logical replication - still unstable after all these months

2017-05-31 Thread Petr Jelinek
On 29/05/17 23:06, Mark Kirkwood wrote: > On 29/05/17 23:14, Petr Jelinek wrote: > >> On 29/05/17 03:33, Jeff Janes wrote: >> >>> What would you want to look at? Would saving the WAL from the master be >>> helpful? >>> >> Useful info is, logs from provider (mainly the logical decoding logs >>

Re: [HACKERS] [PATCH] relocation truncated to fit: citus build failure on s390x

2017-05-31 Thread Christoph Berg
Re: Tom Lane 2017-05-30 <1564.1496176...@sss.pgh.pa.us> > It'd be interesting if people could gather similar numbers on other > platforms of more real-world relevance, such as ppc64. But based on > this small sample, I wouldn't object to just going to -fPIC across > the board. ppc64el, Debian

Re: [HACKERS] Segmentation fault when creating a BRIN, 10beta1

2017-05-31 Thread Alexander Sosna
Alvaro Herrera writes: >> I can reproduce a segmentation fault when creating a BRIN concurrently >> with set pages_per_range and autosummarize. > > Pushed fix just now. Please give it a try. Thanks for testing and > reporting, Thank you for fixing, works for me. Regards, Alexander Sosna

Re: [HACKERS] logical replication busy-waiting on a lock

2017-05-31 Thread Petr Jelinek
On 31/05/17 09:24, Andres Freund wrote: > On 2017-05-29 23:49:33 +0200, Petr Jelinek wrote: >> I am not quite sure I understand (both the vxid suggestion and for the >> session dying badly). Maybe we can discuss bit more when you get to >> computer so it's easier for you to expand on what you

[HACKERS] Error while creating subscription when server is running in single user mode

2017-05-31 Thread tushar
Hi, There is an error while creating subscription when server is running in single user mode centos@centos-cpula bin]$ ./postgres --single postgres -D m1data PostgreSQL stand-alone backend 10beta1 backend> create subscription sub connection 'dbname=postgres port=5433 user=centos' publication

Re: [HACKERS] Default Partition for Range

2017-05-31 Thread Beena Emerson
Hello, PFA the updated patch. Dependent patch default_partition_v17.patch [1] This patch adds regression tests and removes the separate function to get default partition qual. On Mon, May 29, 2017 at 3:22 PM, Jeevan Ladhe wrote: > Hi Beena, > > I went through

Re: [HACKERS] Use of non-restart-safe storage by temp_tablespaces

2017-05-31 Thread Bruce Momjian
On Wed, May 31, 2017 at 07:53:53AM -0400, Robert Haas wrote: > On Tue, May 30, 2017 at 6:50 PM, Mark Dilger wrote: > >> On May 29, 2017, at 11:53 AM, Bruce Momjian wrote: > >> Right now we don't document that temp_tablespaces can use > >>

Re: [HACKERS] TAP backpatching policy

2017-05-31 Thread Robert Haas
On Tue, May 30, 2017 at 9:12 PM, Craig Ringer wrote: > Thoughts? Backpatch new TAP methods, etc, into back branches routinely? So, on the one hand, it is certainly useful to be able to commit tests to back-branches as well as to master, and it's hard to do that if the

Re: [HACKERS] Effect of changing the value for PARALLEL_TUPLE_QUEUE_SIZE

2017-05-31 Thread Robert Haas
On Wed, May 31, 2017 at 2:35 AM, Ashutosh Bapat wrote: > AFAIK, work_mem comes from memory private to the process whereas this > memory will come from the shared memory pool. I don't think that really matters. The point of limits like work_mem is to avoid

Re: [HACKERS] Segmentation fault when creating a BRIN, 10beta1

2017-05-31 Thread Alvaro Herrera
Andres Freund wrote: > On 2017-05-30 18:21:10 -0400, Alvaro Herrera wrote: > > Alexander Sosna wrote: > > > Hi, > > > > > > I can reproduce a segmentation fault when creating a BRIN concurrently > > > with set pages_per_range and autosummarize. > > > > Pushed fix just now. Please give it a try.

Re: [HACKERS] ALTER INDEX .. SET STATISTICS ... behaviour

2017-05-31 Thread Tom Lane
Alexander Korotkov writes: > I've discovered that PostgreSQL is able to run following kind of queries in > order to change statistic-gathering target for an indexed expression. > ALTER INDEX index_name ALTER COLUMN expr SET STATISTICS stat_target; > It's been

Re: [HACKERS] ALTER INDEX .. SET STATISTICS ... behaviour

2017-05-31 Thread Alexander Korotkov
On Wed, May 31, 2017 at 6:53 PM, Tom Lane wrote: > Alexander Korotkov writes: > > I've discovered that PostgreSQL is able to run following kind of queries > in > > order to change statistic-gathering target for an indexed expression. > > > ALTER

Re: [HACKERS] TAP backpatching policy

2017-05-31 Thread Alvaro Herrera
Robert Haas wrote: > On Tue, May 30, 2017 at 9:12 PM, Craig Ringer wrote: > > Thoughts? Backpatch new TAP methods, etc, into back branches routinely? > > So, on the one hand, it is certainly useful to be able to commit tests > to back-branches as well as to master, and

Re: [HACKERS] Use of non-restart-safe storage by temp_tablespaces

2017-05-31 Thread Mark Dilger
> On May 31, 2017, at 6:04 AM, Bruce Momjian wrote: > > On Wed, May 31, 2017 at 07:53:53AM -0400, Robert Haas wrote: >> On Tue, May 30, 2017 at 6:50 PM, Mark Dilger wrote: On May 29, 2017, at 11:53 AM, Bruce Momjian wrote:

Re: [HACKERS] Use of non-restart-safe storage by temp_tablespaces

2017-05-31 Thread Bruce Momjian
On Wed, May 31, 2017 at 07:53:22AM -0700, Mark Dilger wrote: > > Just to clarify, the TEMPORARY clause would allow the tablespace to > > start up empty, while normal tablespaces can't do that, right? One big > > problem is that we don't have any way to prevent non-temporary > > tablespaces from

[HACKERS] ALTER INDEX .. SET STATISTICS ... behaviour

2017-05-31 Thread Alexander Korotkov
Hackers, I've discovered that PostgreSQL is able to run following kind of queries in order to change statistic-gathering target for an indexed expression. ALTER INDEX index_name ALTER COLUMN expr SET STATISTICS stat_target; It's been previously discussed in [1]. I think this should be fixed

Re: [HACKERS] TAP backpatching policy

2017-05-31 Thread Joshua D. Drake
On 05/30/2017 09:52 PM, Stephen Frost wrote: Tom, Um ... but we still have 2 live pre-9.4 branches. If your proposal doesn't extend to back-porting all of this stuff as far as 9.2, I don't see what this is really buying. We'd still need version cutoff checks in the tests. I don't believe

Re: [HACKERS] Proposal : For Auto-Prewarm.

2017-05-31 Thread Robert Haas
On Tue, May 30, 2017 at 8:15 AM, Mithun Cy wrote: > On Tue, May 30, 2017 at 10:16 AM, Mithun Cy > wrote: >> Thanks Robert, > > Sorry, there was one more mistake ( a typo) in dump_now() instead of > using pfree I used free corrected same in

Re: [HACKERS] Use of non-restart-safe storage by temp_tablespaces

2017-05-31 Thread Mark Dilger
> On May 31, 2017, at 7:58 AM, Bruce Momjian wrote: > > On Wed, May 31, 2017 at 07:53:22AM -0700, Mark Dilger wrote: >>> Just to clarify, the TEMPORARY clause would allow the tablespace to >>> start up empty, while normal tablespaces can't do that, right? One big >>> problem

Re: [HACKERS] [PATCH] quiet conversion warning in DatumGetFloat4

2017-05-31 Thread Tom Lane
Chapman Flack writes: > On 05/31/17 01:26, Tom Lane wrote: >> Hm. I think it would be better to use DatumGetInt32 here. Arguably, >> direct use of GET_4_BYTES and its siblings should only appear in >> DatumGetFoo macros. > Like so? These are the 4 sites where

Re: [HACKERS] POC: Sharing record typmods between backends

2017-05-31 Thread Robert Haas
On Tue, May 30, 2017 at 2:45 AM, Dilip Kumar wrote: > On Tue, May 30, 2017 at 1:09 AM, Thomas Munro > wrote: >>> * Perhaps simplehash + an LWLock would be better than dht, but I >>> haven't looked into that. Can it be convinced to work in

Re: [HACKERS] POC: Sharing record typmods between backends

2017-05-31 Thread Dilip Kumar
On Wed, May 31, 2017 at 10:57 AM, Robert Haas wrote: >> Simplehash provides an option to provide your own allocator function >> to it. So in the allocator function, you can allocate memory from DSA. >> After it reaches some threshold it expands the size (double) and it >>

Re: [HACKERS] [PATCH] relocation truncated to fit: citus build failure on s390x

2017-05-31 Thread Alvaro Herrera
Christoph Berg wrote: > Re: Tom Lane 2017-05-31 <28752.1496238...@sss.pgh.pa.us> > > Next question: should we back-patch this change, or just do it in HEAD? > > Debian "needs" it for 9.6, but I've already pushed the s390x patch in > the original posting, so I could just live with it being just

Re: [HACKERS] <> join selectivity estimate question

2017-05-31 Thread Dilip Kumar
On Fri, Mar 17, 2017 at 6:49 PM, Thomas Munro wrote: > Right. If I temporarily hack neqjoinsel() thus: > > result = 1.0 - result; > + > + if (jointype == JOIN_SEMI) > + result = 1.0; > + > PG_RETURN_FLOAT8(result); > } I was

[HACKERS] Perfomance bug in v10

2017-05-31 Thread Teodor Sigaev
Hi! I found an example where v10 chooses extremely non-optimal plan: select i::int as a, i::int + 1 as b, 0 as c into t from generate_series(1,32) as i; create unique index i on t (c, a); explain analyze SELECT t1.a, t1.b, t2.a, t2.b, t3.a, t3.b, t4.a, t4.b,

[HACKERS] Re: [GENERAL] pg_basebackup error: replication slot "pg_basebackup_2194" already exists

2017-05-31 Thread Magnus Hagander
On Wed, May 31, 2017 at 12:20 AM, Ludovic Vaugeois-Pepin < ludovi...@gmail.com> wrote: > On Tue, May 30, 2017 at 9:32 PM, Magnus Hagander > wrote: > > On Tue, May 30, 2017 at 9:14 PM, Ludovic Vaugeois-Pepin > > wrote: > >> > >> I ran into the issue

Re: [HACKERS] POC: Sharing record typmods between backends

2017-05-31 Thread Dilip Kumar
On Wed, May 31, 2017 at 12:53 PM, Robert Haas wrote: > Well, SH_TYPE's members SH_ELEMENT_TYPE *data and void *private_data > are not going to work in DSM, because they are pointers. You can > doubtless come up with a way around that problem, but I guess the > question is

[HACKERS] Typo in xlogfuncs.c [WAS Re: Incorrect mention of pg_xlog_switch() in xlogfuncs.c]

2017-05-31 Thread Neha Khatri
Simplifying $subject. There are typos in xlogfuncs.c. So Either s/pg_xlog_switch/pg_switch_wal Or Remove "pg_xlog_switch" from the comments. Attached patches both ways. Regards, Neha On Sat, May 20, 2017 at 1:08 AM, Neha Khatri wrote: > While reading some code,

[HACKERS] tap tests on older branches fail if concurrency is used

2017-05-31 Thread Andres Freund
Hi, when using $ cat ~/.proverc -j9 some tests fail for me in 9.4 and 9.5. E.g. src/bin/script's tests yields a lot of fun like: $ (cd ~/build/postgres/9.5-assert/vpath/src/bin/scripts/ && make check) ... # LOG: received immediate shutdown request # WARNING: terminating connection because of

Re: [HACKERS] TAP backpatching policy

2017-05-31 Thread Craig Ringer
On 1 June 2017 at 01:13, Tom Lane wrote: > Alvaro Herrera writes: >> My main concern is how widely is the buildfarm going to test the new >> test frameworks. If we backpatch PostgresNode-based tests to 9.2, are >> buildfarm animals going to need to

Re: [HACKERS] tap tests on older branches fail if concurrency is used

2017-05-31 Thread Craig Ringer
On 1 June 2017 at 08:15, Andres Freund wrote: > Hi, > > when using > $ cat ~/.proverc > -j9 > > some tests fail for me in 9.4 and 9.5. E.g. src/bin/script's tests > yields a lot of fun like: > $ (cd ~/build/postgres/9.5-assert/vpath/src/bin/scripts/ && make check) > ... > #

Re: [HACKERS] "create publication..all tables" ignore 'partition not supported' error

2017-05-31 Thread Peter Eisentraut
On 5/31/17 02:17, Kuntal Ghosh wrote: > On Wed, May 31, 2017 at 12:58 AM, Masahiko Sawada > wrote: >> >> I'd say we can fix this issue by just changing the query. Attached >> patch changes the query so that it can handle publication name >> correctly, the query gets

Re: [HACKERS] Replication origins and timelines

2017-05-31 Thread Stephen Frost
Craig, * Craig Ringer (cr...@2ndquadrant.com) wrote: > TL;DR: replication origins track LSN without timeline. This is > ambiguous when physical failover is present since / > can now represent more than one state due to timeline forks with > promotions. Replication origins should

Re: [HACKERS] Replication origins and timelines

2017-05-31 Thread Stephen Frost
Craig, * Craig Ringer (cr...@2ndquadrant.com) wrote: > On 1 June 2017 at 09:27, Stephen Frost wrote: > > * Craig Ringer (cr...@2ndquadrant.com) wrote: > >> TL;DR: replication origins track LSN without timeline. This is > >> ambiguous when physical failover is present since

Re: [HACKERS] Replication origins and timelines

2017-05-31 Thread Craig Ringer
On 1 June 2017 at 09:36, Andres Freund wrote: > On 2017-05-31 21:33:26 -0400, Stephen Frost wrote: >> > This only starts becoming an issue once logical replication slots can >> > exist on replicas and be maintained to follow the master's slot state. >> > Which is incomplete in

Re: [HACKERS] pg_class.relpartbound definition overly brittle

2017-05-31 Thread Amit Langote
On 2017/06/01 4:50, Robert Haas wrote: > On Wed, May 31, 2017 at 3:40 PM, Mark Dilger wrote: >> recent changes have introduced the :location field to the partboundspec >> in pg_catalog.pg_class. This means that if two identical tables with >> identical partitioning

Re: [HACKERS] "create publication..all tables" ignore 'partition not supported' error

2017-05-31 Thread Amit Langote
On 2017/06/01 10:26, Peter Eisentraut wrote: > On 5/31/17 02:17, Kuntal Ghosh wrote: >> On Wed, May 31, 2017 at 12:58 AM, Masahiko Sawada >> wrote: >>> >>> I'd say we can fix this issue by just changing the query. Attached >>> patch changes the query so that it can handle

Re: [HACKERS] Re: Alter subscription..SET - NOTICE message is coming for table which is already removed

2017-05-31 Thread Peter Eisentraut
On 5/30/17 13:25, Masahiko Sawada wrote: > I think this cause is that the relation status entry could be deleted > by ALTER SUBSCRIPTION REFRESH before corresponding table sync worker > starting. Attached patch fixes issues reported on this thread so far. This looks like a reasonable change, but

Re: [HACKERS] Create subscription with `create_slot=false` and incorrect slot name

2017-05-31 Thread Peter Eisentraut
On 5/31/17 09:40, Robert Haas wrote: > On Tue, May 30, 2017 at 3:01 PM, Peter Eisentraut > wrote: >> On 5/25/17 17:26, Peter Eisentraut wrote: >>> Another way to fix this particular issue is to not verify the >>> replication slot name before doing the drop.

Re: [HACKERS] tap tests on older branches fail if concurrency is used

2017-05-31 Thread Craig Ringer
On 1 June 2017 at 08:15, Andres Freund wrote: > Hi, > > when using > $ cat ~/.proverc > -j9 > > some tests fail for me in 9.4 and 9.5. E.g. src/bin/script's tests > yields a lot of fun like: > $ (cd ~/build/postgres/9.5-assert/vpath/src/bin/scripts/ && make check) > ... > #

[HACKERS] Replication origins and timelines

2017-05-31 Thread Craig Ringer
Hi all TL;DR: replication origins track LSN without timeline. This is ambiguous when physical failover is present since / can now represent more than one state due to timeline forks with promotions. Replication origins should track timelines so we can tell the difference, I

Re: [HACKERS] Replication origins and timelines

2017-05-31 Thread Andres Freund
Hi, On 2017-06-01 09:12:04 +0800, Craig Ringer wrote: > TL;DR: replication origins track LSN without timeline. This is > ambiguous when physical failover is present since / > can now represent more than one state due to timeline forks with > promotions. Replication origins should

Re: [HACKERS] Replication origins and timelines

2017-05-31 Thread Craig Ringer
On 1 June 2017 at 09:23, Andres Freund wrote: > Even if we decide this is necessary, I *strongly* suggest trying to get > the existing standby decoding etc wrapped up before starting something > nontrival afresh. Speaking of such, I had a thought about how to sync logical

Re: [HACKERS] logical replication - still unstable after all these months

2017-05-31 Thread Peter Eisentraut
On 5/31/17 05:16, Petr Jelinek wrote: > I've been running tests on this overnight on another machine where I was > able to reproduce the original issue within few runs (once I found what > causes it) and so far looks good. I'll give people another day or so to test this before committing. --

Re: [HACKERS] pg_class.relpartbound definition overly brittle

2017-05-31 Thread Amit Langote
On 2017/06/01 11:13, Mark Dilger wrote: >> On May 31, 2017, at 6:32 PM, Amit Langote >> wrote: >> >> On 2017/06/01 4:50, Robert Haas wrote: >>> On Wed, May 31, 2017 at 3:40 PM, Mark Dilger >>> wrote: recent changes have introduced

Re: [HACKERS] walsender & parallelism

2017-05-31 Thread Peter Eisentraut
On 5/23/17 13:57, Petr Jelinek wrote: > On 23/05/17 19:45, Andres Freund wrote: >> >> >> On May 23, 2017 1:42:41 PM EDT, Petr Jelinek >> wrote: >>> Hi, >>> >>> so this didn't really move anywhere AFAICS, do we think the approach >>> I've chosen is good or do we want

Re: [HACKERS] Get stuck when dropping a subscription during synchronizing table

2017-05-31 Thread Peter Eisentraut
On 5/31/17 02:51, Noah Misch wrote: > On Tue, May 30, 2017 at 01:30:35AM +, Noah Misch wrote: >> On Thu, May 18, 2017 at 10:27:51PM -0400, Peter Eisentraut wrote: >>> On 5/18/17 11:11, Noah Misch wrote: IMMEDIATE ATTENTION REQUIRED. This PostgreSQL 10 open item is past due for your

Re: [HACKERS] COPY (query) TO ... doesn't allow parallelism

2017-05-31 Thread Dilip Kumar
On Wed, May 31, 2017 at 7:19 PM, Andres Freund wrote: > At the moment $subject doesn't allow parallelism, because copy.c's > pg_plan_query() invocation doesn't set the CURSOR_OPT_PARALLEL_OK > flag. > > To me that appears to be an oversight rather than intentional. A >

Re: [HACKERS] Patch: Add --no-comments to skip COMMENTs with pg_dump

2017-05-31 Thread Stephen Frost
David, * David G. Johnston (david.g.johns...@gmail.com) wrote: > On Tue, May 30, 2017 at 8:41 PM, Stephen Frost wrote: > > * David G. Johnston (david.g.johns...@gmail.com) wrote: > > > On Fri, May 26, 2017 at 7:47 AM, Stephen Frost > > wrote: > > > > *

Re: [HACKERS] Replication origins and timelines

2017-05-31 Thread Andres Freund
On 2017-05-31 21:27:56 -0400, Stephen Frost wrote: > Craig, > > * Craig Ringer (cr...@2ndquadrant.com) wrote: > > TL;DR: replication origins track LSN without timeline. This is > > ambiguous when physical failover is present since / > > can now represent more than one state due to

Re: [HACKERS] walsender & parallelism

2017-05-31 Thread Andres Freund
On 2017-05-31 23:51:08 -0400, Peter Eisentraut wrote: > I think the easiest and safest thing to do now is to just prevent > parallel plans in the walsender. See attached patch. This prevents the > hang in the select_parallel tests run under your new test setup. I'm not quite sure I can buy

Re: [HACKERS] [BUGS] Concurrent ALTER SEQUENCE RESTART Regression

2017-05-31 Thread Andres Freund
On 2017-05-31 14:24:38 -0700, Andres Freund wrote: > On 2017-05-24 10:52:37 -0400, Robert Haas wrote: > > On Wed, May 24, 2017 at 10:32 AM, Andres Freund wrote: > > > Well, but then we should just remove minval/maxval if we can't rely on > > > it. > > > > That seems like a

Re: [HACKERS] TAP: allow overriding PostgresNode in get_new_node

2017-05-31 Thread Craig Ringer
On 31 May 2017 at 08:43, Craig Ringer wrote: > Hi all > > More and more I'm finding it useful to extend PostgresNode for project > specific helper classes. But PostgresNode::get_new_node is a factory > that doesn't provide any mechanism for overriding, so you have to >

Re: [HACKERS] Get stuck when dropping a subscription during synchronizing table

2017-05-31 Thread Masahiko Sawada
On Thu, May 25, 2017 at 4:14 AM, Petr Jelinek wrote: > Hi, > > I finally had time to properly analyze this, and turns out we've been > all just trying to fix symptoms and the actual problems. > > All the locking works just fine the way it is in master. The issue with

Re: [HACKERS] walsender & parallelism

2017-05-31 Thread Peter Eisentraut
On 5/29/17 22:01, Noah Misch wrote: > On Tue, May 23, 2017 at 01:45:59PM -0400, Andres Freund wrote: >> On May 23, 2017 1:42:41 PM EDT, Petr Jelinek >> wrote: >>> Hi, >>> >>> so this didn't really move anywhere AFAICS, do we think the approach >>> I've chosen is

Re: [HACKERS] Perfomance bug in v10

2017-05-31 Thread David Rowley
On 1 June 2017 at 04:16, Teodor Sigaev wrote: > I found an example where v10 chooses extremely non-optimal plan: > select > i::int as a, > i::int + 1 as b, > 0 as c > into t > from > generate_series(1,32) as i; > > create unique index i on t (c, a); > >

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2017-05-31 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: > On Tue, May 30, 2017 at 11:49 PM, Stephen Frost wrote: > > ... and I don't believe that we should be asking the > > implementors of channel binding to also implement support for multiple > > TLS libraries in PostgreSQL in

Re: [HACKERS] Replication origins and timelines

2017-05-31 Thread Craig Ringer
On 1 June 2017 at 09:23, Andres Freund wrote: > Hi, > > On 2017-06-01 09:12:04 +0800, Craig Ringer wrote: >> TL;DR: replication origins track LSN without timeline. This is >> ambiguous when physical failover is present since / >> can now represent more than one

Re: [HACKERS] Replication origins and timelines

2017-05-31 Thread Andres Freund
On 2017-05-31 21:33:26 -0400, Stephen Frost wrote: > > This only starts becoming an issue once logical replication slots can > > exist on replicas and be maintained to follow the master's slot state. > > Which is incomplete in Pg10 (not exposed to users) but I plan to > > finish getting in for

Re: [HACKERS] Replication origins and timelines

2017-05-31 Thread Stephen Frost
Andres, * Andres Freund (and...@anarazel.de) wrote: > On 2017-05-31 21:33:26 -0400, Stephen Frost wrote: > > > This only starts becoming an issue once logical replication slots can > > > exist on replicas and be maintained to follow the master's slot state. > > > Which is incomplete in Pg10 (not

Re: [HACKERS] Replication origins and timelines

2017-05-31 Thread Craig Ringer
On 1 June 2017 at 09:27, Stephen Frost wrote: > Craig, > > * Craig Ringer (cr...@2ndquadrant.com) wrote: >> TL;DR: replication origins track LSN without timeline. This is >> ambiguous when physical failover is present since / >> can now represent more than one

Re: [HACKERS] Replication origins and timelines

2017-05-31 Thread Stephen Frost
Andres, * Andres Freund (and...@anarazel.de) wrote: > On 2017-05-31 21:27:56 -0400, Stephen Frost wrote: > > Uh, TL;DR, wow? Why isn't this something which needs to be addressed > > before PG10 can be released? > > Huh? Slots are't present on replicas, ergo there's no way for the whole > issue

Re: [HACKERS] pg_class.relpartbound definition overly brittle

2017-05-31 Thread Mark Dilger
> On May 31, 2017, at 6:32 PM, Amit Langote > wrote: > > On 2017/06/01 4:50, Robert Haas wrote: >> On Wed, May 31, 2017 at 3:40 PM, Mark Dilger wrote: >>> recent changes have introduced the :location field to the partboundspec >>> in

Re: [HACKERS] walsender & parallelism

2017-05-31 Thread Craig Ringer
On 1 June 2017 at 11:51, Peter Eisentraut wrote: > Unifying the signal handling and query processing further seems like a > good idea, but the patches are pretty involved, so I suggest to put them > into the next commit fest. I had a quick look a the idea of

[HACKERS] Tweaking tab completion for some backslash commands

2017-05-31 Thread Masahiko Sawada
Hi, While using psql, I found that tab completion for subscription and publication baskslash commands are not supported. After investigated other backslash command that is not supported, I found \if, \elif, \else, \endif and \?. Attached patch tweaks tab completion for some backslash commands.

Re: [HACKERS] Error while creating subscription when server is running in single user mode

2017-05-31 Thread Dilip Kumar
On Wed, May 31, 2017 at 2:20 PM, Michael Paquier wrote: > Yeah, see 0e0f43d6 for example. A simple fix is to look at > IsUnderPostmaster when creating, altering or dropping a subscription > in subscriptioncmds.c. Yeah, below patch fixes that. -- Regards, Dilip Kumar

Re: [HACKERS] GSoC 2017 : Proposal for predicate locking in gist index

2017-05-31 Thread Andrew Borodin
Hi, hackers! 2017-06-01 1:50 GMT+05:00 Kevin Grittner : > > The main difference between b-tree and gist index while searching for a > > target tuple is that in gist index, we can determine if there is a match or > > not at any level of the index. > > Agreed. A gist scan can

Re: [HACKERS] GSoC 2017 : Proposal for predicate locking in gist index

2017-05-31 Thread Kevin Grittner
On Wed, May 31, 2017 at 3:02 PM, Shubham Barai wrote: > I have been accepted as GSoC student for the project "Explicitly support > predicate locks in index access methods besides b-tree". I want to share my > approach for implementation of page level predicate locking

Re: [HACKERS] [PATCH] relocation truncated to fit: citus build failure on s390x

2017-05-31 Thread Andres Freund
On 2017-05-31 11:57:16 -0400, Alvaro Herrera wrote: > My vote would be to backpatch it all the way. +1 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Re: [GENERAL] pg_basebackup error: replication slot "pg_basebackup_2194" already exists

2017-05-31 Thread Michael Paquier
On Wed, May 31, 2017 at 9:22 AM, Magnus Hagander wrote: > Moving this one over to -hackers to discuss the fix, as this is clearly an > issue. > > Right now, pg_basebackup will use the pid of the *client* process to > generate it's ephemeral slot name. Per this report that

Re: [HACKERS] Re: [GENERAL] pg_basebackup error: replication slot "pg_basebackup_2194" already exists

2017-05-31 Thread Andres Freund
On 2017-05-31 18:22:18 +0200, Magnus Hagander wrote: > However, the client can't access the pid of the server as it is now, > and its the client that has to create the name. I don't think that's actually true? Doesn't the wire protocol always include the PID, which is then exposed with

Re: [HACKERS] TAP backpatching policy

2017-05-31 Thread Stephen Frost
Tom, Alvaro, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Alvaro Herrera writes: > > My main concern is how widely is the buildfarm going to test the new > > test frameworks. If we backpatch PostgresNode-based tests to 9.2, are > > buildfarm animals going to need to be

Re: [HACKERS] pg_class.relpartbound definition overly brittle

2017-05-31 Thread Robert Haas
On Wed, May 31, 2017 at 3:40 PM, Mark Dilger wrote: > recent changes have introduced the :location field to the partboundspec > in pg_catalog.pg_class. This means that if two identical tables with > identical partitioning scheme are created, but one is done before a

Re: [HACKERS] TAP backpatching policy

2017-05-31 Thread Joshua D. Drake
On 05/31/2017 07:49 AM, Robert Haas wrote: On Tue, May 30, 2017 at 9:12 PM, Craig Ringer wrote: Thoughts? Backpatch new TAP methods, etc, into back branches routinely? [...] When customers start to doubt that, then they become reluctant to apply new minor versions

Re: [HACKERS] POC: Sharing record typmods between backends

2017-05-31 Thread Andres Freund
On May 31, 2017 11:28:18 AM PDT, Robert Haas wrote: >On Wed, May 31, 2017 at 1:46 PM, Andres Freund >wrote: >> On 2017-05-31 13:27:28 -0400, Dilip Kumar wrote: >>> On Wed, May 31, 2017 at 12:53 PM, Robert Haas > wrote: >>> >

Re: [HACKERS] Re: [GENERAL] pg_basebackup error: replication slot "pg_basebackup_2194" already exists

2017-05-31 Thread Michael Paquier
On Wed, May 31, 2017 at 11:18 AM, Andres Freund wrote: > On 2017-05-31 18:22:18 +0200, Magnus Hagander wrote: >> However, the client can't access the pid of the server as it is now, >> and its the client that has to create the name. > > I don't think that's actually true?

Re: [HACKERS] POC: Sharing record typmods between backends

2017-05-31 Thread Andres Freund
On 2017-05-31 13:27:28 -0400, Dilip Kumar wrote: > On Wed, May 31, 2017 at 12:53 PM, Robert Haas wrote: > > Well, SH_TYPE's members SH_ELEMENT_TYPE *data and void *private_data > > are not going to work in DSM, because they are pointers. You can > > doubtless come up with

Re: [HACKERS] [PATCH] quiet conversion warning in DatumGetFloat4

2017-05-31 Thread Chapman Flack
On 05/31/2017 11:36 AM, Tom Lane wrote: > However, I grant your point that some extensions may have outside > constraints that mandate using -Wconversion, so to the extent that > we can keep key headers like postgres.h from triggering those warnings, > it's probably worth doing. I suspect you're

Re: [HACKERS] An incomplete comment sentence in subtrans.c

2017-05-31 Thread Robert Haas
On Tue, May 30, 2017 at 7:43 PM, Masahiko Sawada wrote: > There is an incomplete sentence at top of subtrans.c file. I think the > commit 88e66d19 removed the whole line mistakenly. Thanks for the patch. Sorry for the mistake that made it necessary. Committed. --

Re: [HACKERS] TAP backpatching policy

2017-05-31 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: > On the other hand, we tell our users that we only back-patch security > and stability fixes. Perhaps I missed where this changed, but my recollection is that we also back-patch bug-fixes, and I don't think we should change that. > When

Re: [HACKERS] Re: [GENERAL] pg_basebackup error: replication slot "pg_basebackup_2194" already exists

2017-05-31 Thread Magnus Hagander
On Wed, May 31, 2017 at 8:18 PM, Andres Freund wrote: > On 2017-05-31 18:22:18 +0200, Magnus Hagander wrote: > > However, the client can't access the pid of the server as it is now, > > and its the client that has to create the name. > > I don't think that's actually true?

Re: [HACKERS] Error while creating subscription when server is running in single user mode

2017-05-31 Thread Michael Paquier
On Wed, May 31, 2017 at 7:01 AM, Dilip Kumar wrote: > On Wed, May 31, 2017 at 7:54 AM, tushar wrote: >> centos@centos-cpula bin]$ ./postgres --single postgres -D m1data >> PostgreSQL stand-alone backend 10beta1 >> backend> create subscription

Re: [HACKERS] POC: Sharing record typmods between backends

2017-05-31 Thread Robert Haas
On Wed, May 31, 2017 at 1:46 PM, Andres Freund wrote: > On 2017-05-31 13:27:28 -0400, Dilip Kumar wrote: >> On Wed, May 31, 2017 at 12:53 PM, Robert Haas wrote: >> > Well, SH_TYPE's members SH_ELEMENT_TYPE *data and void *private_data >> > are not going

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2017-05-31 Thread Michael Paquier
On Tue, May 30, 2017 at 6:50 PM, Álvaro Hernández Tortosa wrote: > Actually this Python patch seems to ultimately rely on the same OpenSSL > functions as your implementation. Yup. My point is that even if those APIs are undocumented, I think that they are not going to

[HACKERS] GSoC 2017 : Proposal for predicate locking in gist index

2017-05-31 Thread Shubham Barai
Hello everyone, I have been accepted as GSoC student for the project "Explicitly support predicate locks in index access methods besides b-tree". I want to share my approach for implementation of page level predicate locking in gist index. Any suggestions will be appreciated. Proposal The

[HACKERS] pg_class.relpartbound definition overly brittle

2017-05-31 Thread Mark Dilger
Hackers, recent changes have introduced the :location field to the partboundspec in pg_catalog.pg_class. This means that if two identical tables with identical partitioning scheme are created, but one is done before a change to gram.y, and the other after a change to gram.y, the relpartbound

Re: [HACKERS] Use of non-restart-safe storage by temp_tablespaces

2017-05-31 Thread Robert Haas
On Tue, May 30, 2017 at 6:50 PM, Mark Dilger wrote: >> On May 29, 2017, at 11:53 AM, Bruce Momjian wrote: >> Right now we don't document that temp_tablespaces can use >> non-restart-safe storage, e.g. /tmp, ramdisks. Would this be safe? >> Should we

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2017-05-31 Thread Robert Haas
On Tue, May 30, 2017 at 11:49 PM, Stephen Frost wrote: > ... and I don't believe that we should be asking the > implementors of channel binding to also implement support for multiple > TLS libraries in PostgreSQL in order to test that their RFC-following > (at least, as far as

Re: [HACKERS] Create subscription with `create_slot=false` and incorrect slot name

2017-05-31 Thread Robert Haas
On Tue, May 30, 2017 at 3:01 PM, Peter Eisentraut wrote: > On 5/25/17 17:26, Peter Eisentraut wrote: >> Another way to fix this particular issue is to not verify the >> replication slot name before doing the drop. After all, if the name is >> not valid, then you

Re: [HACKERS] Error while creating subscription when server is running in single user mode

2017-05-31 Thread Dilip Kumar
On Wed, May 31, 2017 at 7:54 AM, tushar wrote: > centos@centos-cpula bin]$ ./postgres --single postgres -D m1data > PostgreSQL stand-alone backend 10beta1 > backend> create subscription sub connection 'dbname=postgres port=5433 > user=centos' publication p with

[HACKERS] Re: transition table behavior with inheritance appears broken (was: Declarative partitioning - another take)

2017-05-31 Thread Kevin Grittner
On Wed, May 31, 2017 at 1:44 AM, Noah Misch wrote: > IMMEDIATE ATTENTION REQUIRED. I should be able to complete review and testing by Friday. If there are problems I might not take action until Monday; otherwise I should be able to do so on Friday. -- Kevin Grittner VMware

Re: [HACKERS] Use of non-restart-safe storage by temp_tablespaces

2017-05-31 Thread Robert Haas
On Wed, May 31, 2017 at 9:04 AM, Bruce Momjian wrote: > Just to clarify, the TEMPORARY clause would allow the tablespace to > start up empty, while normal tablespaces can't do that, right? Yeah. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise

  1   2   >