Re: [HACKERS] [PATCHES] Fix mdsync never-ending loop problem

2007-04-12 Thread Heikki Linnakangas
Tom Lane wrote: Heikki Linnakangas <[EMAIL PROTECTED]> writes: My first thought is that the cycle_ctr just adds extra complexity. The canceled-flag really is the key in Takahiro-san's patch, so we don't need the cycle_ctr anymore. We don't have to have it in the sense of the code not working

Re: [PATCHES] autovacuum multiworkers, patch 5

2007-04-12 Thread ITAGAKI Takahiro
Alvaro Herrera <[EMAIL PROTECTED]> wrote: > > > I manually merged your patch on top of my own. This is the result. > > > Please have a look at whether the new code is correct and behaves sanely > > > (I haven't tested it). > > Huh, you are right, it is broken, even in my outgoing mailbox -- I d

Re: [PATCHES] Automatic adjustment of bgwriter_lru_maxpages

2007-04-12 Thread Heikki Linnakangas
ITAGAKI Takahiro wrote: "Jim C. Nasby" <[EMAIL PROTECTED]> wrote: Perhaps it would be better to have the bgwriter take a look at how many dead tuples (or how much space the dead tuples account for) when it writes a page out and adjust the DSM at that time. Yeah, I feel it is worth optimizable,

Re: [PATCHES] [HACKERS] Full page writes improvement, code update

2007-04-12 Thread Zeugswetter Andreas ADI SD
> I don't fully understand what "transaction log" means. If it means > "archived WAL", the current (8.2) code handle WAL as follows: Probably we can define "transaction log" to be the part of WAL that is not full pages. > 1) If full_page_writes=off, then no full page writes will be > written

Re: [PATCHES] RESET SESSION v3

2007-04-12 Thread Marko Kreen
On 4/12/07, Neil Conway <[EMAIL PROTECTED]> wrote: On Sun, 2007-04-08 at 11:08 +0300, Marko Kreen wrote: > I think implicit ABORT would annoy various tools that > partially parse user sql and expect to know what transaction > state currently is. For them a new tranaction control statement > woul

Re: [PATCHES] autovacuum multiworkers, patch 5

2007-04-12 Thread Alvaro Herrera
ITAGAKI Takahiro wrote: > > Alvaro Herrera <[EMAIL PROTECTED]> wrote: > > > > > I manually merged your patch on top of my own. This is the result. > > > > Please have a look at whether the new code is correct and behaves sanely > > > > (I haven't tested it). > > > > Huh, you are right, it is br

Re: [PATCHES] [HACKERS] [Fwd: Index Advisor]

2007-04-12 Thread Gurjeet Singh
On 4/12/07, Bruce Momjian <[EMAIL PROTECTED]> wrote: Gurjeet Singh wrote: > The interface etc. may not be beautiful, but it isn't ugly either! It is > a lot better than manually creating pg_index records and inserting them into > cache; we use index_create() API to create the index (build is

Re: [HACKERS] [PATCHES] Fix mdsync never-ending loop problem

2007-04-12 Thread Tom Lane
Heikki Linnakangas <[EMAIL PROTECTED]> writes: > Ok. Perhaps we should not use the canceled-flag but just remove the > entry from pendingOpsTable like we used to when mdsync_in_progress isn't > set. I'm not thrilled about that; it seems overly intricate, and won't the LDC patch make it mostly us

Re: [PATCHES] autovacuum multiworkers, patch 5

2007-04-12 Thread Alvaro Herrera
Alvaro Herrera wrote: > ITAGAKI Takahiro wrote: > > > > I tested your patch on Linux and Windows. It works well on Linux, > > where we use fork(), but falls into segfault on Windows, where we > > use exec(). Maybe you forgot to initialize the shared memory stuff. > > (I haven't find out where to b

Re: [HACKERS] [PATCHES] Fix mdsync never-ending loop problem

2007-04-12 Thread Heikki Linnakangas
Tom Lane wrote: Heikki Linnakangas <[EMAIL PROTECTED]> writes: Ok. Perhaps we should not use the canceled-flag but just remove the entry from pendingOpsTable like we used to when mdsync_in_progress isn't set. I'm not thrilled about that; it seems overly intricate, and won't the LDC patch make

[PATCHES] Autovacuum PGPROCs in ProcGlobal? (was Re: autovacuum multiworkers)

2007-04-12 Thread Alvaro Herrera
Alvaro Herrera wrote: > Oh, uh, the problem is that CreateSharedMemoryAndSemaphores wants to > have access to the PGPROC already, but to obtain the PGPROC we need > access to autovac shared memory (per AutoVacuumGetFreeProc). So this > wasn't too bright a choice :-( It seems like I'll have to de

Re: [HACKERS] [PATCHES] Fix mdsync never-ending loop problem

2007-04-12 Thread Tom Lane
Heikki Linnakangas <[EMAIL PROTECTED]> writes: > I believe Itagaki-san's motivation for tackling this in the LDC patch > was the fact that it can fsync the same file many times, and in the > worst case go to an endless loop, and adding delays inside the loop > makes it much more likely. After th

Re: [PATCHES] Autovacuum PGPROCs in ProcGlobal? (was Re: autovacuum multiworkers)

2007-04-12 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > It seems like I'll have to decouple autovacuum PGPROC's from > autovacuum's own shared memory. The most sensible way to do this seems > to be to store them in ProcGlobal, along with the regular backend's > PGPROCs. Is everyone OK with this plan? > Not

Re: [PATCHES] CREATE TABLE LIKE INCLUDING INDEXES support

2007-04-12 Thread Trevor Hardcastle
Bruce Momjian wrote: NikhilS wrote: Hi, On 4/10/07, Bruce Momjian <[EMAIL PROTECTED]> wrote: Added to TODO: o Have WITH CONSTRAINTS also create constraint indexes http://archives.postgresql.org/pgsql-patches/2007-04/msg00149.php Trevor's patch does add unique/primary

Re: [PATCHES] RESET SESSION v3

2007-04-12 Thread Bruce Momjian
Marko Kreen wrote: > On 4/12/07, Neil Conway <[EMAIL PROTECTED]> wrote: > > On Sun, 2007-04-08 at 11:08 +0300, Marko Kreen wrote: > > > I think implicit ABORT would annoy various tools that > > > partially parse user sql and expect to know what transaction > > > state currently is. For them a new

Re: [PATCHES] [HACKERS] Full page writes improvement, code update

2007-04-12 Thread Koichi Suzuki
Hi, Sorry, inline reply. Zeugswetter Andreas ADI SD wrote: Yup, this is a good summary. You say you need to remove the optimization that avoids the logging of a new tuple because the full page image exists. I think we must already have the info in WAL which tuple inside the full page image

Re: [PATCHES] CREATE TABLE LIKE INCLUDING INDEXES support

2007-04-12 Thread NikhilS
Hi Trevor, + + parent_index_info = BuildIndexInfo(parent_index); The above is not used anywhere else in the code and seems redundant. + + ereport(NOTICE, + (er

Re: [PATCHES] Dead Space Map version 3 (simplified)

2007-04-12 Thread Pavan Deolasee
On 3/30/07, ITAGAKI Takahiro <[EMAIL PROTECTED]> wrote: Attached is an updated DSM patch. I've left the core function of DSM only and dropped other complicated features in this release. I was testing this patch when got this server crash. The patch is applied on the current CVS HEAD. I though