# Confusion about sync\_state table creation in CloudQuery PostgreSQL integration

**URL:** <https://community.cloudquery.io/t/confusion-about-sync-state-table-creation-in-cloudquery-postgresql-integration/692>\
**Category:** CloudQuery Plugins\
**Created:** [September 29, 2023, 4:19pm UTC](https://community.cloudquery.io/t/confusion-about-sync-state-table-creation-in-cloudquery-postgresql-integration/692 "2023-09-29T16:19:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![romantic-sheepdog](https://avatars.discourse-cdn.com/v4/letter/r/f9ae1b/32.png) [@romantic-sheepdog](https://community.cloudquery.io/u/romantic-sheepdog)\
**Post date:** [September 29, 2023, 4:19pm UTC](https://community.cloudquery.io/t/confusion-about-sync-state-table-creation-in-cloudquery-postgresql-integration/692/1 "2023-09-29T16:19:34Z")

</div>

Hi,

I’m trying out CloudQuery for the first time. So far, so good - I only tried the Shopify/PostgreSQL integration, since I have a handy test store. It works really well.

However, I’m a bit confused by `sync_state`, even after reading the docs twice.

```yaml
kind: source
# Common source-plugin configuration
spec:
  name: shopify
  path: cloudquery/shopify
  version: "v3.1.1"
  tables: ["*"]
  destinations: ["postgresql"]
  # Shopify specific configuration
  spec:
    backend_options:
      table_name: "shopify_postgres_state"
      connection: "@@plugins.postgresql.connection"

```

My assumption was that this will create a table `shopify_postgres_state` in my PostgreSQL DB, but I don’t see it anywhere. So when I’m rerunning sync, it’s going through the same items again.

Did I mess something up, or simply misunderstand how it works?

---

<div class="post-metadata">

**Author:** ![herman](https://sea1.discourse-cdn.com/flex001/user_avatar/community.cloudquery.io/herman/32/27_2.png) [@herman](https://community.cloudquery.io/u/herman)\
**Post date:** [September 29, 2023, 4:23pm UTC](https://community.cloudquery.io/t/confusion-about-sync-state-table-creation-in-cloudquery-postgresql-integration/692/2 "2023-09-29T16:23:16Z")

</div>

Hmm, I could be wrong, but I think this is a mistake in our Shopify plugin documentation. The `backend_options` setting needs to move one level up.

Can you try with the following config?

```auto
kind: source
# Common source-plugin configuration
spec:
  name: shopify
  path: cloudquery/shopify
  version: "v3.1.1"
  tables: ["*"]
  destinations: ["postgresql"]
  backend_options:
    table_name: "shopify_postgres_state"
    connection: "@@plugins.postgresql.connection"
  # Shopify specific configuration
  spec:

```

---

<div class="post-metadata">

**Author:** ![romantic-sheepdog](https://avatars.discourse-cdn.com/v4/letter/r/f9ae1b/32.png) [@romantic-sheepdog](https://community.cloudquery.io/u/romantic-sheepdog)\
**Post date:** [September 29, 2023, 4:46pm UTC](https://community.cloudquery.io/t/confusion-about-sync-state-table-creation-in-cloudquery-postgresql-integration/692/3 "2023-09-29T16:46:37Z")

</div>

Thanks. Will try that right now.  
You are correct. The table was just created. Will need to wait until the sync, and will report back in 30 mins.  
Excellent.  
That was it.
