Re: [HACKERS] WAL fsync scheduling

2001-01-24 Thread Bruce Momjian
Added to TODO.detail and TODO list. > [ Charset ISO-8859-1 unsupported, converting... ] > > > There are two parts to transaction commit. The first is writing all > > > dirty buffers or log changes to the kernel, and second is fsync of the > > > > Backend doesn't write any dirty

Re: [HACKERS] WAL fsync scheduling

2000-11-19 Thread Bruce Momjian
[ Charset ISO-8859-1 unsupported, converting... ] > > There are two parts to transaction commit. The first is writing all > > dirty buffers or log changes to the kernel, and second is fsync of the > > Backend doesn't write any dirty buffer to the kernel at commit time. Yes, I sus

Re: [HACKERS] WAL fsync scheduling

2000-11-19 Thread Vadim Mikheev
> There are two parts to transaction commit. The first is writing all > dirty buffers or log changes to the kernel, and second is fsync of the Backend doesn't write any dirty buffer to the kernel at commit time. > log file. The first part is writing commit record into WAL buffer

Re: [HACKERS] WAL fsync scheduling

2000-11-18 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: >> Now all you need is a free signal number. Unfortunately we're already >> using both SIGUSR1 and SIGUSR2. > Maybe you could dump the old meaning SIGQUIT (externally invoked error), > move quickdie() to SIGQUIT, and you got SIGUSR1 free. > (That woul

Re: [HACKERS] WAL fsync scheduling

2000-11-18 Thread Bruce Momjian
> Tom Lane writes: > > > OK, we can probably assume that at least one of sigsuspend or sigpause > > is available everywhere. > > #ifdef HAVE_POSIX_SIGNALS should tell you. > > > Now all you need is a free signal number. Unfortunately we're already > > using both SIGUSR1 and SIGUSR2. > > Maybe

Re: [HACKERS] WAL fsync scheduling

2000-11-18 Thread Peter Eisentraut
Tom Lane writes: > OK, we can probably assume that at least one of sigsuspend or sigpause > is available everywhere. #ifdef HAVE_POSIX_SIGNALS should tell you. > Now all you need is a free signal number. Unfortunately we're already > using both SIGUSR1 and SIGUSR2. Maybe you could dump the old

Re: [HACKERS] WAL fsync scheduling

2000-11-18 Thread Bruce Momjian
> Bruce Momjian <[EMAIL PROTECTED]> writes: > > how about sigpause, and using SIGUSR1/SIGUSR2 to wake them up ? > > > The standard is sigsuspend: > > OK, we can probably assume that at least one of sigsuspend or sigpause > is available everywhere. Now all you need is a free signal number.

Re: [HACKERS] WAL fsync scheduling

2000-11-18 Thread Peter Eisentraut
Larry Rosenman writes: > how about sigpause, and using SIGUSR1/SIGUSR2 to wake them up ? Both of these signals are already used. -- Peter Eisentraut [EMAIL PROTECTED] http://yi.org/peter-e/

Re: [HACKERS] WAL fsync scheduling

2000-11-18 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > how about sigpause, and using SIGUSR1/SIGUSR2 to wake them up ? > The standard is sigsuspend: OK, we can probably assume that at least one of sigsuspend or sigpause is available everywhere. Now all you need is a free signal number. Unfortunately

Re: [HACKERS] WAL fsync scheduling

2000-11-18 Thread Bruce Momjian
> Bruce Momjian <[EMAIL PROTECTED]> writes: > >> how about sigpause, and using SIGUSR1/SIGUSR2 to wake them up ? > > > Looks like a winner. > > sigpause() is a BSD-ism, and not part of any recognized standard > according to my HP man pages. How portable do you think it is? Good point. I get

Re: [HACKERS] WAL fsync scheduling

2000-11-18 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: >> how about sigpause, and using SIGUSR1/SIGUSR2 to wake them up ? > Looks like a winner. sigpause() is a BSD-ism, and not part of any recognized standard according to my HP man pages. How portable do you think it is? regards,

Re: [HACKERS] WAL fsync scheduling

2000-11-18 Thread Bruce Momjian
> * Tom Lane <[EMAIL PROTECTED]> [001117 23:21]: > > Bruce Momjian <[EMAIL PROTECTED]> writes: > > > Other backend will see they are not the lowest > > > WAIT_ON_FSYNC and will wait for their byte to be set to NOT_IN_COMMIT > > > so they can then continue, knowing their data was synced. > > > > H

Re: [HACKERS] WAL fsync scheduling

2000-11-18 Thread Larry Rosenman
* Tom Lane <[EMAIL PROTECTED]> [001117 23:21]: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Other backend will see they are not the lowest > > WAIT_ON_FSYNC and will wait for their byte to be set to NOT_IN_COMMIT > > so they can then continue, knowing their data was synced. > > How will they w

Re: [HACKERS] WAL fsync scheduling

2000-11-18 Thread Bruce Momjian
> > Bruce Momjian <[EMAIL PROTECTED]> writes: > > > Other backend will see they are not the lowest > > > WAIT_ON_FSYNC and will wait for their byte to be set to NOT_IN_COMMIT > > > so they can then continue, knowing their data was synced. > > > > How will they wait? Without a semaphore involved,

Re: [HACKERS] WAL fsync scheduling

2000-11-17 Thread Bruce Momjian
> Bruce Momjian <[EMAIL PROTECTED]> writes: > > Other backend will see they are not the lowest > > WAIT_ON_FSYNC and will wait for their byte to be set to NOT_IN_COMMIT > > so they can then continue, knowing their data was synced. > > How will they wait? Without a semaphore involved, your answer

Re: [HACKERS] WAL fsync scheduling

2000-11-17 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Other backend will see they are not the lowest > WAIT_ON_FSYNC and will wait for their byte to be set to NOT_IN_COMMIT > so they can then continue, knowing their data was synced. How will they wait? Without a semaphore involved, your answer must be eit

[HACKERS] WAL fsync scheduling

2000-11-17 Thread Bruce Momjian
> > sleep(3) should conform to POSIX specification, if anyone has the > > reference they can check it to see what the effect of sleep(0) > > should be. > > Yes, but Posix also specifies sched_yield() which rather explicitly > allows a process to yield its timeslice. No idea how well that is >