Comments (10)
@zont I'll take a look at it now
from node-connect-pg-simple.
Added this pull request: #174. All tests ran successfully.
from node-connect-pg-simple.
Seems ok.
from node-connect-pg-simple.
I'll keep this open until I've tested and merged the PR 🙂
from node-connect-pg-simple.
We are really looking forward to this fix.
from node-connect-pg-simple.
Shipped in 6.2.0
from node-connect-pg-simple.
Thanks!
Until then, and preferably also after, one can provide a connection pool oneself: https://github.com/voxpelli/node-connect-pg-simple#advanced-options If there's nothing breaking in pg
8.x then it should just work
from node-connect-pg-simple.
I tried that but experienced problems...
import session from 'express-session';
import { native as pgNative } from 'pg';
import ConnectPgSimple from 'connect-pg-simple'; // depends on pg < 8.0.3
import config from '../../config/environment';
const pgNativePool = new pgNative.Pool({
max: 10, // default
connectionString: config.pg.uri
});
// Persist Express sessions in PostgreSQL
const pgSession = new ConnectPgSimple(session);
const store = new pgSession({
pgNativePool,
tableName: 'sessions'
});
export default {
store // Hangs in Node 14 without errors (classic pg < 8.0.3 problem)
};
from node-connect-pg-simple.
@nstuyvesant looks like your PR works - many thanks!
For any yarn
users looking for a temporary fix:
yarn remove connect-pg-simple
yarn add https://github.com/nstuyvesant/node-connect-pg-simple.git#adcb6c4642db88e6de47e3aea48a71b5ab3569fa
from node-connect-pg-simple.
Place where the Node 14 fix was made: brianc/node-postgres#2171
from node-connect-pg-simple.
Related Issues (20)
- createTableIfMissing not working HOT 17
- Error thrown when setting a session when connecting to Heroku-hosted PostgreSQL HOT 2
- @types/pg as dev dependency HOT 7
- Use ES6 import HOT 3
- Change `pg` to a peer dependency HOT 2
- db.bit.io issues HOT 8
- 'Failed to prune sessions: con.connect is not a function' when trying to connect PostgreSQL database with session store via Knex.js HOT 1
- error: date/time field value out of range: "1655239143" HOT 4
- Failed to prune sessions: relation "session" does not exist HOT 3
- Two sessions being saved to store HOT 1
- If at the first try to create the session table the database is down, the store fails forever HOT 3
- Getting error "Error: connect ECONNREFUSED ip_address:5432" intermittently when the RDS is restarted.
- Getting error "Error: connect ECONNREFUSED ip_address:5432" intermittently when the RDS is restarted. HOT 2
- Unexpected token in node_module index.js HOT 2
- Using "pruneSessionInterval=false" will unexpectedly disable "createTableIfMissing=true" HOT 3
- Property "replaceAll" does not exist on type "string". HOT 4
- pg-simples tries to access wrong column HOT 1
- createTableIfMissing is not working in version: 9.0.0 HOT 5
- TypeError: (0 , connect_pg_simple_1.default) is not a function HOT 2
- session_id is ignored and a new one is generated instead HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-connect-pg-simple.