Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement PGRXSharedMemory for Deque #1170

Commits on Jun 20, 2023

  1. 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}
    feikesteenbergen committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    4465502 View commit details
    Browse the repository at this point in the history