Re: Parallel COPY FROM execution

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alex K <kondratov(dot)aleksey(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Stephen Frost <sfrost(at)snowman(dot)net>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Anastasia Lubennikova <lubennikovaAV(at)gmail(dot)com>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, David Steele <david(at)pgmasters(dot)net>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: Re: Parallel COPY FROM execution
Date: 2017-08-11 18:07:56
Message-ID: CA+TgmoafL=h5cqbV+-LQ59Eu4uaPhYCzJCTPSifrHyziQCpmfA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 11, 2017 at 9:55 AM, Alex K <kondratov(dot)aleksey(at)gmail(dot)com> wrote:
> - I have used both Latch and ConditionalVariable for the same
> purpose–wait until some signal
> occurs–and for me as an end user they perform quite similar. I
> looked into the condition_variable.c
> code and it uses Latch and SpinLock under the hood. So what are
> differences and dis-/advantages
> between Latch and ConditionalVariable?

A ConditionVariable lets you signal the processes that are waiting
without needing to know in advance exactly which processes those are.
If you use latches directly, you'll have to somehow keep track of
which processes need to be signaled.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2017-08-11 19:50:47 Re: WIP Patch: Pgbench Serialization and deadlock errors
Previous Message Robert Haas 2017-08-11 18:05:08 Re: Lazy hash table for XidInMVCCSnapshot (helps Zipfian a bit)