Skip site navigation (1) Skip section navigation (2)

Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

From: Amit kapila <amit(dot)kapila(at)huawei(dot)com>
To: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
Cc: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "'Robert Haas'" <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]
Date: 2013-01-06 04:56:11
Message-ID: 6C0B27F7206C9E4CA54AE035729E9C383BEA72EF@szxeml509-mbx (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Saturday, January 05, 2013 12:35 PM Boszormenyi Zoltan wrote:
2013-01-05 05:58 keltezéssel, Amit kapila írta:
> On Friday, January 04, 2013 10:57 PM Boszormenyi Zoltan wrote:
>> Hi,
>> I am reviewing your patch.
> Thank you very much.
>> Yes, you are right adding a new LWLock will avoid the use of sleep.
>> However I am just not sure if for only this purpose we should add a new LWLock?
>> Similar logic is used in CreateLockFile() for postmaster file but it doesn't use sleep.
>> How about reducing the time of sleep or removing sleep, in that user might get
>> error and he need to retry to get his command successful?

> I think removing the loop entirely is better.

> However, the behaviour should be discussed by a wider audience:
> - the backends should wait for each other just like other statements
>    that fight for the same object (in which case locking is needed), or
> - throw an error immediately on conflicting parallel work

Okay, I shall update the patch with first option as suggested by Noah as well.

>I also tried to trigger one of the errors by creating the lock file manually.
> You need an extra space between the "... retry" and "or ...":

> +                               ereport(ERROR,
> + (errcode_for_file_access(),
> +                                                errmsg("could not create lock file
> \"%s\": %m ", LockFileName),
> +                                                errhint("May be too many concurrent edit
> into file happening, please wait!! and retry"
> +                                                                "or .lock is file
> accidently left there please clean the file from config_dir")));

Will fix.

Thank you for review.

With Regards,
Amit Kapila.

In response to


pgsql-hackers by date

Next:From: Tomas VondraDate: 2013-01-06 05:21:24
Subject: Re: too much pgbench init output
Previous:From: Tatsuo IshiiDate: 2013-01-06 04:07:21
Subject: Re: too much pgbench init output

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group