Re: [HACKERS] Re: [COMMITTERS] pgsql: Basic Recovery Control functions for use in Hot Standby. Pause,

2011-03-16 Thread Fujii Masao
On Wed, Mar 16, 2011 at 11:27 PM, Tom Lane wrote: > Fujii Masao writes: >> How should recovery work when pause_at_recovery_target is >> enabled but hot standby is disabled? We have three choices: > >> 1. Forbit those settings, i.e., throw FATAL error. Tom dislikes this >>     idea. > > No, I didn

Re: Sync Rep and shutdown Re: [HACKERS] Sync Rep v19

2011-03-16 Thread Fujii Masao
On Thu, Mar 17, 2011 at 2:35 AM, Robert Haas wrote: > 1. If a die interrupt is received (pg_terminate_backend or fast > shutdown), then terminate the sync rep wait and arrange for the > connection to be closed without acknowledging the commit (but do send > a warning message back).  The commit sti

Re: [HACKERS] Rectifying wrong Date outputs

2011-03-16 Thread Piyush Newe
Sorry for creating the confusion. The table drawn was PostgreSQL vs EDB Advanced Server. Thanks Burce for clarification. For the 1-digit, 2-digit & 3-digit Year inputs, as I said, I didn't see any document in PG which will explain what would be the century considered if it is not given. If I misse

Re: [HACKERS] patch: tabcomple for pset - format and linestyle

2011-03-16 Thread Pavel Stehule
2011/3/16 Robert Haas : > On Mon, Mar 14, 2011 at 11:26 AM, Pavel Stehule > wrote: >> I am sending a very simple patch that enhance a autocomplete for >> format and linestyle attributes > > Committed. > thank you very much Regards Pavel Stehule > -- > Robert Haas > EnterpriseDB: http://www.en

[HACKERS] volatile markings to silence compilers

2011-03-16 Thread Bruce Momjian
Looking over the release notes, we have added a few 'volatile' storage specifications to variables which are near longjump/TRY blocks to silence compilers. I am worried that these specifications don't clearly identify their purpose. Can we rename these to use a macro for 'volatile' that will make

Re: [HACKERS] Re: [BUGS] BUG #5842: Memory leak in PL/Python when taking slices of results

2011-03-16 Thread Robert Haas
On Fri, Mar 11, 2011 at 6:02 AM, Bruce Momjian wrote: > What has been done with this report/fix? AFAIK, nothing. Added to 9.1 open items list. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@post

Re: [HACKERS] Japanese developers?

2011-03-16 Thread Hitoshi Harada
2011/3/17 Thom Brown : > On 16 March 2011 23:43, Dave Page wrote: >> On Wed, Mar 16, 2011 at 11:41 PM, Josh Berkus wrote: >>> All, >>> >>> So far, a few of us have heard from Fujii, Koichi, Satoshi, and >>> Ishakawa-san.  While we don't know that any contributors live in the >>> northern coastal

Re: Sync Rep and shutdown Re: [HACKERS] Sync Rep v19

2011-03-16 Thread Aidan Van Dyk
On Wed, Mar 16, 2011 at 8:30 PM, Robert Haas wrote: > I think the most important part of all this is that it is logged. > Anyone who is running synchronous replication should also be doing > careful monitoring; if not, shame on them, because if your data is > important enough that you need synchr

Re: [HACKERS] really lazy vacuums?

2011-03-16 Thread Robert Haas
On Wed, Mar 16, 2011 at 6:36 PM, Jim Nasby wrote: > One way to look at this is that any system will have a limit on how quickly > it can vacuum everything. If it's having trouble dedicating enough IO to > vacuum, then autovac is going to have a long list of tables that it wants to > vacuum. Whe

Re: Sync Rep and shutdown Re: [HACKERS] Sync Rep v19

2011-03-16 Thread Robert Haas
On Wed, Mar 16, 2011 at 6:23 PM, Dimitri Fontaine wrote: > Robert Haas writes: >> 1. If a die interrupt is received (pg_terminate_backend or fast >> shutdown), then terminate the sync rep wait and arrange for the >> connection to be closed without acknowledging the commit (but do send >> a warnin

Re: [HACKERS] Japanese developers?

2011-03-16 Thread Tatsuo Ishii
> On Wed, Mar 16, 2011 at 11:41 PM, Josh Berkus wrote: >> All, >> >> So far, a few of us have heard from Fujii, Koichi, Satoshi, and >> Ishakawa-san.  While we don't know that any contributors live in the >> northern coastal towns, we don't know that they don't either. >> >> Has anyone heard from

Re: [HACKERS] Japanese developers?

2011-03-16 Thread Thom Brown
On 16 March 2011 23:43, Dave Page wrote: > On Wed, Mar 16, 2011 at 11:41 PM, Josh Berkus wrote: >> All, >> >> So far, a few of us have heard from Fujii, Koichi, Satoshi, and >> Ishakawa-san.  While we don't know that any contributors live in the >> northern coastal towns, we don't know that they

Re: [HACKERS] Japanese developers?

2011-03-16 Thread Dave Page
On Wed, Mar 16, 2011 at 11:41 PM, Josh Berkus wrote: > All, > > So far, a few of us have heard from Fujii, Koichi, Satoshi, and > Ishakawa-san.  While we don't know that any contributors live in the > northern coastal towns, we don't know that they don't either. > > Has anyone heard from our other

[HACKERS] Japanese developers?

2011-03-16 Thread Josh Berkus
All, So far, a few of us have heard from Fujii, Koichi, Satoshi, and Ishakawa-san. While we don't know that any contributors live in the northern coastal towns, we don't know that they don't either. Has anyone heard from our other Japanese developers? Tatsuo, Hiroshi (both of them), Hitoshi, Ka

Re: [HACKERS] really lazy vacuums?

2011-03-16 Thread Jim Nasby
On Mar 14, 2011, at 2:36 PM, Robert Haas wrote: > I'm not quite sure how we'd decide whether to do a "really lazy" > vacuum or the kind we do now. The case where this approach wins big > is when there are few or no dead tuples. In that case, we do a lot of > work looking at the indexes and we don

Re: Sync Rep and shutdown Re: [HACKERS] Sync Rep v19

2011-03-16 Thread Dimitri Fontaine
Robert Haas writes: > 1. If a die interrupt is received (pg_terminate_backend or fast > shutdown), then terminate the sync rep wait and arrange for the > connection to be closed without acknowledging the commit (but do send > a warning message back). The commit still happened, though, so other >

Re: [HACKERS] Shared invalidation cache messages for temporary tables

2011-03-16 Thread Jim Nasby
On Mar 14, 2011, at 9:29 AM, Robert Haas wrote: > On Mon, Mar 14, 2011 at 10:21 AM, Bruce Momjian wrote: >>> Since your original email is fairly unclear about what you think the >>> problem is, it's a bit hard to speculate here, but like Simon, I don't >>> see any obvious problem here. Maybe you

Re: [HACKERS] Rectifying wrong Date outputs

2011-03-16 Thread Bruce Momjian
Robert Haas wrote: > On Wed, Mar 16, 2011 at 5:52 PM, Bruce Momjian wrote: > > Robert Haas wrote: > >> On Wed, Mar 16, 2011 at 8:21 AM, Piyush Newe > >> wrote: > >> > Data Format ?? ? ? ? ? ? ? ?PostgreSQL EDBAS > >> > TO_DATE('01-jan-10', ?'DD-MON-Y') ?? ? ? ?2010-01-01 Error > >> > TO_DATE('01-

Re: [HACKERS] Rectifying wrong Date outputs

2011-03-16 Thread Robert Haas
On Wed, Mar 16, 2011 at 5:52 PM, Bruce Momjian wrote: > Robert Haas wrote: >> On Wed, Mar 16, 2011 at 8:21 AM, Piyush Newe >> wrote: >> > Data Format ?? ? ? ? ? ? ? ?PostgreSQL EDBAS >> > TO_DATE('01-jan-10', ?'DD-MON-Y') ?? ? ? ?2010-01-01 Error >> > TO_DATE('01-jan-10', ?'DD-MON-YY') ?? ? ? ?20

Re: [HACKERS] Rectifying wrong Date outputs

2011-03-16 Thread Bruce Momjian
Robert Haas wrote: > On Wed, Mar 16, 2011 at 8:21 AM, Piyush Newe > wrote: > > Data Format ?? ? ? ? ? ? ? ?PostgreSQL EDBAS > > TO_DATE('01-jan-10', ?'DD-MON-Y') ?? ? ? ?2010-01-01 Error > > TO_DATE('01-jan-10', ?'DD-MON-YY') ?? ? ? ?2010-01-01 01-JAN-2010 > > TO_DATE('01-jan-10', ?'DD-MON-YYY') 2

Re: [HACKERS] patch: tabcomple for pset - format and linestyle

2011-03-16 Thread Robert Haas
On Mon, Mar 14, 2011 at 11:26 AM, Pavel Stehule wrote: > I am sending a very simple patch that enhance a autocomplete for > format and linestyle attributes Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing l

Re: [HACKERS] Rectifying wrong Date outputs

2011-03-16 Thread Robert Haas
On Wed, Mar 16, 2011 at 8:21 AM, Piyush Newe wrote: > Data Format                 PostgreSQL EDBAS > TO_DATE('01-jan-10',  'DD-MON-Y')         2010-01-01 Error > TO_DATE('01-jan-10',  'DD-MON-YY')         2010-01-01 01-JAN-2010 > TO_DATE('01-jan-10',  'DD-MON-YYY') 2010-01-01 01-JAN-2010 > TO_DATE

Re: Sync Rep and shutdown Re: [HACKERS] Sync Rep v19

2011-03-16 Thread Robert Haas
On Wed, Mar 16, 2011 at 7:39 AM, Robert Haas wrote: >>> The only idea I have for allowing fast shutdown to still be fast, even >>> when sync rep is involved, is to shut down the system in two phases. >>> The postmaster would need to stop accepting new connections, and first >>> kill off all the ba

Re: [HACKERS] Re: [COMMITTERS] pgsql: Basic Recovery Control functions for use in Hot Standby. Pause,

2011-03-16 Thread Tom Lane
Fujii Masao writes: > How should recovery work when pause_at_recovery_target is > enabled but hot standby is disabled? We have three choices: > 1. Forbit those settings, i.e., throw FATAL error. Tom dislikes this > idea. No, I didn't say that. I said not to write elog(FATAL). If the combin

Re: [HACKERS] Fwd: index corruption in PG 8.3.13

2011-03-16 Thread Alvaro Herrera
Excerpts from Nikhil Sontakke's message of mié mar 16 08:51:00 -0300 2011: > Hi, > > > To summarize, as I see it - the zeroed out block 523 should have been > > the second left-most leaf and should have pointed out to 522. Thus > > re-establishing the index chain > > > > 524 -> 523 -> 522 -> 277 -

Re: [HACKERS] Fwd: index corruption in PG 8.3.13

2011-03-16 Thread Nikhil Sontakke
Hi, > Of course, as you mentioned earlier, it's not impossible > there's a bug in the recovery code. Yeah, I was looking at the repair_frag function in 8.3.13 (yup it's ugly!) and found out that the normal ExecInsertIndexTuples call is used to insert the index entries. That is standard index code

Re: [HACKERS] How should the waiting backends behave in sync rep?

2011-03-16 Thread Robert Haas
On Wed, Mar 16, 2011 at 6:46 AM, Simon Riggs wrote: >> Yeah, I pointed out that SIGINT and SIGTERM are blocked there. >> But not SIGHUP ;) >> >> > We could write a scary bit of code to get around that, but it smells >> > badly of kludge. >> > >> > What do you think we should do? >> >> What I'm thi

[HACKERS] Rectifying wrong Date outputs

2011-03-16 Thread Piyush Newe
Hi, I was randomly testing some date related stuff on PG & observed that the outputs were wrong. e.g. postgres=# SELECT TO_DATE('01-jan-2010', 'DD-MON-YY'); to_date 3910-01-01 <- Look at this (1 row) postgres=# SELECT TO_DATE('01-jan-2010', 'DD-MON-'); to_date --

Re: [HACKERS] CREATE FOREIGN TABLE doc

2011-03-16 Thread Robert Haas
On Wed, Mar 16, 2011 at 6:26 AM, Shigeru HANADA wrote: > I noticed that CREATE FOREIGN TABLE document would need some > corrections. > >  - server_name is not mentioned in Parameters section >  - "=" is unnecessary in OPTIONS > > Please find attached a brief patch. Committed, thanks. -- Robert

Re: [HACKERS] Fwd: index corruption in PG 8.3.13

2011-03-16 Thread Robert Haas
On Wed, Mar 16, 2011 at 7:51 AM, Nikhil Sontakke wrote: > Hi, > >> To summarize, as I see it - the zeroed out block 523 should have been >> the second left-most leaf and should have pointed out to 522. Thus >> re-establishing the index chain >> >> 524 -> 523 -> 522 -> 277 -> ... >> >>> Was there a

Re: [HACKERS] Fwd: index corruption in PG 8.3.13

2011-03-16 Thread Nikhil Sontakke
Hi, > To summarize, as I see it - the zeroed out block 523 should have been > the second left-most leaf and should have pointed out to 522. Thus > re-establishing the index chain > > 524 -> 523 -> 522 -> 277 -> ... > >> Was there a machine restart in the picture as well? > It seems there might ha

Re: [HACKERS] Re: [COMMITTERS] pgsql: Basic Recovery Control functions for use in Hot Standby. Pause,

2011-03-16 Thread Robert Haas
On Wed, Mar 16, 2011 at 4:41 AM, Simon Riggs wrote: >> > Another problem here is that we are defaulting to hot_standby=off and >> > pause_at_recovery_target=on.  So AIUI, with this patch, if someone >> > sets a recovery target without making any other changes to the >> > configuration, their datab

Re: Sync Rep and shutdown Re: [HACKERS] Sync Rep v19

2011-03-16 Thread Robert Haas
On Wed, Mar 16, 2011 at 4:51 AM, Simon Riggs wrote: > On Tue, 2011-03-15 at 22:07 -0400, Robert Haas wrote: >> On Wed, Mar 9, 2011 at 11:11 PM, Fujii Masao wrote: >> > Same as above. I think that it's more problematic to leave the code >> > as it is. Because smart/fast shutdown can make the serve

Re: Sync Rep and shutdown Re: [HACKERS] Sync Rep v19

2011-03-16 Thread Robert Haas
On Wed, Mar 16, 2011 at 1:43 AM, Fujii Masao wrote: > On Wed, Mar 16, 2011 at 11:07 AM, Robert Haas wrote: >> The problem is that there may be another backend B waiting on a lock >> held by A.  If backend A exits cleanly (without a PANIC), it will >> remove itself from the ProcArray and release l

Re: [HACKERS] How should the waiting backends behave in sync rep?

2011-03-16 Thread Simon Riggs
On Wed, 2011-03-16 at 18:41 +0900, Fujii Masao wrote: > On Wed, Mar 16, 2011 at 5:44 PM, Simon Riggs wrote: > > On Wed, 2011-03-16 at 16:36 +0900, Fujii Masao wrote: > >> On Sat, Mar 12, 2011 at 3:12 AM, Robert Haas wrote: > >> > There's a comment that looks related to this issue in syncrep.c. I

[HACKERS] CREATE FOREIGN TABLE doc

2011-03-16 Thread Shigeru HANADA
I noticed that CREATE FOREIGN TABLE document would need some corrections. - server_name is not mentioned in Parameters section - "=" is unnecessary in OPTIONS Please find attached a brief patch. Regards, -- Shigeru Hanada create_foreign_table_doc.patch Description: Binary data -- Sent vi

Re: [HACKERS] How should the waiting backends behave in sync rep?

2011-03-16 Thread Fujii Masao
On Wed, Mar 16, 2011 at 5:44 PM, Simon Riggs wrote: > On Wed, 2011-03-16 at 16:36 +0900, Fujii Masao wrote: >> On Sat, Mar 12, 2011 at 3:12 AM, Robert Haas wrote: >> > There's a comment that looks related to this issue in syncrep.c.  It reads: >> > >> >                /* >> >                 * We

Re: [HACKERS] Replication server timeout patch

2011-03-16 Thread Fujii Masao
On Wed, Mar 16, 2011 at 4:49 PM, Fujii Masao wrote: > Agreed. I'll change the patch. Done. I attached the updated patch. Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center replication_timeout_v6.patch Description: Binary data -- Sent via pgsq

Re: Sync Rep and shutdown Re: [HACKERS] Sync Rep v19

2011-03-16 Thread Simon Riggs
On Tue, 2011-03-15 at 22:07 -0400, Robert Haas wrote: > On Wed, Mar 9, 2011 at 11:11 PM, Fujii Masao wrote: > > Same as above. I think that it's more problematic to leave the code > > as it is. Because smart/fast shutdown can make the server get stuck > > until immediate shutdown is requested. >

Re: [HACKERS] How should the waiting backends behave in sync rep?

2011-03-16 Thread Simon Riggs
On Wed, 2011-03-16 at 16:36 +0900, Fujii Masao wrote: > On Sat, Mar 12, 2011 at 3:12 AM, Robert Haas wrote: > > There's a comment that looks related to this issue in syncrep.c. It reads: > > > >/* > > * We don't receive SIGHUPs at this point, so resetting > >

Re: [HACKERS] Re: [COMMITTERS] pgsql: Basic Recovery Control functions for use in Hot Standby. Pause,

2011-03-16 Thread Simon Riggs
On Wed, 2011-03-16 at 16:29 +0900, Fujii Masao wrote: > On Sat, Mar 12, 2011 at 1:59 AM, Robert Haas wrote: > > On Fri, Mar 11, 2011 at 9:31 AM, Tom Lane wrote: > >> Fujii Masao writes: > >>> Yeah, since I like the former, I changed the wordings in the doc and > >>> recovery.conf.sample. What ab

Re: [HACKERS] Replication server timeout patch

2011-03-16 Thread Fujii Masao
On Sat, Mar 12, 2011 at 4:34 AM, Robert Haas wrote: > On Fri, Mar 11, 2011 at 8:29 AM, Fujii Masao wrote: >>> I think we should consider making this change for 9.1.  This is a real >>> wart, and it's going to become even more of a problem with sync rep, I >>> think. >> >> Yeah, that's a welcome!

Re: [HACKERS] How should the waiting backends behave in sync rep?

2011-03-16 Thread Fujii Masao
On Sat, Mar 12, 2011 at 3:12 AM, Robert Haas wrote: > There's a comment that looks related to this issue in syncrep.c.  It reads: > >                /* >                 * We don't receive SIGHUPs at this point, so resetting >                 * synchronous_standby_names has no effect on waiters. >

Re: [HACKERS] Re: [COMMITTERS] pgsql: Basic Recovery Control functions for use in Hot Standby. Pause,

2011-03-16 Thread Fujii Masao
On Sat, Mar 12, 2011 at 1:59 AM, Robert Haas wrote: > On Fri, Mar 11, 2011 at 9:31 AM, Tom Lane wrote: >> Fujii Masao writes: >>> Yeah, since I like the former, I changed the wordings in the doc and >>> recovery.conf.sample. What about the attached patch? >> >> Please stop plastering the code wi