Skip to content

egor-georgiev/pgcat-sticky-cursors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pgcat Sticky Cursors

What is this?

This is a repository with instructions on how to reproduce an issue with PgCat connection pooler

Prerequisites

  • docker w/ compose plugin
  • psql
  • make

How to reproduce

  1. start up the database server, connection pooler and client
make up # bring up postgres and pgcat
make session # run psql through a session-mode connection
  1. create a cursor
select * from pg_cursors; -- verify that there are no cursors in the connection
declare cursor_name no scroll cursor with hold for select 1; -- declare a cursor
select * from pg_cursors; -- verify that the cursor now exists in the connection
  1. simulate an unexpected exit
# run in another console
make kill-psql
  1. re-connect and verify that the cursor persists
  • make session
  • select * from pg_cursors;

Clean Up

make down

About

proof of concept for a github issue

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published