Re: [HACKERS] Fun fact about autovacuum and orphan temp tables

2016-10-21 Thread Constantin S. Pan
On Fri, 21 Oct 2016 14:29:24 +0900 Michael Paquier wrote: > That's invasive. I am wondering if a cleaner approach here would be a > flag in deleteOneObject() that performs the lock cleanup, as that's > what you are trying to solve here. The problem occurs earlier, at

Re: [HACKERS] Fun fact about autovacuum and orphan temp tables

2016-10-20 Thread Constantin S. Pan
On Mon, 5 Sep 2016 14:54:05 +0300 Grigory Smolkin wrote: > Hello, hackers! > > We were testing how well some application works with PostgreSQL and > stumbled upon an autovacuum behavior which I fail to understand. > Application in question have a habit to heavily use

Re: [HACKERS] autonomous transactions

2016-09-01 Thread Constantin S. Pan
On Wed, 31 Aug 2016 14:46:30 +0100 Greg Stark wrote: > On Wed, Aug 31, 2016 at 2:50 AM, Peter Eisentraut > wrote: > > - A API interface to open a "connection" to a background worker, run > > queries, get results: AutonomousSessionStart(), > >

Re: [HACKERS] [PATCH] speeding up GIN build with parallel workers

2016-04-08 Thread Constantin S. Pan
Here is a new version of the patch, which: 1. Fixes some minor stylistic issues. 2. Uses binaryheap (instead of a custom ugly stack) for merging. Regards, Constantin S. Pan Postgres Professional: http://www.postgrespro.com The Russian Postgres Company diff --git a/doc/src/sgml/config.sgml b

Re: [HACKERS] [WIP] speeding up GIN build with parallel workers

2016-03-22 Thread Constantin S. Pan
rk together. Thank you for the support and feedback! Fixed all of these in the new version. Also added new queries to 'gin' regression test, which immediately helped me catch one silly bug. The new patch is attached. Regards, Constantin S. Pan Postgres Professional: http://www.postgrespro.com The Russ

Re: [HACKERS] [WIP] speeding up GIN build with parallel workers

2016-03-22 Thread Constantin S. Pan
On Fri, 18 Mar 2016 20:40:16 +0300 Dmitry Ivanov wrote: > Hi Constantin, > > I did a quick review of your patch, and here are my comments: > > - This patch applies cleanly to the current HEAD (61d2ebdbf91). > > - Code compiles without warnings. > > - Currently

Re: [HACKERS] [WIP] speeding up GIN build with parallel workers

2016-03-19 Thread Constantin S. Pan
On Thu, 17 Mar 2016 13:21:32 +0530 Amit Kapila <amit.kapil...@gmail.com> wrote: > On Wed, Mar 16, 2016 at 7:50 PM, Constantin S. Pan <kva...@gmail.com> > wrote: > > > > On Wed, 16 Mar 2016 18:08:38 +0530 > > Amit Kapila <amit.kapil...@gmail.com> wrote: &

Re: [HACKERS] [WIP] speeding up GIN build with parallel workers

2016-03-19 Thread Constantin S. Pan
On Wed, 16 Mar 2016 18:08:38 +0530 Amit Kapila <amit.kapil...@gmail.com> wrote: > On Wed, Mar 16, 2016 at 2:55 PM, Constantin S. Pan <kva...@gmail.com> > wrote: > > > > On Wed, 16 Mar 2016 12:14:51 +0530 > > Amit Kapila <amit.kapil...@gmail.com> wrote:

Re: [HACKERS] [WIP] speeding up GIN build with parallel workers

2016-03-16 Thread Constantin S. Pan
On Wed, 16 Mar 2016 02:43:47 -0700 Peter Geoghegan <p...@heroku.com> wrote: > On Wed, Mar 16, 2016 at 2:25 AM, Constantin S. Pan <kva...@gmail.com> > wrote: > > The backend just waits for the results from the workers and merges > > them (in case wnum > 0). So

Re: [HACKERS] [WIP] speeding up GIN build with parallel workers

2016-03-16 Thread Constantin S. Pan
On Wed, 16 Mar 2016 12:14:51 +0530 Amit Kapila <amit.kapil...@gmail.com> wrote: > On Wed, Mar 16, 2016 at 5:41 AM, Constantin S. Pan <kva...@gmail.com> > wrote: > > > On Mon, 14 Mar 2016 08:42:26 -0400 > > David Steele <da...@pgmasters.net> wrote: > >

Re: [HACKERS] [WIP] speeding up GIN build with parallel workers

2016-03-15 Thread Constantin S. Pan
On Mon, 14 Mar 2016 08:42:26 -0400 David Steele <da...@pgmasters.net> wrote: > On 2/18/16 10:10 AM, Constantin S. Pan wrote: > > On Wed, 17 Feb 2016 23:01:47 +0300 > > Oleg Bartunov <obartu...@gmail.com> wrote: > > > >> My feedback is (Mac OS X 10.

Re: [HACKERS] [WIP] speeding up GIN build with parallel workers

2016-02-18 Thread Constantin S. Pan
On Wed, 17 Feb 2016 23:01:47 +0300 Oleg Bartunov wrote: > My feedback is (Mac OS X 10.11.3) > > set gin_parallel_workers=2; > create index message_body_idx on messages using gin(body_tsvector); > LOG: worker process: parallel worker for PID 5689 (PID 6906) was > terminated

Re: [HACKERS] [WIP] speeding up GIN build with parallel workers

2016-02-17 Thread Constantin S. Pan
17, 2016 at 7:55 AM, Constantin S. Pan <kva...@gmail.com> > wrote: > > 4. Hit the 8x speedup limit. Made some analysis of the reasons (see > > the attached plot or the data file). > > Did you actually compare this to the master branch? I wouldn't like to > assume

Re: [HACKERS] [WIP] speeding up GIN build with parallel workers

2016-02-17 Thread Constantin S. Pan
On Sat, 16 Jan 2016 01:38:39 +0300 "Constantin S. Pan" <kva...@gmail.com> wrote: > The task of building GIN can require lots of time and eats 100 % CPU, > but we could easily make it use more than a 100 %, especially since we > now have parallel workers in postgres. >

Re: [HACKERS] Proposal: speeding up GIN build with parallel workers

2016-01-17 Thread Constantin S. Pan
On Fri, 15 Jan 2016 15:29:51 -0800 Peter Geoghegan <p...@heroku.com> wrote: > On Fri, Jan 15, 2016 at 2:38 PM, Constantin S. Pan <kva...@gmail.com> > wrote: > Even without parallelism, wouldn't it be better if GIN indexes were > built using tuplesort? I know way way le

[HACKERS] Proposal: speeding up GIN build with parallel workers

2016-01-15 Thread Constantin S. Pan
, for which the parallel mode does not work. Please leave your feedback. Regards, Constantin S. Pan Postgres Professional: http://www.postgrespro.com The Russian Postgres Company diff --git a/src/backend/access/gin/gininsert.c b/src/backend/access/gin/gininsert.c index 8bcd159..6ea8f78 100644 --- a/src