diff --git a/docs/notice-for-admins.md b/docs/notice-for-admins.md index 0ce284348c..f19ba921d5 100644 --- a/docs/notice-for-admins.md +++ b/docs/notice-for-admins.md @@ -2,6 +2,26 @@ You can skip intermediate versions when upgrading from an old version, but please read the notices and follow the instructions for each intermediate version before [upgrading](./upgrade.md). +## Unreleased + +We regret to inform you that the upgrade may take a long time to fix a regression we have introduced. The time required to upgrade should be the same as [v20240413](). This is not a security fix, so please upgrade your server when you have enough time. We are sorry for the inconvenience. + +
+ +There are two data types in PostgreSQL to store time: `timestamptz` (`timestamp with time zone`) and `timestamp` (`timestamp without time zone`) [[ref]](). + +In Node.js, we manipulate the database using [TypeORM](). TypeORM handles time data as a JavaScript `Date` object. Since `Date` doesn't have timezone information [[ref]](), we don't use the timezone information in the Node.js backend, and both `timestamptz` and `timestamp` behave in the same way. (Technically, the type names are a little confusing, and `timestamptz` (`timestamp with time zone`) doesn't store the timezone data. Please read PostgreSQL documentation for more information.) + +In Rust, we manipulate the database using [SeaORM](), which does distinguish between `timestamptz` and `timestamp`. `timestamptz` is converted to [`DateTime`]() type, whereas `timestamp` is converted to [`NaiveDateTime`](). + +We are using [napi-rs]() to implement some of the backend features in Rust, which did not support `DateTime`. We used to store time data as `timestamptz`, but we converted them to `timestamp` for this reason. As we don't use timezone data, we thought this was okay, and indeed it worked fine. + +However, we did not consider the case of migrating a server (hardware) to another timezone. With `timestamp`, there may be inconsistencies in the time data if you migrate your server to another system with a different timezone setting (Docker/Podman users should not be affected by this, as UTC is always used in containers unless you explicitly set one). + +Therefore, we have contributed to napi-rs to add support for `DateTime` () and decided to migrate back from `timestamp` to `timestamptz` to properly address this problem. The migration process takes time roughly proportional to the number of stored posts. + +
+ ## v20240516 ### For all users