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

Re: contrib/pg_stat_statements 1226

From: "Alex Hunsaker" <badalex(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "ITAGAKI Takahiro" <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: contrib/pg_stat_statements 1226
Date: 2009-01-02 02:45:43
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Thu, Jan 1, 2009 at 17:28, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Alex Hunsaker" <badalex(at)gmail(dot)com> writes:
>> ...  So Im going to mark it as
>> ready for commmiter.
> Has this patch been tested on Windows?  (Or more generally, with EXEC_BACKEND?)

I was under the impression thats where Itagaki-san develops.You'll
note some other specific windows changes:

pgstat_track_activity_query_size gains PGDLLIMPORT
  also seems of intreset:

varoius carriage returns in the patch...

I could be wrong though.

> The reason I ask is that eyeballing the code suggests a couple of major
> problems in that area:
> * the startup/shutdown hooks will be installed in the postmaster
> process, but the patch expects them to be executed in a child process.
> I think nothing will happen.

I dunno about this one, not very familiar with EXEC_BACKEND

> * in an EXEC_BACKEND situation, we re-execute
> process_shared_preload_libraries() when starting a fresh backend
> (but not in other kinds of child processes, which is why the other
> problem is a problem).  This means re-executing the _PG_init function,
> which will try to redefine the custom GUC variables, which will fail.
> I don't think this is really a bug in this patch per se, it's a bug
> in the custom-GUC support; but nonetheless it looks like a problem.

I see 3 options:

- ignore redefines of custom gucs

-change the define_custom_variable() to return a bool (or something)
 true if it got added
 false if it was already there

Seems to me we could probably just ignore any redefines of custom gucs
outright.  Im not to worried about some other module picking the same
custom guc.  And frankly the op should notice.  Especially when they
go to add it to custom_variable_classes.

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2009-01-02 02:59:04
Subject: Re: contrib/pg_stat_statements 1226
Previous:From: Robert HaasDate: 2009-01-02 02:43:29
Subject: Re: posix_fadvise v22

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