[PATCHES] Memory leak in BootStrapXLOG()

2005-06-05 Thread ITAGAKI Takahiro
Bruce Momjian wrote: > > BTW, I found memory leak in BootStrapXLOG(). The buffer allocated by > > malloc() > > is not free()ed. ISSUE_BOOTSTRAP_MEMORYLEAK in this patch points out it. > > (But this leak is not serious, because this function is called only once.) > > Does the following patch fix

Re: [PATCHES] lastval()

2005-06-05 Thread Dennis Bjorklund
On Mon, 6 Jun 2005, Tom Lane wrote: > You could fix that by remembering exactly which sequence produced > the lastval and checking its permissions ... That is what the implementation does. Instead of remembering the last value it rememebers the last sequence (and it contains the last value for

Re: [PATCHES] lastval()

2005-06-05 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > The only objection I can see is that it arguably doesn't obey sequence > permissions: you need SELECT on a sequence to see its currval(), whereas > lastval() would return the same information without an equivalent > permission check. Interesting point .

Re: [PATCHES] lastval()

2005-06-05 Thread Neil Conway
Tom Lane wrote: I agree with that --- consider that you couldn't actually promise that the sequence hadn't been dropped by the time the answer is returned, anyway, unless you take out a lock on the sequence first. Which doesn't seem like a behavior that is wanted here. The only objection I can

Re: [PATCHES] lastval()

2005-06-05 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > Per my earlier mail, the other debatable behavior is whether > lastval() should be defined if the sequence it would be returning the > currval() for has been subsequently dropped. I'm inclined to not return > an error here to simplify the implementation,

Re: [PATCHES] lastval()

2005-06-05 Thread Neil Conway
Tom Lane wrote: This definition is OK with me ... so long as it still includes the phrase "an error occurs if no nextval or setval has occurred in the current session". However it seemed that a number of people asking for the feature wanted some-random-default to be returned instead. Right --

Re: [PATCHES] lastval()

2005-06-05 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > Abhijit Menon-Sen wrote: >> I'd really like to see a concise, complete description of the proposed >> function, including potential caveats. > lastval() returns the last value produced by nextval() or setval() in > the current session. This definition is

Re: [PATCHES] lastval()

2005-06-05 Thread Neil Conway
Abhijit Menon-Sen wrote: Could someone who likes this idea please write the documentation for it? Dennis' original patch includes documentation updates and a description of lastval(): http://archives.postgresql.org/pgsql-patches/2005-05/msg00059.php I'd really like to see a concise, comple

Re: [PATCHES] lastval()

2005-06-05 Thread Abhijit Menon-Sen
At 2005-06-06 12:18:22 +1000, [EMAIL PROTECTED] wrote: > > Comments? Could someone who likes this idea please write the documentation for it? I'd really like to see a concise, complete description of the proposed function, including potential caveats. -- ams ---(end of br

Re: [PATCHES] lastval()

2005-06-05 Thread Neil Conway
If you're busy, I can clean this up and apply it. I wonder if it would be better to have lastval() return the last value returned by nextval() or setval() for the current session, regardless of any intervening DROP SEQUENCE commands. This would simplify the implementation (we can just store th

Re: [PATCHES] Simplify Win32 Signaling code

2005-06-05 Thread Qingqing Zhou
""Magnus Hagander"" <[EMAIL PROTECTED]> writes > > It *must* be done at runtime. Because you use the same binary on NT4 and > more recent versions! > > Nope, we don't have any checks like that today. It's fairly trivial, but > if examples are needed, look at pginstca.c in the pginstaller project >

Re: [PATCHES] lastval()

2005-06-05 Thread John Hansen
> > I want the feature. Is useful for PHP ... > Ditto! ... John ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [PATCHES] lastval()

2005-06-05 Thread Christopher Kings-Lynne
Anyway, let me take a look at it in a minute. My main comment is that it's not the code that's the main thing to fix but to decide is if we want the feature at all. I want the feature. Is useful for PHP ... Chris ---(end of broadcast)--- TIP 8:

Re: [PATCHES] pg_starttime()

2005-06-05 Thread Andreas Pflug
Bruce Momjian wrote: Do we want to make this superuser-only? Yes, random seeds or so might be deducted from it. I'd also propose to name this function pg_postmaster_starttime() to clarify its purpose. There's already a function of that name in the (non-contrib) admin package with the very sa

Re: [PATCHES] Server instrumentation: pg_terminate_backend, pg_reload_conf

2005-06-05 Thread Andreas Pflug
Bruce Momjian wrote: Andreas Pflug wrote: This patch reenables pg_terminate_backend, allowing (superuser only, of course) to terminate a backend. As taken from the discussion some weeks earlier, SIGTERM seems to be used quite widely, without a report of misbehavior so while the code path is o

Re: [PATCHES] WAL bypass for CTAS

2005-06-05 Thread Simon Riggs
On Sun, 2005-06-05 at 10:20 +1000, Neil Conway wrote: > Bruce Momjian wrote: > > Could we do your NOLOGGING automatically in COPY if we test to see if > > anyone else is connected to our current database? Remember that this patch doe NOT yet handle COPY, but that is planned... > That seems pretty