Re: [HACKERS] Proposed WAL changes

2001-03-07 Thread Ian Lance Taylor
"Mikheev, Vadim" <[EMAIL PROTECTED]> writes: > If fsync may return before data *actually* flushed then you may have > unlogged data page changes which breakes WAL rule and means corrupted > (inconsistent) database without ANY ABILITY TO RECOVERY TO CONSISTENT > STATE. Now please explain me how sa

Re: [HACKERS] WAL does not recover gracefully from out-of-disk-space

2001-03-07 Thread Hiroshi Inoue
Was the following bug already fixed ? Regards, Hiroshi Inoue Tom Lane wrote: > > With current sources: > > DEBUG: copy: line 629980, XLogWrite: new log file created - try to increase >WAL_FILES > DEBUG: copy: line 694890, XLogWrite: new log file created - try to increase >WAL_FILES > FATAL

Re: [HACKERS] Performance monitor

2001-03-07 Thread Bruce Momjian
> I wouldn't be at all surprised if you found a better approach - my > configuration above, to my mind at least, is not pretty. I hope you do find > a better approach - I know I'll be peeking at your code to see. Yes, I have an idea and hope it works. -- Bruce Momjian|

RE: [HACKERS] WAL & SHM principles

2001-03-07 Thread Mikheev, Vadim
> 1) WAL > We have buffer manager, ok. So why not to use WAL as part of > it and don't log INSERT/UPDATE/DELETE xlog records but directly > changes into buffer pages ? When someone dirties page it has to > inform bmgr about dirty region and bmgr would formulate xlog record. > The record could be

RE: [HACKERS] Proposed WAL changes

2001-03-07 Thread Mikheev, Vadim
> > If there is no pg_control or it's corrupted or points to > > unexistent/corrupted checkpoint record then scan logs from > > newest to oldest one till we find last valid checkpoint record > > or oldest valid log record and than redo from there. > > And how well will that approach work if the l

Re: [HACKERS] Performance monitor

2001-03-07 Thread Bruce Momjian
Yes, seems that is best. I will probably hack something up here so I can do some testing of the app itself. > Mike Mascari's idea (er... his assembling of the other ideas) still > sounds like the Best Solution though. > > :-) > > + Justin > > +++ > > I like the idea of updating shared memory

Re: [HACKERS] Performance monitor

2001-03-07 Thread Justin Clift
Mike Mascari's idea (er... his assembling of the other ideas) still sounds like the Best Solution though. :-) + Justin +++ I like the idea of updating shared memory with the performance statistics, current query execution information, etc., providing a function to fetch those statistics, and

Re: [HACKERS] Performance monitor

2001-03-07 Thread Bruce Momjian
> At 18:05 7/03/01 -0500, Bruce Momjian wrote: > >> All in all, I do not see this as an easy task that you can whip out and > >> then release as a 7.1 patch without extensive testing. And given that, > >> I'd rather see it done with what I consider the right long-term approach, > >> rather than a

Re: [HACKERS] Performance monitor

2001-03-07 Thread Bruce Momjian
> I think Bruce wants per-backend data, and this approach would seem to only > get the data for the current backend. > > Also, I really don't like the proposal to write files to /tmp. If we want a > perf tool, then we need to have something like 'top', which will > continuously update. With 40 b

Re: [HACKERS] Proposed WAL changes

2001-03-07 Thread Tom Lane
"Mikheev, Vadim" <[EMAIL PROTECTED]> writes: > "two checkpoints" approach is not the best way to follow. > From my POV, scanning logs is much better - it doesn't require > doubling size of on-line logs and allows to *restart* if pg_control > was lost/corrupted: > If there is no pg_control or it'

RE: [HACKERS] Proposed WAL changes

2001-03-07 Thread Mikheev, Vadim
> >> * Store two past checkpoint locations, not just one, in pg_control. > >> On startup, we fall back to the older checkpoint if the newer one > >> is unreadable. Also, a physical copy of the newest > >> checkpoint record > > > And what to do if older one is unreadable too? > > (Isn't it like

Re: [HACKERS] Proposed WAL changes

2001-03-07 Thread Tom Lane
"Mikheev, Vadim" <[EMAIL PROTECTED]> writes: > If fsync may return before data *actually* flushed then you may have > unlogged data page changes which breakes WAL rule and means corrupted > (inconsistent) database without ANY ABILITY TO RECOVERY TO CONSISTENT > STATE. Now please explain me how sav

RE: [HACKERS] Proposed WAL changes

2001-03-07 Thread Mikheev, Vadim
> > But what can be done if fsync returns before pages flushed? > > When you write out critical information, you keep earlier versions of > it. On startup, if the critical information is corrupt, you use the > earlier versions of it. This helps protect against the scenario I > mentioned: a few

Re: AW: [HACKERS] Proposed WAL changes

2001-03-07 Thread Hiroshi Inoue
Tom Lane wrote: > > Hiroshi Inoue <[EMAIL PROTECTED]> writes: > > Tom Lane wrote: > >> Why not? How is this a critical parameter (more critical than, say, > >> fsync enable)? > > > Does it have any meaning other than testing ? IMHO recovery system > > doesn't allow any optimism and archdir is al

RE: [HACKERS] Performance monitor

2001-03-07 Thread Philip Warner
At 19:59 7/03/01 -0500, Mike Mascari wrote: >I like the idea of updating shared memory with the performance statistics, >current query execution information, etc., providing a function to fetch >those statistics, and perhaps providing a system view (i.e. pg_performance) >based upon such functio

RE: [HACKERS] Performance monitor

2001-03-07 Thread Mike Mascari
I like the idea of updating shared memory with the performance statistics, current query execution information, etc., providing a function to fetch those statistics, and perhaps providing a system view (i.e. pg_performance) based upon such functions which can be queried by the administrator. F

Re: AW: [HACKERS] Proposed WAL changes

2001-03-07 Thread Tom Lane
Hiroshi Inoue <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Why not? How is this a critical parameter (more critical than, say, >> fsync enable)? > I don't think 'fsync enable' is a critical parameter. > It's a dangerous parameter and it's not appropriate > as a GUC paramter either. That's

[HACKERS] pg_dump error

2001-03-07 Thread Luis =?unknown?q?Maga=F1a?=
Hi: When trying to pg_dump a database as the postgres user or as any other user I got this error: dumpProcLangs(): handler procedure for language plpgsql not found what's going on ? the command to dump this is: pg_dump -x alyma > alyma.dat.sql Thank you in advanced. -- Ing. Luis Magaña. G

Re: AW: [HACKERS] Proposed WAL changes

2001-03-07 Thread Hiroshi Inoue
Tom Lane wrote: > > Hiroshi Inoue <[EMAIL PROTECTED]> writes: > >> But what possible reason is there for keeping it in pg_control? > >> AFAICS that would just mean that we'd need special code for setting it, > >> instead of making use of all of Peter's hard work on GUC. > > > I don't think it's a

Re: [HACKERS] Performance monitor

2001-03-07 Thread Philip Warner
At 11:33 8/03/01 +1100, Justin Clift wrote: >Hi all, > >Wouldn't another approach be to write a C function that does the >necessary work, then just call it like any other C function? > >i.e. Connect to the database and issue a "select >perf_stats('/tmp/stats-2001-03-08-01.txt')" ? > I think Bruc

Re: [HACKERS] Performance monitor

2001-03-07 Thread Justin Clift
Hi all, Wouldn't another approach be to write a C function that does the necessary work, then just call it like any other C function? i.e. Connect to the database and issue a "select perf_stats('/tmp/stats-2001-03-08-01.txt')" ? Or similar? Sure, that means another database connection which w

Re: [HACKERS] Proposed WAL changes

2001-03-07 Thread Ian Lance Taylor
"Mikheev, Vadim" <[EMAIL PROTECTED]> writes: > > > I feel that the fact that > > > > > > WAL can't help in the event of disk errors > > > > > > is often overlooked. > > > > This is true in general. But, nevertheless, WAL can be written to > > protect against predictable disk errors, when poss

Re: AW: [HACKERS] Proposed WAL changes

2001-03-07 Thread Tom Lane
Hiroshi Inoue <[EMAIL PROTECTED]> writes: >> But what possible reason is there for keeping it in pg_control? >> AFAICS that would just mean that we'd need special code for setting it, >> instead of making use of all of Peter's hard work on GUC. > I don't think it's appropriate to edit archdir by

Re: [HACKERS] Performance monitor

2001-03-07 Thread Philip Warner
At 18:05 7/03/01 -0500, Bruce Momjian wrote: >> All in all, I do not see this as an easy task that you can whip out and >> then release as a 7.1 patch without extensive testing. And given that, >> I'd rather see it done with what I consider the right long-term approach, >> rather than a dead-end

Re: [HACKERS] pg_dump writes SEQUENCEs twice with -a

2001-03-07 Thread Oliver Elphick
Philip Warner wrote: >At 20:48 7/03/01 +, Oliver Elphick wrote: >>kovacsz wrote: >> > >> >You answered that noone experienced anything like this. Here I get this >> >behaviour with the most simple table as well. >> > >Is there a problem with the lists? I reveived Zoltan's me

Re: AW: [HACKERS] Proposed WAL changes

2001-03-07 Thread Hiroshi Inoue
Tom Lane wrote: > > "Mikheev, Vadim" <[EMAIL PROTECTED]> writes: > > So, it's better to leave archdir in pg_control now - if we'll > > decide that GUC is better place then we'll just ignore archdir > > in pg_control. But if it will be better to have it in pg_control > > then we'll not be able to a

Re: [HACKERS] Performance monitor

2001-03-07 Thread Bruce Momjian
> All in all, I do not see this as an easy task that you can whip out and > then release as a 7.1 patch without extensive testing. And given that, > I'd rather see it done with what I consider the right long-term approach, > rather than a dead-end hack. I think doing it in a signal handler is >

Re: [HACKERS] pg_dump writes SEQUENCEs twice with -a

2001-03-07 Thread Philip Warner
At 20:48 7/03/01 +, Oliver Elphick wrote: >kovacsz wrote: > > > >You answered that noone experienced anything like this. Here I get this > >behaviour with the most simple table as well. > Is there a problem with the lists? I reveived Zoltan's message twice, and now this one that seems to i

Re: [HACKERS] Performance monitor

2001-03-07 Thread Bruce Momjian
> Bruce Momjian <[EMAIL PROTECTED]> writes: > > How do people feel about adding a single handler to 7.1? Is it > > something I can slip into the current CVS, or will it have to exist as a > > patch to 7.1. Seems it would be pretty isolated unless someone sends > > the signal, but it is clearly a

Re: [HACKERS] Performance monitor

2001-03-07 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > How do people feel about adding a single handler to 7.1? Is it > something I can slip into the current CVS, or will it have to exist as a > patch to 7.1. Seems it would be pretty isolated unless someone sends > the signal, but it is clearly a feature a

Re: AW: [HACKERS] Proposed WAL changes

2001-03-07 Thread Tom Lane
"Mikheev, Vadim" <[EMAIL PROTECTED]> writes: > So, it's better to leave archdir in pg_control now - if we'll > decide that GUC is better place then we'll just ignore archdir > in pg_control. But if it will be better to have it in pg_control > then we'll not be able to add it there. But what possi

Re: [HACKERS] Proposed WAL changes

2001-03-07 Thread Nathan Myers
On Wed, Mar 07, 2001 at 12:03:41PM -0800, Mikheev, Vadim wrote: > Ian wrote: > > > I feel that the fact that > > > > > > WAL can't help in the event of disk errors > > > > > > is often overlooked. > > > > This is true in general. But, nevertheless, WAL can be written to > > protect against pre

Re: [HACKERS] Performance monitor

2001-03-07 Thread Tom Lane
The Hermit Hacker <[EMAIL PROTECTED]> writes: >> How do people feel about adding a single handler to 7.1? > Totally dead set against it ... Ditto. Particularly a signal handler that performs I/O. That's going to create all sorts of re-entrancy problems. regards, tom la

Re: [HACKERS] Performance monitor

2001-03-07 Thread Bruce Momjian
> > How do people feel about adding a single handler to 7.1? Is it > > something I can slip into the current CVS, or will it have to exist as a > > patch to 7.1. Seems it would be pretty isolated unless someone sends > > the signal, but it is clearly a feature addition. > > Totally dead set aga

RE: [HACKERS] WAL & SHM principles

2001-03-07 Thread Mikheev, Vadim
> It is possible to build a logging system so that you mostly don't care > when the data blocks get written; a particular data block on disk is > considered garbage until the next checkpoint, so that you How to know if a particular data page was modified if there is no log record for that modif

Re: [HACKERS] WAL & SHM principles

2001-03-07 Thread Nathan Myers
On Wed, Mar 07, 2001 at 11:21:37AM -0500, Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > The only problem is that we would no longer have control over which > > pages made it to disk. The OS would perhaps write pages as we modified > > them. Not sure how important that is. > >

Re: [HACKERS] Proposed WAL changes

2001-03-07 Thread Nathan Myers
On Wed, Mar 07, 2001 at 11:09:25AM -0500, Tom Lane wrote: > "Vadim Mikheev" <[EMAIL PROTECTED]> writes: > >> * Store two past checkpoint locations, not just one, in pg_control. > >> On startup, we fall back to the older checkpoint if the newer one > >> is unreadable. Also, a physical copy of the

RE: [HACKERS] Proposed WAL changes

2001-03-07 Thread Alex Pilosov
On Wed, 7 Mar 2001, Mikheev, Vadim wrote: > But what can be done if fsync returns before pages flushed? No, it won't. When fsync returns, data is promised by the OS to be on disk. -alex ---(end of broadcast)--- TIP 6: Have you searched our list a

RE: [HACKERS] Proposed WAL changes

2001-03-07 Thread Mikheev, Vadim
> > But what can be done if fsync returns before pages flushed? > No, it won't. When fsync returns, data is promised by the OS to be on > disk. Seems you didn't follow discussions about this issue. Vadim ---(end of broadcast)--- TIP 3: if posting/

Re: [HACKERS] pg_dump writes SEQUENCEs twice with -a

2001-03-07 Thread Oliver Elphick
kovacsz wrote: >I reported this problem about 3 weeks ago or even more. The problem hasn't >disappeared yet. In 7.1beta4 if I use pg_dump with -a switch together, I >get each CREATE SEQUENCE twice. I suspected if this is an installation >problem at my place but now I think it maybe isn't.

RE: [HACKERS] Proposed WAL changes

2001-03-07 Thread Mikheev, Vadim
> > > I have just sent to the pgsql-patches list a rather large set of > > > > Please send it to me directly - pgsql-patches' archieve is > dated by Feb -:( > > Huh? > > http://www.postgresql.org/mhonarc/pgsql-patches/2001-03/index.html But there was nothing there yesterday -:) (Seems archive

RE: [HACKERS] Proposed WAL changes

2001-03-07 Thread Mikheev, Vadim
> > I feel that the fact that > > > > WAL can't help in the event of disk errors > > > > is often overlooked. > > This is true in general. But, nevertheless, WAL can be written to > protect against predictable disk errors, when possible. Failing to > write a couple of disk blocks when the sys

RE: AW: [HACKERS] Proposed WAL changes

2001-03-07 Thread Mikheev, Vadim
> > > What I've thought is to implement a new command to > > > change archdir under WAL's control. > > > If it's different from Vadim's plan I don't object. > > > > Actually, I have no concrete plans for archdir yet - this > > one is for WAL based BAR we should discuss in future. > > So, I don't

Re: [HACKERS] Performance monitor

2001-03-07 Thread The Hermit Hacker
On Wed, 7 Mar 2001, Bruce Momjian wrote: > I have started coding a PostgreSQL performance monitor. It will be like > top, but allow you to click on a backend to see additional information. > > It will be written in Tcl/Tk. I may ask to add something to 7.1 so when > a backend receives a special

[HACKERS] Performance monitor

2001-03-07 Thread Bruce Momjian
I have started coding a PostgreSQL performance monitor. It will be like top, but allow you to click on a backend to see additional information. It will be written in Tcl/Tk. I may ask to add something to 7.1 so when a backend receives a special signal, it dumps a file in /tmp with some backend

[HACKERS] pg_dump writes SEQUENCEs twice with -a

2001-03-07 Thread kovacsz
I reported this problem about 3 weeks ago or even more. The problem hasn't disappeared yet. In 7.1beta4 if I use pg_dump with -a switch together, I get each CREATE SEQUENCE twice. I suspected if this is an installation problem at my place but now I think it maybe isn't. You answered that noone ex

Re: [HACKERS] Proposed WAL changes

2001-03-07 Thread Ian Lance Taylor
"Vadim Mikheev" <[EMAIL PROTECTED]> writes: > I feel that the fact that > > WAL can't help in the event of disk errors > > is often overlooked. This is true in general. But, nevertheless, WAL can be written to protect against predictable disk errors, when possible. Failing to write a couple

Re: [HACKERS] Proposed WAL changes

2001-03-07 Thread The Hermit Hacker
On Wed, 7 Mar 2001, Vadim Mikheev wrote: > > I have just sent to the pgsql-patches list a rather large set of > > Please send it to me directly - pgsql-patches' archieve is dated by Feb -:( Huh? http://www.postgresql.org/mhonarc/pgsql-patches/2001-03/index.html ---(en

Re: [HACKERS] Proposed WAL changes

2001-03-07 Thread Peter Eisentraut
Tom Lane writes: > Hiroshi Inoue <[EMAIL PROTECTED]> writes: > > Do I have to send SIGHUP after changing postgresql.conf ? > > In general, yes. I think that for the (still vaporware) archdir option, > you might not need to: archdir will only be looked at by the checkpoint > subprocess, and I thi

Re: [HACKERS] WAL & SHM principles

2001-03-07 Thread Bruce Momjian
> Bruce Momjian <[EMAIL PROTECTED]> writes: > > The only problem is that we would no longer have control over which > > pages made it to disk. The OS would perhaps write pages as we modified > > them. Not sure how important that is. > > Unfortunately, this alone is a *fatal* objection. See nea

Re: [HACKERS] WAL & SHM principles

2001-03-07 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > The only problem is that we would no longer have control over which > pages made it to disk. The OS would perhaps write pages as we modified > them. Not sure how important that is. Unfortunately, this alone is a *fatal* objection. See nearby discussi

Re: [HACKERS] psql missing feature

2001-03-07 Thread Michal Maru¹ka
Peter Eisentraut writes: > Michal Maru¹ka writes: > > > What about (optionally) printing the type of the column data? > > >io | tu | tipo |data > >int | int | int2 |date > > +---+--+ > > 102242 | 26404 | 1203 | 2000-11-22 > > (1 ro

Re: [HACKERS] Proposed WAL changes

2001-03-07 Thread Tom Lane
"Vadim Mikheev" <[EMAIL PROTECTED]> writes: >> I have just sent to the pgsql-patches list a rather large set of > Please send it to me directly - pgsql-patches' archieve is dated by Feb -:( Done under separate cover. >> proposed diffs for the WAL code. These changes: >> >> * Store two past che

Re: AW: [HACKERS] Proposed WAL changes

2001-03-07 Thread Tom Lane
"Vadim Mikheev" <[EMAIL PROTECTED]> writes: > So, I don't see why to remove archdir from pg_control now. I didn't like the space consumption. I think it's important that the pg_control data fit in less than 512 bytes so that it doesn't cross physical sectors on the disk. This reduces the odds o

Re: AW: AW: AW: AW: AW: [HACKERS] WAL-based allocation of XIDs is ins ecur e

2001-03-07 Thread Tom Lane
Zeugswetter Andreas SB <[EMAIL PROTECTED]> writes: > I really think that xlog entries should be done by a layer below the > userland functions. That seems somewhere between impractical and impossible: how will you tie the functional xlog entries ("insert foo into index bar") to the resulting pag

Re: [HACKERS] Re: Uh, this is *not* a 64-bit CRC ...

2001-03-07 Thread Tom Lane
"Vadim Mikheev" <[EMAIL PROTECTED]> writes: > I've asked if anyone can send crc64 impl to me and got only one from > Nathan Myers. Unfortunately, SWISS-PROT impl assumes that long long > is 8 bytes - is it portable? No, it's not. I have written an implementation that uses uint64 if available (pe

Re: [HACKERS] WAL & SHM principles

2001-03-07 Thread Martin Devera
> This was brought up a week ago, and I consider it an interesting idea. > The only problem is that we would no longer have control over which > pages made it to disk. The OS would perhaps write pages as we modified > them. Not sure how important that is. Yes. As I work on linux kernel I know

Re: [HACKERS] Contributions?

2001-03-07 Thread Karel Zak
On Wed, Mar 07, 2001 at 04:17:09PM +0100, Olivier PRENANT wrote: > Hi Matthew, > > I would love to get this stuff... > > Could you send it to me or tell me where it is ? > > TIA > On Tue, 6 Mar 2001, Matthew Hagerty wrote: > > > Greetings, > > > > I wrote a few simple programs to log Apache a

Re: [HACKERS] Proposed WAL changes

2001-03-07 Thread Tom Lane
Hiroshi Inoue <[EMAIL PROTECTED]> writes: > Do I have to send SIGHUP after changing postgresql.conf ? In general, yes. I think that for the (still vaporware) archdir option, you might not need to: archdir will only be looked at by the checkpoint subprocess, and I think that a newly spawned backe

Re: [HACKERS] psql missing feature

2001-03-07 Thread Peter Eisentraut
Michal Maru¹ka writes: > What about (optionally) printing the type of the column data? >io | tu | tipo |data >int | int | int2 |date > +---+--+ > 102242 | 26404 | 1203 | 2000-11-22 > (1 row) I've been meaning to implement this for a while. N

Re: [HACKERS] Contributions?

2001-03-07 Thread Olivier PRENANT
Hi Matthew, I would love to get this stuff... Could you send it to me or tell me where it is ? TIA On Tue, 6 Mar 2001, Matthew Hagerty wrote: > Greetings, > > I wrote a few simple programs to log Apache access_log entries to pg. If > this is something anyone would be interested in or if the

Re: [HACKERS] Query Planning time increased 3 times on 7.1 compared to 7.0.3

2001-03-07 Thread Christof Petig
Tom Lane wrote: > Christof Petig <[EMAIL PROTECTED]> writes: > > We noticed that after upgrading to 7.1beta[245] the execution time for > > some often used queries went up by a factor of 2 or more. > > I get the desired plan after doing VACUUM ANALYZE ... > > regards, tom

Re: [HACKERS] WAL & SHM principles

2001-03-07 Thread Bruce Momjian
> 2) SHM vs. MMAP > Why don't use mmap to share pages (instead of shm) ? There would be no > problem with tuning pg's buffer cache size - it is balanced by OS. > When using SHM there are often two copies of page: one in OS' page cache > and one in SHM (vaste of memory). > When using mmap the data

Re: AW: [HACKERS] Proposed WAL changes

2001-03-07 Thread Bruce Momjian
> > > I thought the intended way to change a GUC parameter permanently was to > > > edit data/postgresql.conf . No ? > > > > > > > What I've thought is to implement a new command to > > change archdir under WAL's control. > > If it's different from Vadim's plan I don't object. > > Actually, I h

AW: [HACKERS] WAL-based allocation of XIDs is insecure

2001-03-07 Thread Zeugswetter Andreas SB
> > > Hm, wasn't it handling non-atomic disk writes, Andreas? > > > > Yes, but for me, that was only one (for me rather minor) issue. > > I still think that the layout of PostgreSQL pages was designed to > > reduce the risc of a (heap) page beeing inconsistent because it is > > only partly writ

[HACKERS] WAL & SHM principles

2001-03-07 Thread Martin Devera
Hello, maybe I missed something, but in last days I was thinking how would I write my own sql server. I got several ideas and because these are not used in PG they are probably bad - but I can't figure why. 1) WAL We have buffer manager, ok. So why not to use WAL as part of it and don't log INSE

Re: [HACKERS] WAL-based allocation of XIDs is insecure

2001-03-07 Thread Vadim Mikheev
> > Hm, wasn't it handling non-atomic disk writes, Andreas? > > Yes, but for me, that was only one (for me rather minor) issue. > I still think that the layout of PostgreSQL pages was designed to > reduce the risc of a (heap) page beeing inconsistent because it is > only partly written to an acc

[HACKERS] CeBit

2001-03-07 Thread Michael Meskes
Is anyone on this list in Hannover for CeBit? Maybe we could arrange a meeting. Michael -- Michael Meskes [EMAIL PROTECTED] Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL! ---(end of broadcast)--- TIP 1: subscribe and unsubscribe

AW: [HACKERS] WAL-based allocation of XIDs is insecure

2001-03-07 Thread Zeugswetter Andreas SB
> > In short I do not think that the current implementation of > > "physical log" does what it was intended to do :-( > > Hm, wasn't it handling non-atomic disk writes, Andreas? Yes, but for me, that was only one (for me rather minor) issue. I still think that the layout of PostgreSQL pages was

Re: [HACKERS] WAL-based allocation of XIDs is insecure

2001-03-07 Thread Vadim Mikheev
> On third thought --- we could still log the original page contents and > the modification log record atomically, if what were logged in the xlog > record were (essentially) the parameters to the operation being logged, > not its results. That is, make the log entry before you start doing the > m

Re: [HACKERS] WAL-based allocation of XIDs is insecure

2001-03-07 Thread Vadim Mikheev
Zeugswetter Andreas SB <[EMAIL PROTECTED]> wrote: > > In short I do not think that the current implementation of > "physical log" does what it was intended to do :-( Hm, wasn't it handling non-atomic disk writes, Andreas? And for what else "physical log" could be used? The point was - copy entir

Re: [HACKERS] WAL-based allocation of XIDs is insecure

2001-03-07 Thread Vadim Mikheev
> The point is to make the allocation of XIDs and OIDs work the same way. > In particular, if we are forced to reset the XLOG using what's stored in > pg_control, it would be good if what's stored in pg_control is a value > beyond the last-used XID/OID, not a value less than the last-used ones. I

Re: [HACKERS] How to shoot yourself in the foot: kill -9 postmaster

2001-03-07 Thread Andrew McMillan
Vadim Mikheev wrote: > > Nevertheless, subj is rised. BTW, does anybody know results of kill -9 > in Oracle/Informix/etc? Just curious -:) Progress has no problem with it that I have ever seen. Regards, Andrew. --

Re: [HACKERS] WAL-based allocation of XIDs is insecure

2001-03-07 Thread Vadim Mikheev
> Consider the following scenario: > > 1. A new transaction inserts a tuple. The tuple is entered into its > heap file with the new transaction's XID, and an associated WAL log > entry is made. Neither one of these are on disk yet --- the heap tuple > is in a shmem disk buffer, and the WAL entr

AW: [HACKERS] How to shoot yourself in the foot: kill -9 postmaster

2001-03-07 Thread Zeugswetter Andreas SB
> Nevertheless, subj is rised. BTW, does anybody know results of kill -9 > in Oracle/Informix/etc? Just curious -:) Informix has no problem with it. Oracle dba's fear it, to say the least. Andreas ---(end of broadcast)--- TIP 6: Have you search

Re: AW: AW: AW: AW: [HACKERS] WAL-based allocation of XIDs is insecur e

2001-03-07 Thread Vadim Mikheev
> > > Before commit or rollback the xlog is not flushed to disk, thus you can loose > > > those xlog entries, but the index page might already be on disk because of > > > LRU buffer reuse, no ? > > > > No. Buffer page is written to disk *only after corresponding records are flushed > > to log* (W

Re: [HACKERS] How to shoot yourself in the foot: kill -9 postmaster

2001-03-07 Thread Vadim Mikheev
> I have spent several days now puzzling over the corrupted WAL logfile > that Scott Parish was kind enough to send me from a 7.1beta4 crash. > It looks a lot like two different series of transactions were getting > written into the same logfile. I'd been digging like mad in the WAL > code to try

Re: [HACKERS] Proposed WAL changes

2001-03-07 Thread Vadim Mikheev
> I have just sent to the pgsql-patches list a rather large set of Please send it to me directly - pgsql-patches' archieve is dated by Feb -:( > proposed diffs for the WAL code. These changes: > > * Store two past checkpoint locations, not just one, in pg_control. > On startup, we fall back

AW: AW: AW: AW: AW: [HACKERS] WAL-based allocation of XIDs is insecur e

2001-03-07 Thread Zeugswetter Andreas SB
> > Before commit or rollback the xlog is not flushed to disk, thus you can loose > > those xlog entries, but the index page might already be on disk because of > > LRU buffer reuse, no ? > > No. Buffer page is written to disk *only after corresponding records are flushed > to log* (WAL means Wr

Re: AW: AW: AW: AW: [HACKERS] WAL-based allocation of XIDs is insecur e

2001-03-07 Thread Vadim Mikheev
> Before commit or rollback the xlog is not flushed to disk, thus you can loose > those xlog entries, but the index page might already be on disk because of > LRU buffer reuse, no ? No. Buffer page is written to disk *only after corresponding records are flushed to log* (WAL means Write-Ahead-Log

AW: AW: AW: AW: AW: [HACKERS] WAL-based allocation of XIDs is insecur e

2001-03-07 Thread Zeugswetter Andreas SB
> > I do not however see how the current solution fixes the original problem, > > that we don't have a rollback for index modifications. > > The index would potentially point to an empty heaptuple slot. > > How? There will be an XLOG entry inserting the heap tuple before the > XLOG entry that u

Re: AW: [HACKERS] Proposed WAL changes

2001-03-07 Thread Vadim Mikheev
> > I thought the intended way to change a GUC parameter permanently was to > > edit data/postgresql.conf . No ? > > > > What I've thought is to implement a new command to > change archdir under WAL's control. > If it's different from Vadim's plan I don't object. Actually, I have no concrete pla