Re: [GENERAL] Postgres fails to start

2015-04-06 Thread Michael Paquier
On Tue, Apr 7, 2015 at 10:46 AM, Haiming Zhang wrote: > Thank you for replying. The file was there, is that ok to remove the > corrupted file to recover postgres? "base/2008723533/2107262657.2" Be careful here, I would recommend taking a file-level snapshot before going on and do perhaps-stupid

Re: [GENERAL] Postgres fails to start

2015-04-06 Thread Haiming Zhang
Hi Michael, Thank you for replying. The file was there, is that ok to remove the corrupted file to recover postgres? "base/2008723533/2107262657.2" Unfortunately, I only have a backup on February. Is there a way I can recover it without losing the recent data? Thanks and regards, Haiming

Re: [GENERAL] Postgres fails to start

2015-04-06 Thread Michael Paquier
On Tue, Apr 7, 2015 at 9:25 AM, Haiming Zhang wrote: > 2015-04-07 09:01:43 EST LOG: unrecognized win32 error code: 1392 > > [...] In Windows world, 1392 = ERROR_FILE_CORRUPT = the file or directory is corrupted and unreadable: https://msdn.microsoft.com/en-us/library/windows/desktop/ms681385%28v

[GENERAL] Postgres fails to start

2015-04-06 Thread Haiming Zhang
Hi All, I have experienced that Postgres services was not able to start, I tried from Services and command, and both were failed. Here are the logs I got, please help. (I am using postgres 9.1 and there are plenty disk space left). 2015-04-07 09:01:28 EST LOG: database system was interrupted w

Re: [GENERAL] ERROR: could not access status of transaction 283479860

2015-04-06 Thread Pweaver (Paul Weaver)
We figured that out. We were afraid that there was corrupt data due the counter overflow so we reverted to a backup right before the overflow. We submitted a bug this morning (bug #12990) to the Postgres bugs mailing list which has more information and questions. On Mon, Apr 6, 2015 at 2:17 PM, Al

Re: [GENERAL] pgAgent

2015-04-06 Thread Adam Brusselback
Here you are: do $$ declare job_id int; begin /* add a job and get its id: */ insert into pgagent.pga_job ( jobjclid , jobname ) values ( 1 /*1=Routine Maintenance*/ , 'DELETE_NAMES' /* job name */ ) returning

Re: [GENERAL] ERROR: could not access status of transaction 283479860

2015-04-06 Thread Alvaro Herrera
Pweaver (Paul Weaver) wrote: > We started getting the following error on some transactions on our database > (when against particular rows run against the table). > > > PGError: ERROR: could not access status of transaction 283479860 DETAIL: > Could not open file "pg_multixact/members/4D6D": No s

Re: [GENERAL] Serializable transaction restart/re-execute

2015-04-06 Thread Filipe Pina
Hi Bill, thanks for the quick reply. I had read about SAVEPOINTs but I also read I cannot use them in PLPGSQL and should use BEGIN/END blocks and EXCEPTIONs. Did you check the URL I mentioned? I have the code I used there: CREATE OR REPLACE FUNCTION myretest() RETURNS integer AS $$ DECLARE t

Re: [GENERAL]

2015-04-06 Thread Ramesh T
The link is good. But What I am expecting the following link..Created Using pgAgent. http://www.postgresonline.com/journal/archives/19-Setting-up-PgAgent-and-Doing-Scheduled-Backups.html in above link process they placed location of the script file at STEP DEFINTION TAB creation process.. sam

[GENERAL]

2015-04-06 Thread Ramesh T
Hi , How to create job in pgAgent.Where I need to place script in pgAgent..any help Advanced thanks...

[GENERAL] pgAgent

2015-04-06 Thread Champion Always
Hi, job_name => 'DELETE_NAMES' ,job_type => 'PLSQL_BLOCK' ,job_action => 'BEGIN DELETE_NAMES; END;' ,start_date => sysdate ,repeat_interval => 'FREQ=DAILY' ,enabled => TRUE); it is oracle .. .And i installed pgAgent On postgres .. how above oracle code can conv

[GENERAL] ERROR: could not access status of transaction 283479860

2015-04-06 Thread Pweaver (Paul Weaver)
We started getting the following error on some transactions on our database (when against particular rows run against the table). PGError: ERROR: could not access status of transaction 283479860 DETAIL: Could not open file "pg_multixact/members/4D6D": No such file or directory. We don't know wha

Re: [GENERAL] stack builder

2015-04-06 Thread Ramesh T
I had installed on Linux.re-install postgres for stack builder ..? cron is their ,but I am new to this cron and is this method for job schedulers in postgres. On Wed, Apr 1, 2015 at 8:39 PM, Adrian Klaver wrote: > On 04/01/2015 07:59 AM, Ramesh T wrote: > >>Hi, >> I had insta

[GENERAL] stack builder

2015-04-06 Thread Ramesh T
Hi all, I didn't selected stack builder at the time of installation of postgres.Any help how to add* application stack builder* to existed postgres.

Re: [GENERAL] stack builder

2015-04-06 Thread Ramesh T
Hi, I had installed pgadmin3 but not selected stackbuilder ,let me know how to add stackbuilder to pgadmin3 for additional addons. On Wed, Apr 1, 2015 at 7:15 PM, Adrian Klaver wrote: > On 04/01/2015 06:22 AM, Ramesh T wrote: > >> Hi all, >> I didn't selected stack

Re: [GENERAL] Serializable transaction restart/re-execute

2015-04-06 Thread Filipe Pina
Hi Kevin, thank you very much for reply. We plan to have a middleware/gateway in our full solution so we could have the restart logic there but that would only apply to external interface calls. We plan to have a few "backend processes" that we want to run directly in pgsql and those would not ha

Re: [GENERAL] Serializable transaction restart/re-execute

2015-04-06 Thread Kevin Grittner
Filipe Pina wrote: > I come from a GTM background and once of the transactional > features there are the “Transaction Restarts”. > > Transaction restart is when we have two concurrent processes > reading/writing to the same region/table of the database, the > last process to commit will “see” tha

Re: [GENERAL] Serializable transaction restart/re-execute

2015-04-06 Thread Filipe Pina
Thank you very much for such detailed response. Indeed I'm thinking too much "GTM" instead of actually changing the mindset, but the problem with LOCKs (which are also available in GTM) is that the developer does have to remind to lock what they want to use for update and if they don't, integrity/

Re: [GENERAL] Serializable transaction restart/re-execute

2015-04-06 Thread Bill Moran
On Mon, 6 Apr 2015 10:41:25 +0100 Filipe Pina wrote: > Hi Bill, thanks for the quick reply. > > I had read about SAVEPOINTs but I also read I cannot use them in PLPGSQL and > should use BEGIN/END blocks and EXCEPTIONs. > > Did you check the URL I mentioned? Yes, I did: http://stackoverflow.com

Re: [GENERAL] Serializable transaction restart/re-execute

2015-04-06 Thread Filipe Pina
Hi Bill, thanks for the quick reply. I had read about SAVEPOINTs but I also read I cannot use them in PLPGSQL and should use BEGIN/END blocks and EXCEPTIONs. Did you check the URL I mentioned? I have the code I used there: CREATE OR REPLACE FUNCTION myretest() RETURNS integer AS $$ DECLARE t