Elvis Pranskevichus

Results 335 comments of Elvis Pranskevichus

Please post a complete traceback for the error you're getting. Had it been the culprit, `max_inactive_connection_lifetime` set to `3` would make this error occur _more_ frequently, not less.

It looks like your server is dropping the connections for some reason: > ConnectionResetError: [Errno 104] Connection reset by peer Your setting `max_inactive_connection_lifetime` to a very low value "fixes" that...

Assuming you are referring to the new [logical replication commands](https://www.postgresql.org/docs/devel/static/logical-replication.html) in the upcoming PostgreSQL 10, there's no need for a special API in asyncpg. You can issue these commands like...

In that case also, ``conn.fetch('SELECT * pg_logical_slot_get_changes(...)')`` would work. What are you looking from asyncpg in this case specifically?

AFAIK, Postgres does not send protocol-level notifications on the arrival of replicated data. It's a stream you need to poll yourself. Just create an asyncio task on a separate connection...

Just to clarify, there _IS_ an entirely separate replication protocol: https://www.postgresql.org/docs/9.6/static/protocol-replication.html. However, that is very low level: you essentially deal with the raw WAL log. It's not clear whether there's...

I'll keep this open. We may potentially look into implementing support for the replication protocol.

In short, there's no way to apply backpressure on notifications sent by the server, since these are completely asynchronous at the protocol level. That said, it may be possible to...

There's no public API, but you can get to the socket like this: `conn._transport.get_extra_info('socket')`

Looks like a good improvement to me. Feel free to send a PR!