Re: Testing hot standby on same server sharing same tablespace directory

From: Sreekanth Palluru <Sreekanth(dot)Palluru(at)superchoice(dot)com(dot)au>
To: Ian Barwick <ian(at)2ndquadrant(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Testing hot standby on same server sharing same tablespace directory
Date: 2016-04-28 04:57:23
Message-ID: 4CCCD44C0EB1284FA34A4FDD88B7E4E8E649C5@abel.nb.superchoice.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Thanks Ian

-----Original Message-----
From: Ian Barwick [mailto:ian(at)2ndquadrant(dot)com]
Sent: Thursday, 28 April 2016 11:55 AM
To: Sreekanth Palluru <Sreekanth(dot)Palluru(at)superchoice(dot)com(dot)au>; pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] Testing hot standby on same server sharing same tablespace directory

On 04/28/2016 08:45 AM, Sreekanth Palluru wrote:
>
> Hi
>
> I am testing hot standby on same server (version 9.5.2) , everything works well.
> I have a doubt regarding sharing of tablespace directory by these two databases .
>
> I have created a tablespace and moved few objects and I happen to see
> that same directory was being used by standby node aka slave node and
> to my surprise it still works without any issues.
>
> Is this expected ?

Both instances will start and initially appear to function, but you are guaranteed to run into unexpected behaviour and some kind of corruption.

Try e.g. creating and populating a table, then pausing replay on the standby; then drop and recreate/repopulate the same table.

> I was expecting some sort of warnings from Postgres or am I missing
> something

No, there's nothing which could warn about this particular scenario.

Regards

Ian Barwick

--
Ian Barwick http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Dave Johansen 2016-04-29 16:39:50 Re: Deadlock when inserting from multiple processes
Previous Message Ian Barwick 2016-04-28 01:55:26 Re: Testing hot standby on same server sharing same tablespace directory