pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Tomonari Katsumata <katsumata.tomonari@po.ntts.co.jp>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #6042: unlogged table with Streaming Replication
Date: Fri, 27 May 2011 15:15:05 +0900
Message-ID: <4DDF4169.9040001@po.ntts.co.jp> (raw)
In-Reply-To: <BANLkTimPMtycTh0k_jYkAkSeZbYx607bFQ@mail.gmail.com>
References: <201105270526.p4R5Qlxs072183@wwwmaster.postgresql.org>
<BANLkTimPMtycTh0k_jYkAkSeZbYx607bFQ@mail.gmail.com>
Hi, Jaime
thank you for your answer.
I understand it.
I turned synchronous_commit to "local",
I get desirable behavior.
I've thought that if there are no standby,
the primary would behave like stand-alone...
sorry, this is my misunderstanding.
regards,
(2011/05/27 14:53), Jaime Casanova wrote:
> On Fri, May 27, 2011 at 12:26 AM, Tomonari Katsumata
> <katsumata.tomonari@po.ntts.co.jp> wrote:
>>
>> I've checked "unlogged table" and "Streaming Replication".
>> I'm thinking about using unlogged tables as work-tables on Primary.
>>
>> 1) construct Streaming Replication Environment.
>> Primary and Standby are same server with different database cluster and
>> port number.
>>
>> 2) create unlogged table on Primary.
>> =# CREATE UNLOGGED TABLE tbl1(i int);
>> This table is available on primary only.
>>
> because streaming replication works shipping WAL records (the records
> of the transactional log) to the standby but because UNLOGGED tables
> are not logged to WAL i guess those always will be empty on standby,
> but the table should appear on the standby, i guess
>
>
>> 4) create unlogged table on Primary again.
>> =# CREATE UNLOGGED TABLE tbl2(i int);
>>
>> when I executed 4), any response is not back to my psql. and I canceled the
>> query, I got messages bellow.
>> ---
>> Cancel request sent
>> WARNING: canceling wait for synchronous replication due to user request
>> DETAIL: The transaction has already committed locally, but may not have
>> been replicated to the standby.
>> CREATE TABLE
>> ---
>> and the table has been created.
>>
>> I think It's strange behavior(a canceled table has been created).
>>
> actually, you're not cancelling the creation... the table has been
> created and the wal is being sent to the standby (because the standby
> is a synchronous standby, it keeps waiting until the standby aknlowdge
> to have received the wal), so what you are cancelling now is the
> primary waiting for the standby...
>
>
> btw, i guess we should be defaulting to asynchronous standbys (ie:
> synchronous_commit=local)
>
view thread (5+ messages) latest in thread
Message-ID: <4DDF4169.9040001@po.ntts.co.jp> Permalink: ../4DDF4169.9040001@po.ntts.co.jp/ Also on: postgresql.org/message-id/4DDF4169.9040001@po.ntts.co.jp ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-bugs@postgresql.org Cc: katsumata.tomonari@po.ntts.co.jp Subject: Re: BUG #6042: unlogged table with Streaming Replication In-Reply-To: <4DDF4169.9040001@po.ntts.co.jp> References: <201105270526.p4R5Qlxs072183@wwwmaster.postgresql.org> <BANLkTimPMtycTh0k_jYkAkSeZbYx607bFQ@mail.gmail.com> <4DDF4169.9040001@po.ntts.co.jp> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox