Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Fabrízio Mello <fabriziomello(at)gmail(dot)com>
Cc: Dilip kumar <dilip(dot)kumar(at)huawei(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Jan Lentfer <Jan(dot)Lentfer(at)web(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>, Euler Taveira <euler(at)timbira(dot)com(dot)br>
Subject: Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]
Date: 2015-01-29 09:39:52
Message-ID: CAFj8pRC9xk1SwZ4pyn6hcxGYLC1U4hy=V8NSmYpFz8yJH6fcUQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2015-01-29 10:28 GMT+01:00 Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
:

>
>
> Em quinta-feira, 29 de janeiro de 2015, Pavel Stehule <
> pavel(dot)stehule(at)gmail(dot)com> escreveu:
>
> Hi
>>
>> I am testing this feature on relative complex schema (38619 tables in db)
>> and I got deadlock
>>
>> [pavel(at)localhost bin]$ /usr/local/pgsql/bin/vacuumdb test2 -fz -j 4
>> vacuumdb: vacuuming database "test2"
>> vacuumdb: vacuuming of database "test2" failed: ERROR: deadlock detected
>> DETAIL: Process 24689 waits for RowExclusiveLock on relation 2608 of
>> database 194769; blocked by process 24690.
>> Process 24690 waits for AccessShareLock on relation 1249 of database
>> 194769; blocked by process 24689.
>> HINT: See server log for query details.
>>
>> ERROR: deadlock detected
>> DETAIL: Process 24689 waits for RowExclusiveLock on relation 2608 of
>> database 194769; blocked by process 24690.
>> Process 24690 waits for AccessShareLock on relation 1249 of
>> database 194769; blocked by process 24689.
>> Process 24689: VACUUM (FULL, ANALYZE) pg_catalog.pg_attribute;
>> Process 24690: VACUUM (FULL, ANALYZE) pg_catalog.pg_depend;
>> HINT: See server log for query details.
>> STATEMENT: VACUUM (FULL, ANALYZE) pg_catalog.pg_attribute;
>> ERROR: canceling statement due to user request
>> STATEMENT: VACUUM (FULL, ANALYZE) pg_catalog.pg_depend;
>> ERROR: canceling statement due to user request
>> STATEMENT: VACUUM (FULL, ANALYZE) pg_catalog.pg_class;
>> ERROR: canceling statement due to user request
>> STATEMENT: VACUUM (FULL, ANALYZE) pg_catalog.pg_proc;
>> LOG: could not send data to client: Broken pipe
>> STATEMENT: VACUUM (FULL, ANALYZE) pg_catalog.pg_proc;
>> FATAL: connection to client lost
>> LOG: could not send data to client: Broken pipe
>> ERROR: canceling statement due to user request
>> FATAL: connection to client lost
>>
>> Schema | Name | Type | Owner | Size |
>> Description
>>
>> ------------+-------------------------+-------+----------+------------+-------------
>> pg_catalog | pg_attribute | table | postgres | 439 MB |
>> pg_catalog | pg_rewrite | table | postgres | 314 MB |
>> pg_catalog | pg_proc | table | postgres | 136 MB |
>> pg_catalog | pg_depend | table | postgres | 133 MB |
>> pg_catalog | pg_class | table | postgres | 69 MB |
>> pg_catalog | pg_attrdef | table | postgres | 55 MB |
>> pg_catalog | pg_trigger | table | postgres | 47 MB |
>> pg_catalog | pg_type | table | postgres | 31 MB |
>> pg_catalog | pg_description | table | postgres | 23 MB |
>> pg_catalog | pg_index | table | postgres | 20 MB |
>> pg_catalog | pg_constraint | table | postgres | 17 MB |
>> pg_catalog | pg_shdepend | table | postgres | 17 MB |
>> pg_catalog | pg_statistic | table | postgres | 928 kB |
>> pg_catalog | pg_operator | table | postgres | 552 kB |
>> pg_catalog | pg_collation | table | postgres | 232 kB |
>>
>>
>>
>

should not be used a pessimist controlled locking instead?

Regards

Pavel

>
> Regards,
>
> Fabrízio
>
>
>
> --
> Fabrízio de Royes Mello
> Consultoria/Coaching PostgreSQL
> >> Timbira: http://www.timbira.com.br
> >> Blog: http://fabriziomello.github.io
> >> Linkedin: http://br.linkedin.com/in/fabriziomello
> >> Twitter: http://twitter.com/fabriziomello
> >> Github: http://github.com/fabriziomello
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2015-01-29 11:35:34 small postgresql.conf.sample bugfix
Previous Message Fabrízio de Royes Mello 2015-01-29 09:28:24 Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]