Thread: Writing to a database or schema on a slave

Writing to a database or schema on a slave

From
Wells Oliver
Date:
Hey everyone. I'd like to create a schema on my slave so that users who do not have access to the master can create some data. Clearly this data won't be replicated, since it's on the slave, but will it cause any problems w/ data integrity to have it on the slave?

--
Wells Oliver
wellsoliver@gmail.com

Re: Writing to a database or schema on a slave

From
"Kevin Grittner"
Date:
Wells Oliver <wellsoliver@gmail.com> wrote:

> I'd like to create a schema on my slave so that users who do not
> have access to the master can create some data. Clearly this data
> won't be replicated, since it's on the slave, but will it cause
> any problems w/ data integrity to have it on the slave?

What are you using for replication?

-Kevin

Re: Writing to a database or schema on a slave

From
Wells Oliver
Date:
I am using the WAL method w/ 9.1.

On Tue, Apr 10, 2012 at 4:29 PM, Kevin Grittner <Kevin.Grittner@wicourts.gov> wrote:
Wells Oliver <wellsoliver@gmail.com> wrote:

> I'd like to create a schema on my slave so that users who do not
> have access to the master can create some data. Clearly this data
> won't be replicated, since it's on the slave, but will it cause
> any problems w/ data integrity to have it on the slave?

What are you using for replication?

-Kevin



--
Wells Oliver
wellsoliver@gmail.com

Re: Writing to a database or schema on a slave

From
"Kevin Grittner"
Date:
[rearranged; please don't top-post]

Wells Oliver <wellsoliver@gmail.com> wrote:
> Kevin Grittner <Kevin.Grittner@wicourts.gov wrote:
>> Wells Oliver <wellsoliver@gmail.com> wrote:
>>
>>> I'd like to create a schema on my slave so that users who do not
>>> have access to the master can create some data. Clearly this
>>> data won't be replicated, since it's on the slave, but will it
>>> cause any problems w/ data integrity to have it on the slave?
>>
>> What are you using for replication?

> I am using the WAL method w/ 9.1.

Then the replica must be read-only; you can't create anything on
that PostgreSQL instance because it is a block-level copy of the
master database cluster.  You would need to use logical replication
(for example, Slony) to do what you describe, or store the new
schema on another cluster and use dblink or a foreign data wrapper.

-Kevin