Re: [GENERAL] Need Database Backup

2015-08-30 Thread Scott Marlowe
OK we're gonna need to keep this on the list, as other folks may be a much
better choice to help you than me (I'm not a Windows guy.)

OK so we need more info to help. I don't know how to fix the NTLDR problem,
etc, because it's windows. However, the folks who might be able to help
need more info.

Specifically, what are you doing to try and load the .sql extension?
Are you using a second machine for this?
Have you made a backup of the files in d:\Program Files\Postgresql and put
it in a safe place? It's important to NOT mess around with the only copy in
case things go wrong with it.
What exactly HAVE you done to try and move the PostgreSQL directory
elsewhere? What EXACT errors are you seeing.

The more information you provide the more we can help. Right now you're
asking for help, but you're not helping yourself, because you're not
showing us what's going wrong. More details gets you more answers.

On Sun, Aug 30, 2015 at 3:39 AM, Murali N Rao 
wrote:

> Sir,
>
> Suddenly Our system got restarted and we got a msg NTLDR Missing. I tried
> to repair but not able.
>
> OS: windows 2003 Server
>
> We installed the PGSQL in D:\program files\Postgresql
>
> I have whole folder having capacity of 1.53 GB
>
> and i have recently taken backup on 01st of August with Extension (.sql)
> even i cant upload that.
>
> Please i request u to do the need ful
>
> Regards
>
> Murali N
> System Admin,
> CIT, Gubbi
>
>
> From: Scott Marlowe 
> Sent: Sun, 30 Aug 2015 09:34:42
> To: muralih...@rediffmail.com
> Cc: "pgsql-general@postgresql.org" 
> Subject: Re: [GENERAL] Need Database Backup
> On Fri, Aug 28, 2015 at 11:27 PM, Murali N Rao
>  wrote:
>
> > Sir,
> >
> > We were using newgenlib software which is having postgresql as backend.
> >
> > Suddenly Our Systems OS got corrupted and unable to start and we have
> taken installed folder as backup from the drive but we are unable to
> restore and kindly help in this.
> >
> > and also we have also taken backup 30 days in .sql format but even i am
> unable to upload.
> >
> > So, i kindly request u to help in this as the database contains more
> than 2000 Students data
> >
>
> OK let's see what we can do to help you. What OS are you running? How
> idd you move the database directory to the new machine? What errors
> are you getting when you to start the db? What errors are you getting
> when trying to restore from your old .sql backup? What version of
> pgsql are you running?
>
> Just kinda imagine one of us is looking over your shoulder and tell us
> everything. Details that may seem small and unimportant can be very
> important in helping to troubleshoot this kind of thing.
>
>
> 
> Get your own *FREE* website, *FREE* domain & *FREE* mobile app with
> Company email.
> *Know More >*
> 
>



-- 
To understand recursion, one must first understand recursion.


Re: [GENERAL] Need Database Backup

2015-08-30 Thread Charles Clavadetscher
Hi

I agree with all upthreads mentioning that the amount of information you 
(Murali) deliver is much too little to help. Nevertheless my thoughts.

- NTLDR Missing is obviously a Windows problem and I don't think that it has to 
do with PostgreSQL. You may find better help on a Windows forum or mailing list.
- If you have produced a SQL file dumping your whole clusterv (pg_dumpall), 
then you should only need to reinstall PostgreSQL and run the file as a script 
(from command line or psql). There is no upload of sql file, unless I don't 
understand what you mean.

Bye
Charles

From: pgsql-general-ow...@postgresql.org 
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Scott Marlowe
Sent: Sonntag, 30. August 2015 15:36
To: muralih...@rediffmail.com; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Need Database Backup

OK we're gonna need to keep this on the list, as other folks may be a much 
better choice to help you than me (I'm not a Windows guy.)
OK so we need more info to help. I don't know how to fix the NTLDR problem, 
etc, because it's windows. However, the folks who might be able to help need 
more info.
Specifically, what are you doing to try and load the .sql extension? 
Are you using a second machine for this? 
Have you made a backup of the files in d:\Program Files\Postgresql and put it 
in a safe place? It's important to NOT mess around with the only copy in case 
things go wrong with it. 
What exactly HAVE you done to try and move the PostgreSQL directory elsewhere? 
What EXACT errors are you seeing. 
The more information you provide the more we can help. Right now you're asking 
for help, but you're not helping yourself, because you're not showing us what's 
going wrong. More details gets you more answers.

On Sun, Aug 30, 2015 at 3:39 AM, Murali N Rao  wrote:
Sir,

Suddenly Our system got restarted and we got a msg NTLDR Missing. I tried to 
repair but not able.

OS: windows 2003 Server

We installed the PGSQL in D:\program files\Postgresql

I have whole folder having capacity of 1.53 GB

and i have recently taken backup on 01st of August with Extension (.sql) even i 
cant upload that.

Please i request u to do the need ful

Regards

Murali N
System Admin,
CIT, Gubbi


From: Scott Marlowe 
Sent: Sun, 30 Aug 2015 09:34:42 
To: muralih...@rediffmail.com
Cc: "pgsql-general@postgresql.org" 
Subject: Re: [GENERAL] Need Database Backup
On Fri, Aug 28, 2015 at 11:27 PM, Murali N Rao
 wrote:

> Sir,
>
> We were using newgenlib software which is having postgresql as backend.
>
> Suddenly Our Systems OS got corrupted and unable to start and we have taken 
> installed folder as backup from the drive but we are unable to restore and 
> kindly help in this.
>
> and also we have also taken backup 30 days in .sql format but even i am 
> unable to upload.
>
> So, i kindly request u to help in this as the database contains more than 
> 2000 Students data
>

OK let's see what we can do to help you. What OS are you running? How
idd you move the database directory to the new machine? What errors
are you getting when you to start the db? What errors are you getting
when trying to restore from your old .sql backup? What version of
pgsql are you running?

Just kinda imagine one of us is looking over your shoulder and tell us
everything. Details that may seem small and unimportant can be very
important in helping to troubleshoot this kind of thing.

Get your own FREE website, FREE domain & FREE mobile app with Company email.  
Know More >



-- 
To understand recursion, one must first understand recursion.



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Need Database Backup

2015-08-30 Thread Adrian Klaver

On 08/30/2015 06:36 AM, Scott Marlowe wrote:

OK we're gonna need to keep this on the list, as other folks may be a
much better choice to help you than me (I'm not a Windows guy.)

OK so we need more info to help. I don't know how to fix the NTLDR
problem, etc, because it's windows. However, the folks who might be able
to help need more info.


What I could find:

https://support.microsoft.com/en-us/kb/816793



Specifically, what are you doing to try and load the .sql extension?


My guess is the OP is using pgAdmin and is trying to restore via the 
restore wizard. That only handles custom format backups and not 
text(plain) formats.



Are you using a second machine for this?
Have you made a backup of the files in d:\Program Files\Postgresql and
put it in a safe place? It's important to NOT mess around with the only
copy in case things go wrong with it.


Also, how was Postgres initially installed?


What exactly HAVE you done to try and move the PostgreSQL directory
elsewhere? What EXACT errors are you seeing.

The more information you provide the more we can help. Right now you're
asking for help, but you're not helping yourself, because you're not
showing us what's going wrong. More details gets you more answers.





--
Adrian Klaver
adrian.kla...@aklaver.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Need Database Backup

2015-08-30 Thread Melvin Davidson
You need to recreate the database to reload the data into so

   from the windows command line:
   C:\PostgresDB\bin\createdb.exe -U postgres ;

   Then to restore the data from the sql backup
   C:\PostgresDB\bin\pg_restore.exe -U postgres 


On Sun, Aug 30, 2015 at 10:06 AM, Adrian Klaver 
wrote:

> On 08/30/2015 06:36 AM, Scott Marlowe wrote:
>
>> OK we're gonna need to keep this on the list, as other folks may be a
>> much better choice to help you than me (I'm not a Windows guy.)
>>
>> OK so we need more info to help. I don't know how to fix the NTLDR
>> problem, etc, because it's windows. However, the folks who might be able
>> to help need more info.
>>
>
> What I could find:
>
> https://support.microsoft.com/en-us/kb/816793
>
>
>> Specifically, what are you doing to try and load the .sql extension?
>>
>
> My guess is the OP is using pgAdmin and is trying to restore via the
> restore wizard. That only handles custom format backups and not text(plain)
> formats.
>
> Are you using a second machine for this?
>> Have you made a backup of the files in d:\Program Files\Postgresql and
>> put it in a safe place? It's important to NOT mess around with the only
>> copy in case things go wrong with it.
>>
>
> Also, how was Postgres initially installed?
>
> What exactly HAVE you done to try and move the PostgreSQL directory
>> elsewhere? What EXACT errors are you seeing.
>>
>> The more information you provide the more we can help. Right now you're
>> asking for help, but you're not helping yourself, because you're not
>> showing us what's going wrong. More details gets you more answers.
>>
>>
>
>
> --
> Adrian Klaver
> adrian.kla...@aklaver.com
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>



-- 
*Melvin Davidson*
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.


Re: [GENERAL] Need Database Backup

2015-08-30 Thread Adrian Klaver

On 08/30/2015 07:13 AM, Melvin Davidson wrote:

You need to recreate the database to reload the data into so

from the windows command line:
C:\PostgresDB\bin\createdb.exe -U postgres ;


That assumes Postgres is running, which at this point seems not to be 
the case or at least is unproven.




Then to restore the data from the sql backup
C:\PostgresDB\bin\pg_restore.exe -U postgres 


This will not work if the *.sql is a plain text file.








--
Adrian Klaver
adrian.kla...@aklaver.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Need Database Backup

2015-08-30 Thread Melvin Davidson
Adrian
>From Murali N Rao 5:43 AM (4 hours ago)

>now i have installed new os and installed PGSQL again it working now but
no data


On Sun, Aug 30, 2015 at 10:21 AM, Adrian Klaver 
wrote:

> On 08/30/2015 07:13 AM, Melvin Davidson wrote:
>
>> You need to recreate the database to reload the data into so
>>
>> from the windows command line:
>> C:\PostgresDB\bin\createdb.exe -U postgres ;
>>
>
> That assumes Postgres is running, which at this point seems not to be the
> case or at least is unproven.
>
>
>> Then to restore the data from the sql backup
>> C:\PostgresDB\bin\pg_restore.exe -U postgres 
>>
>
> This will not work if the *.sql is a plain text file.
>
>
>>
>>
>
>
> --
> Adrian Klaver
> adrian.kla...@aklaver.com
>



-- 
*Melvin Davidson*
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.


Re: [GENERAL] Need Database Backup

2015-08-30 Thread Charles Clavadetscher
Well the rest should be easy.

psql -U ... -h ... -p ... -d ... -f sql_file.sql

http://www.postgresql.org/docs/9.4/static/app-psql.html option "f"

From: pgsql-general-ow...@postgresql.org 
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Melvin Davidson
Sent: Sonntag, 30. August 2015 16:27
To: Adrian Klaver 
Cc: Scott Marlowe ; muralih...@rediffmail.com; 
pgsql-general@postgresql.org
Subject: Re: [GENERAL] Need Database Backup

Adrian
From Murali N Rao 5:43 AM (4 hours ago)

>now i have installed new os and installed PGSQL again it working now but no 
>data

On Sun, Aug 30, 2015 at 10:21 AM, Adrian Klaver  
wrote:
On 08/30/2015 07:13 AM, Melvin Davidson wrote:
You need to recreate the database to reload the data into so

from the windows command line:
C:\PostgresDB\bin\createdb.exe -U postgres ;

That assumes Postgres is running, which at this point seems not to be the case 
or at least is unproven.

Then to restore the data from the sql backup
C:\PostgresDB\bin\pg_restore.exe -U postgres 

This will not work if the *.sql is a plain text file.




-- 
Adrian Klaver
adrian.kla...@aklaver.com



-- 
Melvin Davidson
I reserve the right to fantasize.  Whether or not you 
wish to share my fantasy is entirely up to you. 



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Need Database Backup

2015-08-30 Thread Adrian Klaver

On 08/30/2015 07:27 AM, Melvin Davidson wrote:

Adrian
 From Murali N Rao 5:43 AM (4 hours ago)

 >now i have installed new os and installed PGSQL again it working now
but no data


Aaah, missed that, so Postgres is running, thanks.



--
Adrian Klaver
adrian.kla...@aklaver.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Need Database Backup

2015-08-30 Thread Adrian Klaver

On 08/30/2015 07:27 AM, Melvin Davidson wrote:

Adrian
 From Murali N Rao 5:43 AM (4 hours ago)

 >now i have installed new os and installed PGSQL again it working now
but no data


I plead lack of coffee, but where is that message and was there more in it?




On Sun, Aug 30, 2015 at 10:21 AM, Adrian Klaver
mailto:adrian.kla...@aklaver.com>> wrote:

On 08/30/2015 07:13 AM, Melvin Davidson wrote:

You need to recreate the database to reload the data into so

 from the windows command line:
 C:\PostgresDB\bin\createdb.exe -U postgres ;


That assumes Postgres is running, which at this point seems not to
be the case or at least is unproven.


 Then to restore the data from the sql backup
 C:\PostgresDB\bin\pg_restore.exe -U postgres 


This will not work if the *.sql is a plain text file.






--
Adrian Klaver
adrian.kla...@aklaver.com 




--
*Melvin Davidson*
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.



--
Adrian Klaver
adrian.kla...@aklaver.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Need Database Backup

2015-08-30 Thread Melvin Davidson
Good catch Adrian,

Murali,
Please change the restore command to

C:\PostgresDB\bin\psql.exe -U postgres -d  -f 


On Sun, Aug 30, 2015 at 10:40 AM, Adrian Klaver 
wrote:

> On 08/30/2015 07:27 AM, Melvin Davidson wrote:
>
>> Adrian
>>  From Murali N Rao 5:43 AM (4 hours ago)
>>
>>  >now i have installed new os and installed PGSQL again it working now
>> but no data
>>
>
> I plead lack of coffee, but where is that message and was there more in it?
>
>
>>
>> On Sun, Aug 30, 2015 at 10:21 AM, Adrian Klaver
>> mailto:adrian.kla...@aklaver.com>> wrote:
>>
>> On 08/30/2015 07:13 AM, Melvin Davidson wrote:
>>
>> You need to recreate the database to reload the data into so
>>
>>  from the windows command line:
>>  C:\PostgresDB\bin\createdb.exe -U postgres ;
>>
>>
>> That assumes Postgres is running, which at this point seems not to
>> be the case or at least is unproven.
>>
>>
>>  Then to restore the data from the sql backup
>>  C:\PostgresDB\bin\pg_restore.exe -U postgres > backup file>
>>
>>
>> This will not work if the *.sql is a plain text file.
>>
>>
>>
>>
>>
>>
>> --
>> Adrian Klaver
>> adrian.kla...@aklaver.com 
>>
>>
>>
>>
>> --
>> *Melvin Davidson*
>> I reserve the right to fantasize.  Whether or not you
>> wish to share my fantasy is entirely up to you.
>>
>
>
> --
> Adrian Klaver
> adrian.kla...@aklaver.com
>



-- 
*Melvin Davidson*
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.


Re: [GENERAL] wal files stay in the pg_xlog dir

2015-08-30 Thread kingl
Hi Adrian 

Thank you for your explanation, I did read the wal document that you
mentioned and every settings look ok.

I will keep an eye on the situation and I really appreciate your help.



--
View this message in context: 
http://postgresql.nabble.com/wal-files-stay-in-the-pg-xlog-dir-tp5863782p5863927.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] AIX 7.1 compile and initdb startup error TRAP: FailedAssertion

2015-08-30 Thread Martín Marqués
Hi,

I suggest you file a bug report:

http://www.postgresql.org/support/submitbug/

Regards,

El 23/08/15 a las 15:32, Pande, Nitin escribió:
> Hello,
> I am trying to compile and run PostgreSQL 9.4.0 on AIX 7.1.  I was able to 
> compile with following settings:
> CC="xlc_r -q64 -qnoansialias"
> CFLAGS="-g -O0"
> AR="ar -X64"
> OBJECT_MODE=64
> ./configure --enable-cassert --enable-debug 
> -with-includes=/opt/freeware/include --with-libraries=/opt/freeware/lib 
> --disable-thread-safety --prefix=/opt/postgres && gmake
> make install
> 
> But DB fails to start.  I get this error:
> ./initdb -D /opt/postgresql/data
> The files belonging to this database system will be owned by user "postgres".
> This user must also own the server process.
> The database cluster will be initialized with locale "C".
> The default database encoding has accordingly been set to "SQL_ASCII".
> The default text search configuration will be set to "english".
> 
> Data page checksums are disabled.
> 
> fixing permissions on existing directory /opt/postgresql/data ... ok
> creating subdirectories ... ok
> selecting default max_connections ... 100
> selecting default shared_buffers ... 128MB
> selecting dynamic shared memory implementation ... posix
> creating configuration files ... ok
> creating template1 database in /opt/postgresql/data/base/1 ... ok
> initializing pg_authid ... oke
> initializing dependencies ... ok
> creating system views ... TRAP: FailedAssertion("!(const 
> Node*)(field1))->type) == T_String))", File: "parse_expr.c", Line: 602)
> child process was terminated by signal 6
> initdb: removing contents of data directory "/opt/postgresql/data”
> 


-- 
Martín Marquéshttp://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] master/master replication with load balancer in front

2015-08-30 Thread Martín Marqués
El 24/08/15 a las 15:41, Florin Andrei escribió:
> On 2015-08-23 06:56, Martín Marqués wrote:
>> El 21/08/15 a las 20:45, Florin Andrei escribió:
>>>
>>> The single instance scheme is not very reliable. I need to build a new
>>> DB backend. I'll set up Postgres 9.4. Ideally, I'd like to setup 2
>>> instances, each instance placed in a different availability zone.
>>> Master/master replication. I'll put a load balancer (ELB) in front of
>>> both instances.
>>
>> It's not clear if the main goal is reliability (or availability), or to
>> balance writes.
>>
>> If you are looking for HA, single master with multiple standbys is your
>> best bet (you can put standbys on different zones).
> 
> This is for reliability / availability.
> 
> The thing is, if I have a single master and an AZ fails, I still have to
> make manual changes to switch to the healthy AZ - and, until then,
> updates would fail. Master/master, in theory, should absorb single-AZ
> failures without needing any manual intervention.

When updates fail the application should have the code to retry
executing those statements or return the appropriate errors to the user
so further actions can be carried on.

And in any case, you will need to adjust you application or pooling
system to send statements to a node that's up. Multi-master solutions
won't magically do that.

Maybe you should take a look at repmgr and particularly the automatic
failover feature:

 https://github.com/2ndQuadrant/repmgr/blob/master/FAILOVER.rst

>> You can also look at BDR and have masters geographically distributed,
>> but I'd strongly suggest you look at the link
>> http://bdr-project.org/docs/stable/weak-coupled-multimaster.html, and
>> keep in mind that with multi-master systems you will be more prone to
>> data modification conflicts.
> 
> I get the sense that BDR is not 100% ready for prime time. Is that
> accurate?

BDR is ready for prime time, but if it will work for you depends on your
needs. BDR aims at *eventually* consistent multi-masters system with
geographically distributed nodes, so DML statements on one node will not
be slowed down because the data has to be replicated to other distant nodes.

There's still lots of ground where to improve, but isn't that also true
for any other system?

The important thing is if it provides what you need.

I suggest you run some tests and see if it fits your requirements.

Regards,

-- 
Martín Marquéshttp://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] BDR setup - bdr_node_join_wait_for_ready()

2015-08-30 Thread Martín Marqués
El 27/08/15 a las 13:35, cchee-ob escribió:
> What exactly does bdr_node_wait_for_ready() do?  I've been trying to setup
> BDR on an existing database and once I run the select
> bdr.bdr_node_wait_for_ready(); command on the 2nd node after running the
> bdr.bdr_group_join() command it just hangs .  I've done the same setup
> procedure on brand new nodes and have no issue with this command and BDR
> works fine.  Is there anything that can be done to insure this command
> executes properly on an existing database?

The funtion is called bdr.bdr_node_join_wait_for_ready(), but I suppose
that's just a mistake when writing this mail.

As long as the node is still joining with the bdr group,
bdr.bdr_node_join_wait_for_ready() will not end.

It basically checks the node_status on bdr.bdr_nodes:

CREATE FUNCTION bdr.bdr_node_join_wait_for_ready()
RETURNS void LANGUAGE plpgsql VOLATILE AS $body$
DECLARE
_node_status "char";
BEGIN
IF current_setting('transaction_isolation') <> 'read committed' THEN
RAISE EXCEPTION 'Can only wait for node join in an ISOLATION
LEVEL READ COMMITTED transaction, not %',
current_setting('transaction_isolation');
END IF;

LOOP
SELECT INTO _node_status
  node_status
FROM bdr.bdr_nodes
WHERE (node_sysid, node_timeline, node_dboid)
  = bdr.bdr_get_local_nodeid();

PERFORM pg_sleep(0.5);

EXIT WHEN _node_status = 'r';
END LOOP;
END;
$body$;

BTW, why don't you the physical join procedure with bdr_init_copy to
join nodes?

Regards,

-- 
Martín Marquéshttp://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Slave promotion problem...

2015-08-30 Thread marin
Last week we had some problems on the master server which caused a 
failover on the slave (the master was completely unresponsive due to 
reasons still unknown). The slave received the promote signal (pg_ctl 
promote) and logged that in the logs:
2015-08-28 23:05:10 UTC [6]: [50-1] user=,db= LOG:  received promote 
request
2015-08-28 23:05:10 UTC [467]: [2-1] user=,db= FATAL:  terminating 
walreceiver process due to administrator command


5 hours later the slave still didn't promote. Meanwhile we fixed the 
master and restarted it. The slave was restarted and it behaved just 
like the promote signal didn't arrive, connecting to the master as a 
regular slave.


Because of maintenance we had to issue a failover a few days after, and 
this time the failover was successful:
2015-08-30 19:40:08 UTC [312]: [2-1] user=,db= LOG:  replication 
terminated by primary server
2015-08-30 19:40:08 UTC [312]: [3-1] user=,db= DETAIL:  End of WAL 
reached on timeline 3 at 1AC/4D90.
2015-08-30 19:40:08 UTC [312]: [4-1] user=,db= FATAL:  could not send 
end-of-streaming message to primary: no COPY in progress
2015-08-30 19:40:08 UTC [6]: [34-1] user=,db= LOG:  invalid record 
length at 1AC/4D90
2015-08-30 19:40:10 UTC [6]: [35-1] user=,db= LOG:  received promote 
request
2015-08-30 19:40:13 UTC [6]: [36-1] user=,db= LOG:  redo done at 
1AC/4D28
2015-08-30 19:40:13 UTC [6]: [37-1] user=,db= LOG:  last completed 
transaction was at log time 2015-08-30 19:40:07.18114+00
2015-08-30 19:40:14 UTC [6]: [38-1] user=,db= LOG:  selected new 
timeline ID: 4
2015-08-30 19:40:14 UTC [6]: [39-1] user=,db= LOG:  restored log file 
"0003.history" from archive
2015-08-30 19:40:14 UTC [6]: [40-1] user=,db= LOG:  archive recovery 
complete
2015-08-30 19:40:14 UTC [6]: [41-1] user=,db= LOG:  MultiXact member 
wraparound protections are now enabled
2015-08-30 19:40:14 UTC [29303]: [1-1] user=,db= LOG:  autovacuum 
launcher started
2015-08-30 19:40:14 UTC [1]: [4-1] user=,db= LOG:  database system is 
ready to accept connections


I am unsure if this promotion failure is a bug/glitch, but the promote 
procedure is automated and tested a couple of hundred times so I am 
certain we initiated the promote correctly.
Looking in the internet I haven't found anything similar. Does anybody 
know any reason why the slave didn't promote after receiving the promote 
signal? Looking at the data it seems like the slave aborted the promote 
process.


Both instances are 9.4.4 connected with streaming replication.

Regards,
Mladen Marinović


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general