Re: Information regarding Table-Locks

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: sri harsha <sriharsha9992(at)gmail(dot)com>
Cc: John R Pierce <pierce(at)hogranch(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Information regarding Table-Locks
Date: 2015-01-16 05:52:18
Message-ID: CAECtzeVB=nRS1x339Siiv7FEDvmyxHZsy3L3UdeYnBP3Nd3haA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Le 16 janv. 2015 06:27, "sri harsha" <sriharsha9992(at)gmail(dot)com> a écrit :
>
> Hi John.
>
> What if my query was INSERT INTO Postgres_Table_A SELECT * FROM
Postgres_Table_B ?? What are the locks given for the two tables ??
>

If they are both regular tables, they can insert at the same time. But you
can't rename a take while it's being read or written.

> --Harsha
>
>
> On Fri, Jan 16, 2015 at 10:50 AM, John R Pierce <pierce(at)hogranch(dot)com>
wrote:
>>
>> On 1/15/2015 9:14 PM, sri harsha wrote:
>>>
>>> What kind of lock will the second table will be in ?
>>
>>
>> I suspect that depends on what FOREIGN_TABLE is connected to.
>>
>>
>>
>> --
>> john r pierce 37N 122W
>> somewhere on the middle of the left coast
>>
>>
>>
>> --
>> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-general
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Paquier 2015-01-16 05:52:34 Re: can you have any idea about toast missing chunk issu resolution
Previous Message M Tarkeshwar Rao 2015-01-16 05:38:35 Re: can you have any idea about toast missing chunk issu resolution