Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement PGRXSharedMemory for Deque
Having a double ended queue allows for more efficient FIFO workloads when using shared memory Sample usage: shmem=# select * from deque_count(); deque_count ------------- 0 shmem=# select deque_push_front('{"value1": 2, "value2": 2}'); deque_push_front ------------------ shmem=# select deque_push_front('{"value1": 1, "value2": 1}'); deque_push_front ------------------ shmem=# select deque_push_back('{"value1": 3, "value2": 3}'); deque_push_back ----------------- shmem=# select deque_push_back('{"value1": 4, "value2": 4}'); deque_push_back ----------------- shmem=# select * from deque_select(); deque_select ------------------------- {"value1":1,"value2":1} {"value1":2,"value2":2} {"value1":3,"value2":3} {"value1":4,"value2":4} (4 rows) shmem=# select deque_pop_front(); deque_pop_front ------------------------- {"value1":1,"value2":1} shmem=# select deque_pop_back(); deque_pop_back ------------------------- {"value1":4,"value2":4}
- Loading branch information