[HACKERS] Most efficient way for libPQ .. PGresult serialization

2016-08-17 Thread Joshua Bay
Hi, I was trying to implement a middleware that lies between client and postgres. So, this middleware is supposed to run query with libpq, do its job on them, and then serialize the result of query, and send it to the client ! (client deserializes to PGresult) I could simply iterate over rows an

Re: [HACKERS] Way to access LSN (for each transaction) by directly talking to postgres?

2016-08-17 Thread Joshua Bay
Sorry I forgot to reply. Thanks! using decoding plugins works great On Wed, Aug 3, 2016 at 8:37 PM, Michael Paquier wrote: > On Thu, Aug 4, 2016 at 3:02 AM, Joshua Bay wrote: > > Could you please tell me how I can get LSN of each transaction at decoder > > plugin? > > C

Re: [HACKERS] Most efficient way for libPQ .. PGresult serialization

2016-08-18 Thread Joshua Bay
cated. So, I was asking if there is an easy way to achieve serialization Thanks! On Thu, Aug 18, 2016 at 1:33 AM, Tatsuo Ishii wrote: > > On 18 August 2016 at 10:05, Joshua Bay wrote: > > > >> Hi, > >> > >> I was trying to implement a middlewar

Re: [HACKERS] Most efficient way for libPQ .. PGresult serialization

2016-08-22 Thread Joshua Bay
on is sent back to the result? On Sat, Aug 20, 2016 at 2:39 AM, Craig Ringer wrote: > On 19 August 2016 at 22:16, Joshua Bay wrote: > >> Oh I see. >> I just read more on use cases PgBouncer, but seems like it can't be used >> for my project. >> The reason

Re: [HACKERS] Most efficient way for libPQ .. PGresult serialization

2016-08-22 Thread Joshua Bay
2016 at 9:05 PM, Craig Ringer wrote: > > On 19 August 2016 at 03:08, Joshua Bay wrote: > >> Thanks, >> But I don't think my question was clear enough. >> >> I already managed the connection pooling, and what I need is to serialize >> the result. >>

[HACKERS] Logical decoding

2016-07-08 Thread Joshua Bay
Hi, I have a question about logical decoding of Postgres. where are the entry points to logical decoding? Specifically, we want to know whether logical decoding happens immediately after commit, or whether there is a polling thread that scans the Write Ahead Log and then dumps to the special t

Re: [COMMITTERS] [HACKERS] Logical decoding

2016-08-03 Thread Joshua Bay
aig Ringer > wrote: > > > On 9 July 2016 at 01:57, Joshua Bay wrote: > > >> and where are this code is in the codebase? > > > > > > src/backend/replication/logical/* > > > src/backend/replication/walsender.c > > > src/backend/access/transam/

[HACKERS] Way to access LSN (for each transaction) by directly talking to postgres?

2016-08-03 Thread Joshua Bay
Hi, Could you please let me know if there is a way to get LSN of each transaction by directly communicating with Postgres server and NOT by accessing logs. Thanks! Joshua

Re: [HACKERS] Way to access LSN (for each transaction) by directly talking to postgres?

2016-08-03 Thread Joshua Bay
Thanks for responses! The problem I wanted to solve was to find the (global) order of commits across the postgres cluster. So, my attempt was to use the LSN. On Wed, Aug 3, 2016 at 9:47 AM, Craig Ringer wrote: > > > On 3 August 2016 at 11:37, Joshua Bay wrote: > >> H

Re: [HACKERS] Way to access LSN (for each transaction) by directly talking to postgres?

2016-08-03 Thread Joshua Bay
Thanks Michael, Could you please tell me how I can get LSN of each transaction at decoder plugin? On Wed, Aug 3, 2016 at 2:08 AM, Michael Paquier wrote: > On Wed, Aug 3, 2016 at 3:00 PM, Michael Paquier > wrote: > > On Wed, Aug 3, 2016 at 12:37 PM, Joshua Bay > wrote: > &