[Pgpool-hackers] Splitting the reporting functions (was: First pcp command as PostgreSQL function)

Jehan-Guillaume (ioguix) de Rorthais jgdr at dalibo.com
Wed Apr 20 11:04:48 UTC 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 19/04/2011 11:36, Jehan-Guillaume (ioguix) de Rorthais wrote:
> On 19/04/2011 11:35, Tatsuo Ishii wrote:
>>> On 04/04/2011 09:54, Jehan-Guillaume (ioguix) de Rorthais wrote:
>>>> On 03/04/2011 01:38, Tatsuo Ishii wrote:
>>>>> I see. BTW, are you going to implement a function for "show
>>>>> pool_status"?
>>>>
>>>> AFAICS, pool_status is not a pcp command. So as a first step, we would
>>>> have to refactor this code to move it from pgPool core to the pcp library.
>>>>
>>>> I'll give it a try, unless you are able to manage that faster than me ?
>>>
>>> Ok, I had a look on that. I think we should split the 5 functions in
>>> pool_process_reporting.c (config, nodes, pools, processes and version)
>>> and split them with logic on a side and output on the other side.
>>>
>>> Then, I guess I'll be able from to use the logical part of these
>>> functions from the pcp code and add 5 new pcp command.
>>>
>>> I'm starting the work.
>>>
>>> Comments ?
> 
>> Sounds nice idea.
> 
> Ok, so I keep going on this way :)

PFA a patch that split reporting functions and cleanup a bit this piece
of code. HEre is the changelog:

  * split all functions so we have getters usable from pcp commands
  * factorize some pieces of code (send_row_description and
send_complete_and_ready)
  * send a proper CommandComplete message, including the row number
  * doesn't rely on sizeof(type) to set postgresql message length, but
directly on the protocol definition.

Thank you for comments and review !

>> --
>> Tatsuo Ishii
>> SRA OSS, Inc. Japan
>> English: http://www.sraoss.co.jp/index_en.php
>> Japanese: http://www.sraoss.co.jp
> 
- -- 
Jehan-Guillaume (ioguix) de Rorthais
DBA
http://www.dalibo.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2uvdAACgkQXu9L1HbaT6LEpACg8y1qVzP+V2S5sS/E/zyZAKAp
ys0AnRpYrrCp8lJrIY6S0nm4mPfn3NPE
=YTmz
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: split_reporting_functions-1.patch.gz
Type: application/gzip
Size: 4283 bytes
Desc: not available
URL: <http://pgfoundry.org/pipermail/pgpool-hackers/attachments/20110420/e781f2a0/attachment.bin>


More information about the Pgpool-hackers mailing list