Commit Graph

17 Commits

Author SHA1 Message Date
Mario Montoya ae7fee64d4 Make optional to listen to pg wire protocol and param for the port (#3309)
# Description of Changes

As the title says.

Add `--pg-port NUM` to the `start` command

# API and ABI breaking changes

Before this, it was set to `5432` unconditionally.

Docs updated at https://github.com/clockworklabs/SpacetimeDB/pull/3302.

# Expected complexity level and risk
1

# Testing

- [x] Run smoke tests
2025-09-29 18:19:38 -04:00
Mario Montoya 8adef2b93b Support for the PG wire protocol (#2702)
# Description of Changes

Closes
[#2686](https://github.com/clockworklabs/SpacetimeDB/issues/2686).

Add support for listening using the [PG wire
protocol](https://www.postgresql.org/docs/current/protocol.html) so `pg`
clients could be used against the database.

# API and ABI breaking changes

The output of `duration` is changed to `rfc3339`, instead of the way is
made with `sats` because is what is done in `pg`, see note below.

# Expected complexity level and risk

2

~~There is open questions that are in the [ticket
#2686](https://github.com/clockworklabs/SpacetimeDB/issues/2686). Also
the crate used here require `RustTls`, so it could be good idea to
decide if~~:

* ~~Rewrite a big chunk of code to use `OpenSSL`~~
* ~~Move to `RustTls`
https://github.com/clockworklabs/SpacetimeDB/pull/1700~~
* ~~Pay for the extra compilation cost~~.

I open another port(`5433`) to listen for `pg` connections using `ssl`.
Need to be decided if this is the way or instead try to multi-plex the
current port for both protocols.

# Testing

Only manual testing so far. Solving the above questions allow me to
implement some unit tests. Also, not yet integrated into cloud for the
same reasons.

- [x] Adding some test for the binary encoding of special and primitive
types
- [x] Smoke test using `psql` that connect to the db instance and run
some queries
- [x] Manually inspect using a UI database explorer how infer the types,
some of this tools generate special widgets when displaying `json,
duration, etc`

---------

Co-authored-by: Noa <coolreader18@gmail.com>
2025-09-10 19:58:03 +00:00
Kim Altintop 6b9b0e3b81 smoketests: Fix server restarts and make more robust (#2977) 2025-07-23 15:29:43 +00:00
joshua-spacetime 172c060b4e Add comment on Time Stamp Counter (TSC) for profiling with tracy (#2304) 2025-02-25 19:15:45 +00:00
Noa 6a8375260f Refactor HTTP api to better adhere to REST guidelines (real) (#2243) 2025-02-11 02:59:45 +00:00
Noa f136670420 Directory structure impl (#1879)
Co-authored-by: Jeffrey Dallatezza <jeffreydallatezza@gmail.com>
2024-11-12 04:24:43 +00:00
Kim Altintop 820ace12b1 Remove sendgrid (#1860) 2024-10-16 17:49:42 +00:00
John Detter 4e530a55c2 Updated docker internal port to 3000 (#1626)
Co-authored-by: John Detter <no-reply@boppygames.gg>
2024-08-23 18:16:18 +00:00
Kim Altintop 4b9f30f5a0 ci: Exercise the right discipline to restart docker containers (#632)
One does not simply restart a docker container. But when you do,
SpacetimeDB also restarts.
2023-12-07 19:32:19 +01:00
joshua-spacetime c265ed195f refactor(metrics): Move metric builder macros into their own crate 2023-12-05 10:26:41 -08:00
joshua-spacetime 6dc3030e70 Add SPACETIMEDB_TRACY to dev environment (#200) 2023-08-18 15:06:26 -07:00
Tyler Cloutier 970c46e082 Fixed issue with docker-compose 2023-08-12 17:51:29 -07:00
John Detter 9c3b4d6e3f Keys are now stored in docker named volume so they survive down/up (#42)
Co-authored-by: Boppy <no-reply@boppygames.gg>
2023-08-01 23:17:02 +02:00
John Detter aab4170b87 Sendgrid environment variables can now be configured in dev (#4)
Signed-off-by: John Detter <4099508+jdetter@users.noreply.github.com>
Co-authored-by: Boppy <no-reply@boppygames.gg>
2023-08-01 23:17:02 +02:00
Tyler Cloutier e29a5e50d3 Fixed network issue 2023-08-01 23:17:02 +02:00
Tyler Cloutier 0b6cddca13 test (#1)
* test

* Fixed CI

* Fixed tests

* Fixed formatting

* Fixed test error by removing chrono default features

* Rename smoketests CI thing

* Hopefully fix the testing issue

* Fix typos

* Fixed install git-hooks

* Fixed formatting

* Fixed compile error

* fixed testing issues
2023-08-01 23:17:02 +02:00
Tyler Cloutier 44df6c6e7d Initial commit 2023-08-01 23:16:37 +02:00