inserts into partitioned table may cause crash

2018-02-28 Thread Amit Langote
I've run into what seems to be a bug in ExecInsert() that causes a crash when inserting multiple rows into a partitioned table that each go into different partitions with different tuple descriptors. Crash occurs if ExecInsert() returns without resetting estate->es_result_relation_info back to

Re: Wait event names mismatch: oldserxid

2018-02-28 Thread Michael Paquier
On Tue, Feb 27, 2018 at 02:44:37PM -0500, Robert Haas wrote: > On Fri, Feb 9, 2018 at 8:53 AM, Michael Paquier wrote: >> So the docs look correct to me on this side. What I find weird is the >> phrasing to define oldserxid. Instead of that, the current description: >>

Re: inserts into partitioned table may cause crash

2018-02-28 Thread Amit Langote
On 2018/02/28 17:36, Amit Langote wrote: > I've run into what seems to be a bug in ExecInsert() that causes a crash > when inserting multiple rows into a partitioned table that each go into > different partitions with different tuple descriptors. Crash occurs if > ExecInsert() returns without

Re: [HACKERS] path toward faster partition pruning

2018-02-28 Thread David Rowley
On 27 February 2018 at 22:33, Amit Langote wrote: > Attached an updated version in which I incorporated some of the revisions > that David Rowley suggested to OR clauses handling (in partprune.c) that > he posted as a separate patch on the run-time pruning thread

Function to track shmem reinit time

2018-02-28 Thread Anastasia Lubennikova
Attached patch introduces a new function pg_shmem_init_time(), which returns the time shared memory was last (re)initialized. It is created for use by monitoring tools to track backend crashes. Currently, if the 'restart_after_crash' option is on, postgres will just restart. And the only way

Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)

2018-02-28 Thread Shubham Barai
On 28 February 2018 at 05:51, Thomas Munro wrote: > On Wed, Jan 3, 2018 at 4:31 AM, Shubham Barai > wrote: > > I have created new isolation tests. Please have a look at > > updated patch. > > Hi Shubham, > > Could we please have a rebased

Re: [HACKERS] path toward faster partition pruning

2018-02-28 Thread Robert Haas
On Tue, Feb 27, 2018 at 8:12 PM, Amit Langote wrote: > Ah, OK. I was missing that there is no need to have both parttypcoll and > partcollation in PartitionSchemeData, as the Vars in rel->partexprs are > built from a bare PartitionKey (not PartitionSchemeData), and

Re: Changing the autovacuum launcher scheduling; oldest table first algorithm

2018-02-28 Thread Grigory Smolkin
On 02/28/2018 12:04 PM, Masahiko Sawada wrote: Hi, I've created the new thread for the changing AV launcher scheduling. The problem of AV launcher scheduling is described on [1] but I summarize it here. If there is even one database that is at risk of wraparound, currently AV launcher

Re: [HACKERS] user-defined numeric data types triggering ERROR: unsupported type

2018-02-28 Thread Tomas Vondra
OK, time to revive this old thread ... On 09/23/2017 05:27 PM, Tom Lane wrote: > Tomas Vondra writes: [ scalarineqsel may fall over when used by extension operators ] > >> What about using two-pronged approach: > >> 1) fall back to mid bucket in back branches

Re: [HACKERS] MERGE SQL Statement for PG11

2018-02-28 Thread Robert Haas
On Tue, Feb 27, 2018 at 5:07 PM, Peter Geoghegan wrote: > I now feel like Simon's suggestion of throwing an error in corner > cases isn't so bad. It still seems like we could do better, but the > more I think about it, the less that seems like a cop-out. My reasons > are: I still

Re: Registering LWTRANCHE_PARALLEL_HASH_JOIN

2018-02-28 Thread Robert Haas
On Tue, Feb 27, 2018 at 3:58 PM, Thomas Munro wrote: > On Wed, Feb 28, 2018 at 8:39 AM, Robert Haas wrote: >> On Sat, Feb 10, 2018 at 6:07 PM, Thomas Munro >> wrote: >>> I forgot to register a display name for

Re: Online enabling of checksums

2018-02-28 Thread Robert Haas
On Sun, Feb 25, 2018 at 9:54 AM, Magnus Hagander wrote: > Also if that wasn't clear -- we only do the full page write if there isn't > already a checksum on the page and that checksum is correct. Hmm. Suppose that on the master there is a checksum on the page and that

Re: Parallel index creation & pg_stat_activity

2018-02-28 Thread Andres Freund
Hi Peter, On 2018-02-28 16:50:44 +, Phil Florent wrote: > With an index creation (create index t1_i1 on t1(c1, c2);) I have this kind > of output : > > ./t -d 20 -o "pid, backend_type, query, wait_event_type, wait_event" > busy_pc | distinct_exe | pid | backend_type | query

Re: [HACKERS] path toward faster partition pruning

2018-02-28 Thread Ashutosh Bapat
On Wed, Feb 28, 2018 at 6:42 AM, Amit Langote wrote: > On 2018/02/28 1:05, Robert Haas wrote: >> On Mon, Feb 26, 2018 at 10:59 PM, Amit Langote >> wrote: >>> You may say that partition bounds might have to be different too in this >>>

Re: [HACKERS] path toward faster partition pruning

2018-02-28 Thread Ashutosh Bapat
On Tue, Feb 27, 2018 at 3:03 PM, Amit Langote wrote: > Attached an updated version in which I incorporated some of the revisions > that David Rowley suggested to OR clauses handling (in partprune.c) that > he posted as a separate patch on the run-time pruning thread

<    1   2