Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 27F8B2E2385 for ; Fri, 11 Jan 2008 14:13:47 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 78282-01-9 for ; Fri, 11 Jan 2008 14:13:40 -0400 (AST) Received: from thebighonker.lerctr.org (thebighonker.lerctr.org [192.147.25.65]) by postgresql.org (Postfix) with ESMTP id 377D12E488E for ; Fri, 11 Jan 2008 14:13:41 -0400 (AST) Received: from thebighonker.lerctr.org ([192.147.25.65]:59110) by thebighonker.lerctr.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69 (FreeBSD)) (envelope-from ) id 1JDONr-000MTG-IO; Fri, 11 Jan 2008 12:13:37 -0600 Date: Fri, 11 Jan 2008 12:13:33 -0600 (CST) From: Larry Rosenman To: "Joshua D. Drake" cc: =?ISO-8859-1?Q?Pedro_Briones_Garc=EDa?= , pgsql-admin@postgresql.org Subject: Re: PostgreSQL on 64-bit Windows In-Reply-To: <47878BB6.8080702@commandprompt.com> Message-ID: <20080111121255.E86191@thebighonker.lerctr.org> References: <47878BB6.8080702@commandprompt.com> MIME-Version: 1.0 X-LERCTR-Spam-Score: -4.4 (----) X-LERCTR-Spam-Report: SpamScore (-4.4/5.0) ALL_TRUSTED=-1.8,BAYES_00=-2.599 DomainKey-Status: no signature X-Virus-Scanned: Maia Mailguard 1.0.1 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: 8BIT X-Archive-Number: 200801/122 X-Sequence-Number: 27896 On Fri, 11 Jan 2008, Joshua D. Drake wrote: > Pedro Briones García wrote: >> Hello. >> >> >> According to PostgreSQL FAQ >> >> *Q: Does PostgreSQL Support 64-bit Computing?* >> A: Yes. In fact, we've supported 64-bit systems for at least 10 years, just >> like a lot of other Unix and POSIX software. *We do not yet support 64-bit >> Windows, however*. >> >> Does it mean that PostgreSQL can not run on a 64-bit Windows computer, or >> does it mean that it is possible, but the database does not make the most >> of the capacity, but it works as if the computer would be of 32 bits? >> > > > My understanding is that it will run on 64-bit windows but in 32bit mode. > I know from first hand experience that it runs as a 32-bit app on XP 64. LER > Joshua D. Drake > > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster > -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 512-248-2683 E-Mail: ler@lerctr.org US Mail: 430 Valona Loop, Round Rock, TX 78681-3893 From pgsql-admin-owner@postgresql.org Fri Jan 11 15:46:57 2008 Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id E6C962E444F for ; Fri, 11 Jan 2008 15:46:54 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 92574-08 for ; Fri, 11 Jan 2008 15:46:45 -0400 (AST) Received: from mail2.yozons.com (mail2.yozons.com [63.251.168.97]) by postgresql.org (Postfix) with ESMTP id 2CCD32E444E for ; Fri, 11 Jan 2008 15:46:47 -0400 (AST) Received: from [192.168.1.2] (pool-71-164-18-27.sttlwa.fios.verizon.net [71.164.18.27]) (authenticated bits=0) by mail2.yozons.com (8.12.10/8.12.10) with ESMTP id m0BJkjlG026593 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 11 Jan 2008 11:46:45 -0800 Message-ID: <4787C7A7.3000503@computer.org> Date: Fri, 11 Jan 2008 11:46:47 -0800 From: David Wall Reply-To: d.wall@computer.org User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: WAL recovery, stop and resume recovery? Content-Type: multipart/alternative; boundary="------------070207050707000702030905" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/123 X-Sequence-Number: 27897 This is a multi-part message in MIME format. --------------070207050707000702030905 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Using PG 8.2, I have a database in recovery mode using pg_standby to handle the WAL restores. Is it allowable to have a backup database in recovery mode, then stop recovery (in this case, by putting the trigger file in place to stop pg_standby), check out that the backup db appears up to date, stop the now active backup db, and then restart it in recover mode again to have it resume its backup role? I have had some success doing this, with the restart in recovery showing: LOG: starting archive recovery LOG: restore_command = "~/postgresql/bin/pg_standby -l -d -s 2 -k 20 -t ~/postgresql/restoreWALs/STOP_RESTORE ~/postgresql/restoreWALs %f %p 2>> ~/pg_standby.log" LOG: restored log file "000000010000000500000018" from archive *LOG: invalid xl_info in primary checkpoint record* LOG: using previous checkpoint record at 5/18000020 LOG: redo record is at 5/18000020; undo record is at 0/0; shutdown FALSE LOG: next transaction ID: 0/1535389; next OID: 53990 LOG: next MultiXactId: 1; next MultiXactOffset: 0 *LOG: automatic recovery in progress* LOG: redo starts at 5/18000068 But there are times when I do this that it cannot. Is this because the steps are an issue (after all, I did stop recovery and go active briefly, though I didn't update the db during that time, just did \d and select queries to see that DDL and row data were updated on the backup), or is it related to not keeping enough WAL files around (pg_standby -k 20 was chosen, but it's not clear how to select this value, and it sounds like 8.3 gets rid of that issue entirely) to find the 'secondary checkpoint record'. Here's the sort of error I get when it doesn't allow me to restart: LOG: database system was shut down at 2008-01-11 11:40:05 PST LOG: starting archive recovery LOG: restore_command = "~/postgresql/bin/pg_standby -l -d -s 2 -k 20 -t ~/postgresql/restoreWALs/STOP_RESTORE ~/postgresql/restoreWALs %f %p 2>> ~/pg_standby.log" *LOG: restored log file "00000001000000050000001D" from archive LOG: invalid record length at 5/1D000068 LOG: invalid primary checkpoint record LOG: restored log file "00000001000000050000001D" from archive LOG: invalid resource manager ID in secondary checkpoint record PANIC: could not locate a valid checkpoint record* LOG: startup process (PID 9219) was terminated by signal 6 LOG: aborting startup due to startup process failure LOG: logger shutting down Thanks, David --------------070207050707000702030905 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Using PG 8.2, I have a database in recovery mode using pg_standby to handle the WAL restores.

Is it allowable to have a backup database in recovery mode, then stop recovery (in this case, by putting the trigger file in place to stop pg_standby), check out that the backup db appears up to date, stop the now active backup db, and then restart it in recover mode again to have it resume its backup role?

I have had some success doing this, with the restart in recovery showing:

LOG:  starting archive recovery
LOG:  restore_command = "~/postgresql/bin/pg_standby -l -d -s 2 -k 20 -t ~/postgresql/restoreWALs/STOP_RESTORE ~/postgresql/restoreWALs %f %p 2>> ~/pg_standby.log"
LOG:  restored log file "000000010000000500000018" from archive
LOG:  invalid xl_info in primary checkpoint record
LOG:  using previous checkpoint record at 5/18000020
LOG:  redo record is at 5/18000020; undo record is at 0/0; shutdown FALSE
LOG:  next transaction ID: 0/1535389; next OID: 53990
LOG:  next MultiXactId: 1; next MultiXactOffset: 0
LOG:  automatic recovery in progress
LOG:  redo starts at 5/18000068


But there are times when I do this that it cannot.  Is this because the steps are an issue (after all, I did stop recovery and go active briefly, though I didn't update the db during that time, just did \d and select queries to see that DDL and row data were updated on the backup), or is it related to not keeping enough WAL files around (pg_standby -k 20 was chosen, but it's not clear how to select this value, and it sounds like 8.3 gets rid of that issue entirely) to find the 'secondary checkpoint record'.

Here's the sort of error I get when it doesn't allow me to restart:

LOG:  database system was shut down at 2008-01-11 11:40:05 PST
LOG:  starting archive recovery
LOG:  restore_command = "~/postgresql/bin/pg_standby -l -d -s 2 -k 20 -t ~/postgresql/restoreWALs/STOP_RESTORE ~/postgresql/restoreWALs %f %p 2>> ~/pg_standby.log"
LOG:  restored log file "00000001000000050000001D" from archive
LOG:  invalid record length at 5/1D000068
LOG:  invalid primary checkpoint record
LOG:  restored log file "00000001000000050000001D" from archive
LOG:  invalid resource manager ID in secondary checkpoint record
PANIC:  could not locate a valid checkpoint record

LOG:  startup process (PID 9219) was terminated by signal 6
LOG:  aborting startup due to startup process failure
LOG:  logger shutting down



Thanks,
David
--------------070207050707000702030905--