Repository: ponder-sh/ponder
Pull request #1663 (2025-04-11 18:16:24)

set idle_in_transaction_session_timeout


Patch:
diff --git a/.changeset/lucky-papayas-grin.md b/.changeset/lucky-papayas-grin.md
new file mode 100644
index 00000000..3811b35b
--- /dev/null
+++ b/.changeset/lucky-papayas-grin.md
@@ -0,0 +1,5 @@
+---
+"ponder": patch
+---
+
+Increased `idle_in_transaction_session_timeout` to 1 hour.
diff --git a/packages/client/CHANGELOG.md b/packages/client/CHANGELOG.md
index af573829..d4004ae7 100644
--- a/packages/client/CHANGELOG.md
+++ b/packages/client/CHANGELOG.md
@@ -1,7 +1,5 @@
 # @ponder/client
 
-## 0.10.12
-
 ## 0.10.11
 
 ### Patch Changes
diff --git a/packages/client/package.json b/packages/client/package.json
index 642aa582..23fa51dc 100644
--- a/packages/client/package.json
+++ b/packages/client/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@ponder/client",
-  "version": "0.10.12",
+  "version": "0.10.11",
   "description": "",
   "license": "MIT",
   "type": "module",
diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md
index adc4b8f7..c32c003e 100644
--- a/packages/core/CHANGELOG.md
+++ b/packages/core/CHANGELOG.md
@@ -1,11 +1,5 @@
 # ponder
 
-## 0.10.12
-
-### Patch Changes
-
-- [#1658](https://github.com/ponder-sh/ponder/pull/1658) [`7e4fe861fb4a6788d7d272da2434409d1979ac51`](https://github.com/ponder-sh/ponder/commit/7e4fe861fb4a6788d7d272da2434409d1979ac51) Thanks [@kyscott18](https://github.com/kyscott18)! - Fixed a bug that would cause errors similar to `error: invalid input syntax for type numeric: "{"1"}"`.
-
 ## 0.10.11
 
 ### Patch Changes
diff --git a/packages/core/package.json b/packages/core/package.json
index 86f651d0..d18562ed 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -1,6 +1,6 @@
 {
   "name": "ponder",
-  "version": "0.10.12",
+  "version": "0.10.11",
   "description": "An open-source framework for crypto application backends",
   "license": "MIT",
   "type": "module",
diff --git a/packages/core/src/indexing-store/profile.ts b/packages/core/src/indexing-store/profile.ts
index a9563ac7..3798247d 100644
--- a/packages/core/src/indexing-store/profile.ts
+++ b/packages/core/src/indexing-store/profile.ts
@@ -132,7 +132,7 @@ export const recordProfilePattern = (
         for (const argKey of Object.keys(event.event.args)) {
           const argValue = event.event.args[argKey];
 
-          if (typeof argValue !== "object" && eq(argValue, value)) {
+          if (eq(argValue, value)) {
             result[js] = `args.${argKey}`;
           }
         }
@@ -207,7 +207,7 @@ export const recordProfilePattern = (
         for (const argKey of Object.keys(event.event.args)) {
           const argValue = event.event.args[argKey];
 
-          if (typeof argValue !== "object" && eq(argValue, value)) {
+          if (eq(argValue, value)) {
             result[js] = `args.${argKey}`;
           }
         }
diff --git a/packages/core/src/utils/pg.ts b/packages/core/src/utils/pg.ts
index b0332bc5..e5a1a853 100644
--- a/packages/core/src/utils/pg.ts
+++ b/packages/core/src/utils/pg.ts
@@ -53,14 +53,19 @@ export function createPool(config: PoolConfig, logger: Logger) {
     ): void | Promise<void> {
       if (callback) {
         super.connect(() => {
-          this.query("SET synchronous_commit = off;", callback);
+          this.query(
+            `
+            SET synchronous_commit = off;
+            SET idle_in_transaction_session_timeout = 3600000;`,
+            callback,
+          );
         });
       } else {
-        return super
-          .connect()
-          .then(() =>
-            this.query("SET synchronous_commit = off;").then(() => {}),
-          );
+        return super.connect().then(() =>
+          this.query(`
+            SET synchronous_commit = off;
+            SET idle_in_transaction_session_timeout = 3600000;`).then(() => {}),
+        );
       }
     }
   }
diff --git a/packages/create-ponder/CHANGELOG.md b/packages/create-ponder/CHANGELOG.md
index ee46f54b..2f4732f3 100644
--- a/packages/create-ponder/CHANGELOG.md
+++ b/packages/create-ponder/CHANGELOG.md
@@ -1,7 +1,5 @@
 # create-ponder
 
-## 0.10.12
-
 ## 0.10.11
 
 ## 0.10.10
diff --git a/packages/create-ponder/package.json b/packages/create-ponder/package.json
index e0511ca0..89de5253 100644
--- a/packages/create-ponder/package.json
+++ b/packages/create-ponder/package.json
@@ -1,6 +1,6 @@
 {
   "name": "create-ponder",
-  "version": "0.10.12",
+  "version": "0.10.11",
   "type": "module",
   "description": "A CLI tool to create Ponder apps",
   "license": "MIT",
diff --git a/packages/eslint-config-ponder/CHANGELOG.md b/packages/eslint-config-ponder/CHANGELOG.md
index fe54e92d..d46582c4 100644
--- a/packages/eslint-config-ponder/CHANGELOG.md
+++ b/packages/eslint-config-ponder/CHANGELOG.md
@@ -1,7 +1,5 @@
 # eslint-config-ponder
 
-## 0.10.12
-
 ## 0.10.11
 
 ## 0.10.10
diff --git a/packages/eslint-config-ponder/package.json b/packages/eslint-config-ponder/package.json
index 807f068f..dfe64501 100644
--- a/packages/eslint-config-ponder/package.json
+++ b/packages/eslint-config-ponder/package.json
@@ -1,6 +1,6 @@
 {
   "name": "eslint-config-ponder",
-  "version": "0.10.12",
+  "version": "0.10.11",
   "description": "ESLint config for Ponder apps",
   "license": "MIT",
   "main": "./index.js",
diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md
index 827b570a..d5f011fc 100644
--- a/packages/react/CHANGELOG.md
+++ b/packages/react/CHANGELOG.md
@@ -1,12 +1,5 @@
 # @ponder/react
 
-## 0.10.12
-
-### Patch Changes
-
-- Updated dependencies []:
-  - @ponder/client@0.10.12
-
 ## 0.10.11
 
 ### Patch Changes
diff --git a/packages/react/package.json b/packages/react/package.json
index e03efadc..7ef24dc1 100644
--- a/packages/react/package.json
+++ b/packages/react/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@ponder/react",
-  "version": "0.10.12",
+  "version": "0.10.11",
   "description": "React hooks for Ponder",
   "license": "MIT",
   "repository": {
@@ -37,7 +37,7 @@
     "superjson": "^2.2.2"
   },
   "peerDependencies": {
-    "@ponder/client": ">=0.10.12",
+    "@ponder/client": ">=0.10.11",
     "@tanstack/react-query": ">=5.0.0",
     "react": ">=18",
     "typescript": ">=5.0.4"


Test patch:
diff --git a/packages/core/src/indexing-store/profile.test.ts b/packages/core/src/indexing-store/profile.test.ts
index bd60a446..de84ec72 100644
--- a/packages/core/src/indexing-store/profile.test.ts
+++ b/packages/core/src/indexing-store/profile.test.ts
@@ -204,42 +204,3 @@ test("recordProfilePattern() hint", () => {
       }
     `);
 });
-
-test("recordProfilePattern() object args", () => {
-  const event = {
-    type: "log",
-    chainId: 1,
-    checkpoint: ZERO_CHECKPOINT_STRING,
-    name: "",
-    event: {
-      id: ZERO_CHECKPOINT_STRING,
-      args: {
-        address: [zeroAddress],
-      },
-      log: {} as LogEvent["event"]["log"],
-      transaction: {} as LogEvent["event"]["transaction"],
-      block: {} as BlockEvent["event"]["block"],
-    },
-  } satisfies LogEvent;
-
-  const schema = {
-    account: onchainTable("account", (p) => ({
-      address: p.hex().primaryKey(),
-      balance: p.bigint().notNull(),
-    })),
-  };
-
-  const primaryKeyCache = new Map<Table, [string, Column][]>();
-
-  primaryKeyCache.set(schema.account, [["address", schema.account.address]]);
-
-  const pattern = recordProfilePattern(
-    event,
-    schema.account,
-    { address: zeroAddress },
-    [],
-    primaryKeyCache,
-  );
-
-  expect(pattern).toBe(undefined);
-});