> For the complete documentation index, see [llms.txt](https://docs.tonic.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tonic.ai/fabricate/data-masking/masking-db-reqs/masking-db-general-reqs.md).

# General database requirements

## Supported database platforms <a href="#masking-db-platforms" id="masking-db-platforms"></a>

Fabricate data masking is supported on:

* PostgreSQL
* SQL Server

The source and destination databases must use the same database platform.

## Do not write to the source database during masking <a href="#no-source-db-write-during-masking" id="no-source-db-write-during-masking"></a>

When the masking is in progress, do not write to the source database.

Instead of using a production database, we recommend that you use a snapshot or a restored copy.

## Destination database is for masking output only <a href="#destination-db-for-masking-only" id="destination-db-for-masking-only"></a>

Only use the destination database for the masking output.

While the masking is in progress, do not allow other sessions to write to the destination tables or to hold locks on them.

## Establish direct connections to both the source and destination <a href="#masking-db-direct-connections" id="masking-db-direct-connections"></a>

Connect to both the source and destination databases directly.

Do not use a pooler or a proxy that moves a client to a different server session between statements.

## Handling of tables that do not have a primary key <a href="#masking-db-no-primary-key" id="masking-db-no-primary-key"></a>

Masking does not require a primary key.

When a table does not have a primary key, the following masking features are not available:

* **Resuming an interrupted masking:** When the masking is interrupted, the table must be processed again from the start. It cannot continue from where it stopped.
* **JavaScript transforms:** The table cannot use the transforms.
* **Subsets:** Any table that does not have a primary key is excluded from a subset, unless you indicate to include the entire table as a reference table.
* **Scaling:** You cannot use masking to add records to a table that does not have either a primary key or a non-null unique key.
* **Rebuilding a column from its parent's masked values:** Not available for the table.

The Data Agent indicates when tables do not have a primary key and how that affects the destination data.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.tonic.ai/fabricate/data-masking/masking-db-reqs/masking-db-general-reqs.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
