-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pg_partman as optional dependency (#18)
* bring your own pg connection * bump ver * pg_partman is optional * update err statement * update readme * Update integration_test.rs * fix test * fix some clippy warnings
- Loading branch information
Showing
9 changed files
with
82 additions
and
42 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ A lightweight distributed message queue. Like [AWS SQS](https://aws.amazon.com/s | |
- API parity with [AWS SQS](https://aws.amazon.com/sqs/) and [RSMQ](https://github.com/smrchy/rsmq) | ||
- Messages stay in the queue until explicitly deleted | ||
- Messages can be archived, instead of deleted, for long-term retention and replayability | ||
- Table (bloat) maintenance automated with [pg_partman](https://github.com/pgpartman/pg_partman) | ||
- High performance operations with index-only scans. | ||
|
||
## Table of Contents | ||
|
@@ -54,8 +53,8 @@ psql postgres://postgres:[email protected]:5432/postgres | |
``` | ||
|
||
```sql | ||
-- create the extension, pg_partman is also required | ||
CREATE EXTENSION pgmq CASCADE; | ||
-- create the extension | ||
CREATE EXTENSION pgmq; | ||
``` | ||
|
||
### Creating a queue | ||
|
@@ -201,7 +200,9 @@ pgmq=# SELECT pgmq_delete('my_queue', 3); | |
|
||
## Partitioned Queues | ||
|
||
`pgmq` queue tables can be created as a paritioned table by using pgmq_create_partitioned(). [pg_partman](https://github.com/pgpartman/pg_partman/) | ||
You will need to install [pg_partman](https://github.com/pgpartman/pg_partman/) if you want to use `pgmq` paritioned queues. | ||
|
||
`pgmq` queue tables can be created as a partitioned table by using pgmq_create_partitioned(). [pg_partman](https://github.com/pgpartman/pg_partman/) | ||
handles all maintenance of queue tables. This includes creating new partitions and dropping old partitions. | ||
|
||
Partitions behavior is configured at the time queues are created, via `pgmq_create_partitioned()`. This function has a three parameters: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
comment = 'Distributed message queues' | ||
comment = 'A lightweight message queue. Like AWS SQS and RSMQ but on Postgres.' | ||
default_version = '@CARGO_VERSION@' | ||
module_pathname = '$libdir/pgmq' | ||
relocatable = false | ||
superuser = false | ||
requires = 'pg_partman' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters