Обсуждение: BUG #1302: Vacuumdb and vacuumlo should disable statement_timeout

Поиск
Список
Период
Сортировка

BUG #1302: Vacuumdb and vacuumlo should disable statement_timeout

От
"PostgreSQL Bugs List"
Дата:
The following bug has been logged online:

Bug reference:      1302
Logged by:          Alex Koh

Email address:      alexkoh@hotmail.com

PostgreSQL version: 7.3.2

Operating system:   Linux Redhat 8

Description:        Vacuumdb and vacuumlo should disable statement_timeout

Details:

IMHO vacuumdb and vacuumlo should disable statement_timeout before vacuuming
the database. This should prevent timeouts when vacuuming large tables like
pg_largeobject.

Re: BUG #1302: Vacuumdb and vacuumlo should disable statement_timeout

От
Bruce Momjian
Дата:
PostgreSQL Bugs List wrote:
>
> The following bug has been logged online:
>
> Bug reference:      1302
> Logged by:          Alex Koh
>
> Email address:      alexkoh@hotmail.com
>
> PostgreSQL version: 7.3.2
>
> Operating system:   Linux Redhat 8
>
> Description:        Vacuumdb and vacuumlo should disable statement_timeout
>
> Details:
>
> IMHO vacuumdb and vacuumlo should disable statement_timeout before vacuuming
> the database. This should prevent timeouts when vacuuming large tables like
> pg_largeobject.

If you have set statement_timeout globally you should expect such
problems.  That parameter is primarily for per-session use or per-user
use using ALTER USER and not to be set for administrators.  If you
really want a fix, use ALTER USER to turn it off for the super-user.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: BUG #1302: Vacuumdb and vacuumlo should disable statement_timeout

От
Tom Lane
Дата:
"PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:
> IMHO vacuumdb and vacuumlo should disable statement_timeout before vacuuming
> the database.

IMHO this request suggests that you are not setting statement_timeout in
sane places.  One reasonable setup is to attach it to userids other than
the one used for vacuuming.

            regards, tom lane

Re: BUG #1302: Vacuumdb and vacuumlo should disable statement_timeout

От
Bruce Momjian
Дата:
Alex Koh wrote:
> I agree with the suggestions to attach it to userids. However, setting the
> statement_timeout in the conf file is good as it will enforce everyone to
> have some timeout. This will be especially useful in web applications.
>
> Anyway, I will use ALTER USER to do it and disable statement_timeout in the
> conf file.

Yep, that's how I would do it.  If you want it on in the config file you
should turn it off for super-users.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: BUG #1302: Vacuumdb and vacuumlo should disable statement_timeout

От
"Alex Koh"
Дата:
I agree with the suggestions to attach it to userids. However, setting the
statement_timeout in the conf file is good as it will enforce everyone to
have some timeout. This will be especially useful in web applications.

Anyway, I will use ALTER USER to do it and disable statement_timeout in the
conf file.

Thanks!

Alex Koh

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Tuesday, November 02, 2004 11:48 AM
To: Alex Koh
Cc: pgsql-bugs@postgresql.org
Subject: Re: [BUGS] BUG #1302: Vacuumdb and vacuumlo should disable
statement_timeout

"PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:
> IMHO vacuumdb and vacuumlo should disable statement_timeout before
vacuuming
> the database.

IMHO this request suggests that you are not setting statement_timeout in
sane places.  One reasonable setup is to attach it to userids other than
the one used for vacuuming.

            regards, tom lane