Re: Why the size (PQ_BUFFER_SIZE) of backend send buffers is 8192 ?

From: Giuseppe Broccolo <giuseppe(dot)broccolo(at)2ndquadrant(dot)it>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Why the size (PQ_BUFFER_SIZE) of backend send buffers is 8192 ?
Date: 2014-01-03 09:57:01
Message-ID: 52C6896D.6020601@2ndquadrant.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Il 03/01/2014 09:47, xbzhang ha scritto:
> Why the size (PQ_BUFFER_SIZE) of backend send buffers is 8192 ?
> Can i set it to other value ?

In principle, it is just an arbitrary amount by which to increase the
I/O buffer size. Of course it has to take into account the buffering
behaviour of the system kernel and TCP stack.

> If i extend or decrease it , can it affect the performance of
> sending message?

PQ_BUFFER_SIZE handle the low-level details of communication between
frontend and backend. I would not decrease its value, there is no
reason to expect advantage splitting 8k buffers (i.e. a page content
size) in my opinion.

Giuseppe.
- --
Giuseppe Broccolo - 2ndQuadrant Italy
PostgreSQL Training, Services and Support
giuseppe(dot)broccolo(at)2ndQuadrant(dot)it | www.2ndQuadrant.it
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSxoloAAoJELtGpyN/y3jeaF4P/04JXkTNj3uAd3gmff5y74g2
fOo5xNJG4ZhQ4U3Kp8IumN3UIKAq9bP39ufPL2rQZTDzeoYrhF+tn4gtEFYHKobW
JMpehihpmgC0/vc78FEQu0hZrMH08A8xdY5L+8heoGkOqZIQwMjsmxwcdTLJNdyO
leD933NiiDinXESwXEy3x0LgqaBv11ZeoB6aJgz5jxz95CkpmdSQQwuROYP3nTxy
PnjcjX3rzrC5jvUQS9c5gvOHstwyK/aOWjCI14dygEM6WuwU/jjJoGnSb5SyHUcS
HfNKsjpFnjlaYTYHeQq1mYz3br8JhOZ/akK3FHkuvHKAwhi8wAymAXANm7RUGHZr
nsiv4MyTMIpI6ynA12c7LbIYwlbgoVE+u/dNoyZySNOJv4kkSV5VNMmbwmRLO2GL
ebde35zTn1LjE8LTun/PORiLkG61Xc6+NzjD0PR3yqKklQXPTP/4xoYIxjtg2lp3
dd2ImLhoTE/ruUZpjue75M4XW97jaXKEG2JmdOsOoxJM9UwfXnB9/9DVHJCo5DZk
e4B1YM8xn88MTwoWldC2z4SG3Pg91EU8569nkj1eaudx3LTUm9yNGVCr6tK4Lfd2
SxzEpclytxcFsIO7vQrJK374K/3nYQWb/BmYvIn+iarhY/DDb7TeOjuHUHDualNb
QBoamS6hNuLdNe+il5dM
=2qp+
-----END PGP SIGNATURE-----

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jayadevan M 2014-01-03 10:02:38 Re: authentication failure
Previous Message Ashesh Vashi 2014-01-03 09:19:44 Re: authentication failure