[pgpool-general: 4195] Re: Django Pgpool isses

Tatsuo Ishii ishii at postgresql.org
Fri Nov 13 07:43:22 JST 2015


I have same feeling with you (replication delay is the cause of the
problem). I suggest let your application which does

1) look for existing entry in the table
2) if it already exists, do nothing
3) if it does not exist, create a new entry

access only primary node to avoid the replication delay problem.
There are several ways in pgpool-II to acomplish this. See the manual
for more details.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

> Hi Tatsuo,
> 
> Thanks for responding to me. Sorry for the confusion my summary is not
> right.
> 
> We have a  Django app.
> 
> With Pgpool update inserts are creating multiple entries for the same user
> in one of the apps for submit.
> 
> Pgpool select is going to readonly  node and then creating the new entry in
> master node.
> 
> When user/test tool repeated the submit  before the page is refreshed I am
> seeing multiple entries.   May be replication delay is causing  select
> returning null  from read only node and multiple updates are being done
> Replication lag is not seen.
> 
> 
> This is not happening on direct connection to master node.  Working with
> Django developers to isolate the issue. Any guidance on Pgpool to improve
> performance is appreciated.
> 
> Thanks,
> 
> NP
> 
> 
> On Wed, Nov 11, 2015 at 3:52 PM, Tatsuo Ishii <ishii at postgresql.org> wrote:
> 
>> > Hi All,
>> >
>> >
>> > I inherited a Django application with Pgpool . Trying to roll out Pgpool
>> > for better scalability.  For default config with max_pool =4  I am seeing
>> > multiple table creations for same app with Gui.
>>
>> Can you please elaborate what "multiple table creations" means?
>>
>> > With max-pool =1 I m not seeing this issue or direct connection to
>> > Postgres. Is there any code modification to be done for django when using
>> > with Pgpool in sql calls?.
>> >
>> > Thanks,
>> >
>> > NP
>>


More information about the pgpool-general mailing list