We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Postgres engine default keepalives_idle value causes setsockopt(TCP_KEEPIDLE) invalid value
Get `OperationalError: connection to server at "localhost" (127.0.0.1), port 5432 failed: setsockopt(TCP_KEEPIDLE) failed: Invalid argument` when run `feast apply`.
Because of `keepalives_idle=config.keepalives_idle` field in function '_get_conn' in `infra/utils/postgres/connection_utils.py` file. For example, to avoid this error I need to pass 'keepalives_idle=1', but that argument isn't parsed for the registry in feature_store.yaml and pass 'keepalives_idle=0' by default setting in `infra/utils/postgres/postgres_config.py`. 

- Version: 0.33.1
- Platform: linux ubuntu 20.04
- Subsystem:

## Possible Solution
Check this issue with the same problem https://github.com/TobikoData/sqlmesh/issues/750. I think you shouldn't pass 'keepalives_idle=0' by default.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `sdk/python/feast/infra/utils/postgres/postgres_config.py`
Content:
```
1 from enum import Enum
2 from typing import Optional
3 
4 from pydantic import StrictStr
5 
6 from feast.repo_config import FeastConfigBaseModel
7 
8 
9 class ConnectionType(Enum):
10     singleton = "singleton"
11     pool = "pool"
12 
13 
14 class PostgreSQLConfig(FeastConfigBaseModel):
15     min_conn: int = 1
16     max_conn: int = 10
17     conn_type: ConnectionType = ConnectionType.singleton
18     host: StrictStr
19     port: int = 5432
20     database: StrictStr
21     db_schema: StrictStr = "public"
22     user: StrictStr
23     password: StrictStr
24     sslmode: Optional[StrictStr] = None
25     sslkey_path: Optional[StrictStr] = None
26     sslcert_path: Optional[StrictStr] = None
27     sslrootcert_path: Optional[StrictStr] = None
28     keepalives_idle: int = 0
29
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/sdk/python/feast/infra/utils/postgres/postgres_config.py b/sdk/python/feast/infra/utils/postgres/postgres_config.py
--- a/sdk/python/feast/infra/utils/postgres/postgres_config.py
+++ b/sdk/python/feast/infra/utils/postgres/postgres_config.py
@@ -25,4 +25,4 @@
     sslkey_path: Optional[StrictStr] = None
     sslcert_path: Optional[StrictStr] = None
     sslrootcert_path: Optional[StrictStr] = None
-    keepalives_idle: int = 0
+    keepalives_idle: Optional[int] = None

{"golden_diff": "diff --git a/sdk/python/feast/infra/utils/postgres/postgres_config.py b/sdk/python/feast/infra/utils/postgres/postgres_config.py\n--- a/sdk/python/feast/infra/utils/postgres/postgres_config.py\n+++ b/sdk/python/feast/infra/utils/postgres/postgres_config.py\n@@ -25,4 +25,4 @@\n     sslkey_path: Optional[StrictStr] = None\n     sslcert_path: Optional[StrictStr] = None\n     sslrootcert_path: Optional[StrictStr] = None\n-    keepalives_idle: int = 0\n+    keepalives_idle: Optional[int] = None\n", "issue": "Postgres engine default keepalives_idle value causes setsockopt(TCP_KEEPIDLE) invalid value\nGet `OperationalError: connection to server at \"localhost\" (127.0.0.1), port 5432 failed: setsockopt(TCP_KEEPIDLE) failed: Invalid argument` when run `feast apply`.\r\nBecause of `keepalives_idle=config.keepalives_idle` field in function '_get_conn' in `infra/utils/postgres/connection_utils.py` file. For example, to avoid this error I need to pass 'keepalives_idle=1', but that argument isn't parsed for the registry in feature_store.yaml and pass 'keepalives_idle=0' by default setting in `infra/utils/postgres/postgres_config.py`. \r\n\r\n- Version: 0.33.1\r\n- Platform: linux ubuntu 20.04\r\n- Subsystem:\r\n\r\n## Possible Solution\r\nCheck this issue with the same problem https://github.com/TobikoData/sqlmesh/issues/750. I think you shouldn't pass 'keepalives_idle=0' by default.\n", "before_files": [{"content": "from enum import Enum\nfrom typing import Optional\n\nfrom pydantic import StrictStr\n\nfrom feast.repo_config import FeastConfigBaseModel\n\n\nclass ConnectionType(Enum):\n    singleton = \"singleton\"\n    pool = \"pool\"\n\n\nclass PostgreSQLConfig(FeastConfigBaseModel):\n    min_conn: int = 1\n    max_conn: int = 10\n    conn_type: ConnectionType = ConnectionType.singleton\n    host: StrictStr\n    port: int = 5432\n    database: StrictStr\n    db_schema: StrictStr = \"public\"\n    user: StrictStr\n    password: StrictStr\n    sslmode: Optional[StrictStr] = None\n    sslkey_path: Optional[StrictStr] = None\n    sslcert_path: Optional[StrictStr] = None\n    sslrootcert_path: Optional[StrictStr] = None\n    keepalives_idle: int = 0\n", "path": "sdk/python/feast/infra/utils/postgres/postgres_config.py"}], "after_files": [{"content": "from enum import Enum\nfrom typing import Optional\n\nfrom pydantic import StrictStr\n\nfrom feast.repo_config import FeastConfigBaseModel\n\n\nclass ConnectionType(Enum):\n    singleton = \"singleton\"\n    pool = \"pool\"\n\n\nclass PostgreSQLConfig(FeastConfigBaseModel):\n    min_conn: int = 1\n    max_conn: int = 10\n    conn_type: ConnectionType = ConnectionType.singleton\n    host: StrictStr\n    port: int = 5432\n    database: StrictStr\n    db_schema: StrictStr = \"public\"\n    user: StrictStr\n    password: StrictStr\n    sslmode: Optional[StrictStr] = None\n    sslkey_path: Optional[StrictStr] = None\n    sslcert_path: Optional[StrictStr] = None\n    sslrootcert_path: Optional[StrictStr] = None\n    keepalives_idle: Optional[int] = None\n", "path": "sdk/python/feast/infra/utils/postgres/postgres_config.py"}]}