Re: [HACKERS] Proposal: Local indexes for partitioned table

2017-10-23 Thread Amit Langote
On 2017/10/24 1:15, Alvaro Herrera wrote: > Robert Haas wrote: >> On Mon, Oct 23, 2017 at 11:12 AM, Alvaro Herrera >> wrote: >>> I started with Maksim's submitted code, and developed according to the >>> ideas discussed in this thread. Attached is a very WIP patch series

Re: [HACKERS] [sqlsmith] Failed assertion in adjust_appendrel_attrs_mutator

2017-10-23 Thread Amit Langote
On 2017/10/24 0:22, Tom Lane wrote: > Amit Langote writes: >> On 2017/10/23 2:07, Tom Lane wrote: >>> Hmm. adjust_appendrel_attrs() thinks it's only used after conversion >>> of sublinks to subplans, but this is a counterexample. I wonder if >>> that assumption

Re: [HACKERS] Block level parallel vacuum WIP

2017-10-23 Thread Masahiko Sawada
On Mon, Oct 23, 2017 at 10:43 AM, Amit Langote wrote: > On 2017/10/22 5:25, Thomas Munro wrote: >> On Sun, Oct 22, 2017 at 5:09 AM, Robert Haas wrote: >>> On Tue, Sep 19, 2017 at 3:31 AM, Masahiko Sawada >>> wrote:

Re: [HACKERS] SIGSEGV in BRIN autosummarize

2017-10-23 Thread Alvaro Herrera
Tom Lane wrote: > What I'm suspicious of as the actual bug cause is the comment in > perform_work_item about how we need to be sure that we're allocating these > strings in a long-lived context. If, in fact, they were allocated in some > context that could get reset during the PG_TRY

Re: [HACKERS] path toward faster partition pruning

2017-10-23 Thread Rajkumar Raghuwanshi
On Thu, Oct 19, 2017 at 12:16 PM, Amit Langote < langote_amit...@lab.ntt.co.jp> wrote: > Description of the attached patches: > > 0001: add new tests for partition-pruning > > 0002: patch that makes all the changes needed in the planer (adds a stub > function in partition.c) > > 0003: patch

Re: [HACKERS] How to determine that a TransactionId is really aborted?

2017-10-23 Thread Craig Ringer
On 23 October 2017 at 05:44, Eric Ridge wrote: >> On Oct 22, 2017, at 3:24 PM, Peter Geoghegan wrote: >> Again, you'll probably need to put this low level requirement into >> context if you want sound advice from this list. > > I'm just thinking out lout here,

[HACKERS] [bug fix] ECPG: fails to recognize embedded parameters

2017-10-23 Thread Tsunakawa, Takayuki
Hello, This is an actual problem that our customer hit. In ECPG, opening a cursor fails which is declared as follows: EXEC SQL DECLARE cur CURSOR FOR SELECT oid, datname FROM pg_database WHERE datname LIKE 'post%' ESCAPE '\' AND

Re: [HACKERS] make async slave to wait for lsn to be replayed

2017-10-23 Thread Alexander Korotkov
On Mon, Oct 23, 2017 at 12:42 PM, Ivan Kartyshov wrote: > New little cleanup code changes > Despite code cleanup, you still have some random empty lines removals in your patch. @@ -149,7 +150,6 @@ const struct config_enum_entry sync_method_options[] = { > {NULL,

Re: [HACKERS] make async slave to wait for lsn to be replayed

2017-10-23 Thread Ivan Kartyshov
Alexander Korotkov писал 2017-09-26 12:07: I propose following syntax options. WAITLSN lsn; WAITLSN lsn TIMEOUT delay; WAITLSN lsn INFINITE; WAITLSN lsn NOWAIT; For me that looks rather better. What do you think? I agree with you, now syntax looks better. New patch attached to tha mail.

Re: [HACKERS] make async slave to wait for lsn to be replayed

2017-10-23 Thread Ivan Kartyshov
New little cleanup code changes -- Ivan Kartyshov Postgres Professional: http://www.postgrespro.com The Russian Postgres Companycommit 217f842726531edb1b0056a5c5727ab01bab7f9b Author: i.kartyshov Date: Mon Oct 23 12:08:59 2017 +0300 Cherry picked and ported

Re: [HACKERS] [sqlsmith] Failed assertion in adjust_appendrel_attrs_mutator

2017-10-23 Thread Amit Langote
On 2017/10/23 2:07, Tom Lane wrote: > Andreas Seltenreich writes: >> testing master as of 7c981590c2, sqlsmith just triggered the following >> assertion: >> TRAP: FailedAssertion("!(!const Node*)(node))->type) == T_SubLink))", >> File: "prepunion.c", Line: 2231) > > Hmm.

Re: [HACKERS] path toward faster partition pruning

2017-10-23 Thread Rajkumar Raghuwanshi
On Mon, Oct 23, 2017 at 1:12 PM, Amit Langote wrote: > The compiler I have here (gcc (GCC) 6.2.0) didn't complain like that for > this typedef redefinition introduced by the 0002 patch, but it seems that > it's not needed anyway, so got rid of that line in the

Re: [HACKERS] [POC] Faster processing at Gather node

2017-10-23 Thread Amit Kapila
On Thu, Oct 19, 2017 at 1:16 AM, Robert Haas wrote: > On Tue, Oct 17, 2017 at 5:39 PM, Andres Freund wrote: > >>b) Use shm_mq_sendv in tqueue.c by batching up insertions into the >> queue whenever it's not empty when a tuple is ready. > >

Re: [HACKERS] make async slave to wait for lsn to be replayed

2017-10-23 Thread Ivan Kartyshov
Alexander Korotkov писал 2017-10-23 13:19: Despite code cleanup, you still have some random empty lines removals in your patch. I reconfigured my IDE to avoid this in the future. -- Ivan Kartyshov Postgres Professional: http://www.postgrespro.com The Russian Postgres Companydiff --git

Re: [HACKERS] [POC] Faster processing at Gather node

2017-10-23 Thread Amit Kapila
On Wed, Oct 18, 2017 at 3:09 AM, Andres Freund wrote: > Hi Everyone, > > On 2017-05-19 17:25:38 +0530, Rafia Sabih wrote: >> While analysing the performance of TPC-H queries for the newly developed >> parallel-operators, viz, parallel index, bitmap heap scan, etc. we noticed

[HACKERS] Re: [BUGS] BUG #14849: jsonb_build_object doesn't like VARIADIC calls very much

2017-10-23 Thread Michael Paquier
On Mon, Oct 23, 2017 at 7:03 AM, Michael Paquier wrote: >> Looks good otherwise. > > My set of diffs for funcapi.h are actually that: > * funcapi.h > * Definitions for functions which return composite type and/or sets > + * or work on VARIADIC inputs. > [...] >

Re: [HACKERS] BLK_DONE state in XLogReadBufferForRedoExtended

2017-10-23 Thread Amit Kapila
On Tue, Oct 17, 2017 at 7:53 AM, Michael Paquier wrote: > On Mon, Oct 16, 2017 at 9:50 PM, Amit Kapila wrote: >> If above analysis is correct, then I think we can say that row state >> in a page will be same during recovery as it was when the

Re: [HACKERS] [sqlsmith] Failed assertion in adjust_appendrel_attrs_mutator

2017-10-23 Thread Tom Lane
Amit Langote writes: > On 2017/10/23 2:07, Tom Lane wrote: >> Hmm. adjust_appendrel_attrs() thinks it's only used after conversion >> of sublinks to subplans, but this is a counterexample. I wonder if >> that assumption was ever correct? Or maybe we need to

Re: [HACKERS] Allow GiST opcalsses without compress\decompres functions

2017-10-23 Thread Andrey Borodin
> 22 окт. 2017 г., в 21:21, Tom Lane написал(а): > > Andrey Borodin writes: >> I was looking for a way to correctly drop compress\decompress functions from >> opclasses. > > Making a new opclass seems like a pretty grotty answer; it won't > help

Re: [HACKERS] legitimacy of using PG_TRY , PG_CATCH , PG_END_TRY in C function

2017-10-23 Thread Craig Ringer
On 23 October 2017 at 16:16, Craig Ringer wrote: > On 23 October 2017 at 08:30, John Lumby wrote: > >> All works but not perfectly -- at COMMIT, resource_owner issues >> relcache reference leak messages about relation scans not closed >> and also

Re: [HACKERS] legitimacy of using PG_TRY , PG_CATCH , PG_END_TRY in C function

2017-10-23 Thread Andres Freund
On 2017-10-23 16:16:10 +0800, Craig Ringer wrote: > On 23 October 2017 at 08:30, John Lumby wrote: > > > All works but not perfectly -- at COMMIT, resource_owner issues > > relcache reference leak messages about relation scans not closed > > and also about snapshot

Re: [HACKERS] legitimacy of using PG_TRY , PG_CATCH , PG_END_TRY in C function

2017-10-23 Thread Craig Ringer
On 23 October 2017 at 08:30, John Lumby wrote: > All works but not perfectly -- at COMMIT, resource_owner issues > relcache reference leak messages about relation scans not closed > and also about snapshot still active. I guess that the CREATE has > switched

Re: [HACKERS] legitimacy of using PG_TRY , PG_CATCH , PG_END_TRY in C function

2017-10-23 Thread Andres Freund
On 2017-10-22 23:04:50 -0400, Tom Lane wrote: > John Lumby writes: > > I have a C function (a trigger function) which uses the PG_TRY() > > construct to handle certain ERROR conditions. > > One example is where invoked as INSTEAD OF INSERT into a view. It > > PG_TRYs

Re: [HACKERS] Proposal: Local indexes for partitioned table

2017-10-23 Thread Alvaro Herrera
Robert Haas wrote: > On Mon, Oct 23, 2017 at 11:12 AM, Alvaro Herrera > wrote: > > I started with Maksim's submitted code, and developed according to the > > ideas discussed in this thread. Attached is a very WIP patch series for > > this feature. > > > > Many things

Re: [HACKERS] path toward faster partition pruning

2017-10-23 Thread Beena Emerson
On Mon, Oct 23, 2017 at 3:24 PM, Rajkumar Raghuwanshi wrote: > > On Mon, Oct 23, 2017 at 1:12 PM, Amit Langote > wrote: >> >> The compiler I have here (gcc (GCC) 6.2.0) didn't complain like that for >> this typedef

Re: [HACKERS] Proposal: Local indexes for partitioned table

2017-10-23 Thread Alvaro Herrera
Hello I started with Maksim's submitted code, and developed according to the ideas discussed in this thread. Attached is a very WIP patch series for this feature. Many things remain to be done before this is committable: pg_dump support needs to be written. ALTER INDEX ATTACH/DETACH not yet

Re: [HACKERS] Proposal: Local indexes for partitioned table

2017-10-23 Thread Robert Haas
On Mon, Oct 23, 2017 at 11:12 AM, Alvaro Herrera wrote: > I started with Maksim's submitted code, and developed according to the > ideas discussed in this thread. Attached is a very WIP patch series for > this feature. > > Many things remain to be done before this is