[pgpool-hackers: 4346] Re: Proposal: Add user_redirect_preference_list
Bo Peng
pengbo at sraoss.co.jp
Mon Jun 12 13:43:50 JST 2023
Hi,
On Tue, 23 May 2023 19:23:25 +0900 (JST)
Tatsuo Ishii <ishii at sraoss.co.jp> wrote:
> > Yes. I know the setting of app_name takes precedence if both of database and app_name are matched.
> >
> > If we set:
> >
> > database_redirect_preference_list = 'test1:standby'
> > app_name_redirect_preference_list = 'app1:primary'
> >
> > The following query will be sent to primary because the query matched both conditions
> > and app_name takes precedence
> >
> > PGAPPNAME=app1 psql -d test1 -c "select 1"
> >
> > However, users can configure the behavior of both database and app_name at the same time.
> >
> > For example, the following query will be sent to standby,
> >
> > PGAPPNAME=app2 psql -d test1 -c "select 1"
> >
> > and the following query will be sent to primary.
> >
> > PGAPPNAME=app1 psql -d test2 -c "select 1"
> >
> >
> > I agree to unify the three settings of database, app_name and user,
> > but we should mention that user can't set them at the same time.
>
> I see your point. Maybe my idea (unifying *redirect_preference_list)
> is not so good in terms of backward compatibility? If so, we should
> give up the idea and just add
> "user_name_redirect_preference_list". What do you think?
Because of the backward compatibility, I decided to just add a new parameter "user_redirect_preference_list".
Patch is attached.
--
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS LLC
https://www.sraoss.co.jp/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: user_redirect_v1.patch
Type: application/octet-stream
Size: 48238 bytes
Desc: not available
URL: <http://www.pgpool.net/pipermail/pgpool-hackers/attachments/20230612/a70826ea/attachment-0001.obj>
More information about the pgpool-hackers
mailing list