PostgreSQL: CreationDateTime and LastUpdateToPayPerRequestDateTime carry microseconds, where DynamoDB sends milliseconds
メンテナーはふだん 5 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
調査の方向性
crates/storage-postgres/src/create_table.rs、crates/storage-postgres/src/table_helpers.rs、crates/storage-postgres/src/delete_table.rsを読み、creation_date_timeをエポックからの秒数として取り出すクエリに注目してください。issueの提案どおり、これらのクエリ結果をミリ秒単位に切り捨て、CreateTable、DescribeTable、UpdateTable、DeleteTableのレスポンスを対象とするPostgreSQLのテストを確認してください。変更前に作成されたテーブルも含め、これらの日付の小数点以下が最大3桁になれば完了です。
索引モデルが issue の本文から書いたものです。
説明
On the PostgreSQL backend, CreateTable, DescribeTable and UpdateTable send CreationDateTime as epoch seconds with microseconds. DescribeTable sends the same value as BillingModeSummary.LastUpdateToPayPerRequestDateTime. Amazon DynamoDB sends every date member as epoch seconds with at most three decimal places.
Measured in us-east-1 on 2026-11-14 and 2026-11-16, with each response body read as text. On 2026-11-14 each request went out twice, and every date member of both answers had three decimal places. The requests were a CreateTable of an on-demand table (pk S HASH, BillingMode PAY_PER_REQUEST), a DescribeTable once it was ACTIVE, and a CreateBackup of it. A second table got a CreateTable with ProvisionedThroughput 5/7, then an UpdateTable that raised it to 9/11. DynamoDB writes the numbers in exponent form. The ExtendDB column gives the numbers as ExtendDB sent them on PostgreSQL:
| Member | DynamoDB, 2026-11-14 | ExtendDB on PostgreSQL |
|---|---|---|
CreateTable TableDescription.CreationDateTime |
1.794674022596E9 |
1794835907.194914 |
DescribeTable Table.CreationDateTime |
1.794674022596E9 |
1794835907.194914 |
DescribeTable Table.BillingModeSummary.LastUpdateToPayPerRequestDateTime |
1.794674022596E9 |
1794835907.194914 |
CreateBackup BackupDetails.BackupCreationDateTime |
1.794674033829E9 |
1794835908.235 |
UpdateTable TableDescription.CreationDateTime of the second table |
1.794674033901E9 |
1794835908.25337 |
ExtendDB at origin/main 95425f5e8 gives these answers on PostgreSQL. A second run gave 1794836584.375861 and 1794836585.48558. The other backends send at most three decimal places: SQLite, SQLite in dev mode and MongoDB send whole seconds, and Cassandra sends milliseconds (1794836695.516).
create_table.rs (crates/storage-postgres/src/create_table.rs) stores creation_date_time as NOW() (line 262) in a TIMESTAMPTZ column (crates/storage-postgres/migrations/0001_baseline.sql, line 40), which keeps microseconds. The insert returns EXTRACT(EPOCH FROM creation_date_time)::FLOAT8 (line 269). build_table_description_on (crates/storage-postgres/src/table_helpers.rs, line 133) reads the column the same way at line 142, and build_table_description_from_row (line 190) copies the value into LastUpdateToPayPerRequestDateTime at line 306. The DeleteTable query reads it the same way (crates/storage-postgres/src/delete_table.rs, line 49). BackupCreationDateTime has three decimal places because pg_timestamp_to_epoch (crates/storage-postgres/src/backup_engine.rs, line 56) converts a whole-millisecond instant as milliseconds over 1000, and a backup's creation time is a whole millisecond.
Proposed change: truncate the creation time to the millisecond in the three queries that read it, for example EXTRACT(EPOCH FROM date_trunc('milliseconds', creation_date_time))::FLOAT8. Tables created before the change then also answer with at most three decimal places.
- 主要言語
- Rust
- スター
- 517
- フォーク
- 60
- 平均マージ
- 5日 14時間
- マージ済み PR(30日)
- 124
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ExtendDB/extenddb のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 87/100
メンテナーはふだん 5 日以内に返信
ExtendDB/extenddb の issue をすべて見る
似ている issue
-
bug studies ui
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
userFRM/egui-charts#3308 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
marketing
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
meerkat-lang/meerkat#279 ·
メンテナーはふだん 1 日以内に返信
-
a launchd removal test races the fake's refusal against bootout under load対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
nledford/Ladderback#907 ·
メンテナーはふだん 1 日以内に返信