Re: backup -restore question

2020-07-13 Thread Ron
On 7/13/20 7:37 PM, Adrian Klaver wrote: On 7/13/20 2:56 PM, Ron wrote: On 7/13/20 2:32 PM, Adrian Klaver wrote: On 7/13/20 12:12 PM, Julie Nishimura wrote: Hello there, One of our PostgreSQL 9.4.1  databases has been backed up as *.gz file with the compression 9 "pg_dump -Z 9". What is the

Re: PostgresQL 12 - could not connect to server: FATAL: the database system is in recovery mode

2020-07-13 Thread Adrian Klaver
On 7/13/20 1:14 PM, FOUTE K. Jaurès wrote: Hello, The problem is related to my previous email "PostgreSQL 12 - ERROR: could not rename file "pg_logical/snapshots/1A-7C00D890.snap.13594.tmp" to "pg_logical/snapshots/1A-7C00D890.snap": No space left on device" . After stopping the replication

Re: backup -restore question

2020-07-13 Thread Adrian Klaver
On 7/13/20 2:56 PM, Ron wrote: On 7/13/20 2:32 PM, Adrian Klaver wrote: On 7/13/20 12:12 PM, Julie Nishimura wrote: Hello there, One of our PostgreSQL 9.4.1  databases has been backed up as *.gz file with the compression 9 "pg_dump -Z 9". What is the right format of restore this file when

Re: Both side privileges

2020-07-13 Thread David G. Johnston
On Mon, Jul 13, 2020 at 4:42 PM Jean-Philippe Chenel wrote: > Hi, > > I try to give userA privileges on userB objects and same thing to the > userB, giving privileges on userA objects. > > Grant userB to userA; —ok > Grant userA to userB; —error: role userB is already member of role userA >

Both side privileges

2020-07-13 Thread Jean-Philippe Chenel
Hi, I try to give userA privileges on userB objects and same thing to the userB, giving privileges on userA objects. Grant userB to userA; —ok Grant userA to userB; —error: role userB is already member of role userA How can I do that? With best regards,

Re: backup -restore question

2020-07-13 Thread Ron
On 7/13/20 2:32 PM, Adrian Klaver wrote: On 7/13/20 12:12 PM, Julie Nishimura wrote: Hello there, One of our PostgreSQL 9.4.1  databases has been backed up as *.gz file with the compression 9 "pg_dump -Z 9". What is the right format of restore this file when needed? Can I run the restore from

Re: PostgresQL 12 - could not connect to server: FATAL: the database system is in recovery mode

2020-07-13 Thread FOUTE K . Jaurès
Hello, The problem is related to my previous email "PostgreSQL 12 - ERROR: could not rename file "pg_logical/snapshots/1A-7C00D890.snap.13594.tmp" to "pg_logical/snapshots/1A-7C00D890.snap": No space left on device" . After stopping the replication postgresql has restarted to respond. Le lun. 13

Re: backup -restore question

2020-07-13 Thread Adrian Klaver
On 7/13/20 12:12 PM, Julie Nishimura wrote: Hello there, One of our PostgreSQL 9.4.1  databases has been backed up as *.gz file with the compression 9 "pg_dump -Z 9". What is the right format of restore this file when needed? Can I run the restore from a compressed file or I need to unzip the

backup -restore question

2020-07-13 Thread Julie Nishimura
Hello there, One of our PostgreSQL 9.4.1 databases has been backed up as *.gz file with the compression 9 "pg_dump -Z 9". What is the right format of restore this file when needed? Can I run the restore from a compressed file or I need to unzip the file first, then run pg_restore? Thanks

Re: Clustering solution ?

2020-07-13 Thread Jehan-Guillaume de Rorthais
On Thu, 9 Jul 2020 13:53:46 + (UTC) Laurent FAILLIE wrote: > Hello, > I've been asked by one of my customer to know which are the possible > clustering solution for PostgreSQL ? Active/passive ?Active/active ? > if possible free or not too expensive. Start first by setting up safe and

Re: Safe switchover

2020-07-13 Thread Jehan-Guillaume de Rorthais
On Fri, 10 Jul 2020 10:05:52 +1000 James Sewell wrote: > Hi all, > > I’m trying to work out a procedure for a safe zero data loss switchover > under (high) load, which allows the old master to be reconnected without > the use of pgrewind. > > Would the following be sane? > > - open connection

Re: Safe switchover

2020-07-13 Thread Stephen Frost
Greetings, * Paul Förster (paul.foers...@gmail.com) wrote: > > On 13. Jul, 2020, at 18:00, Stephen Frost wrote: > > Ah, yes, if you rebuild the replica from a backup (or from the primary), > > then sure, that's pretty similar to the pgbackrest delta restore, except > > that when using delta

Re: Safe switchover

2020-07-13 Thread Paul Förster
Hi Stephen, > On 13. Jul, 2020, at 18:00, Stephen Frost wrote: > > A pgbackrest delta restore will scan the entire data directory and > verify every file matches the last backup, or it'll replace the file > with what was in the backup that's being used. If there's an error > during any of

Re: Safe switchover

2020-07-13 Thread Stephen Frost
Greetings, * Paul Förster (paul.foers...@gmail.com) wrote: > > On 13. Jul, 2020, at 17:47, Stephen Frost wrote: > > > > Sure, Patroni will handle the failover fine- but that's not what I was > > referring to. If the server crashes and you have no idea why or what > > happened, I would strongly

Re: Safe switchover

2020-07-13 Thread Paul Förster
Hi Stephen, > On 13. Jul, 2020, at 17:47, Stephen Frost wrote: > > Sure, Patroni will handle the failover fine- but that's not what I was > referring to. If the server crashes and you have no idea why or what > happened, I would strongly recommend against using pg_rewind to rebuild > it to be

Re: Safe switchover

2020-07-13 Thread Stephen Frost
Greetings, * Paul Förster (paul.foers...@gmail.com) wrote: > > On 10. Jul, 2020, at 17:45, Stephen Frost wrote: > > Sure, if you know exactly why the former primary failed and have > > confidence that nothing actually bad happened then pg_rewind can work > > (though it's still not what I'd

Re: Doubt in mvcc

2020-07-13 Thread Adrian Klaver
On 7/13/20 12:31 AM, Rama Krishnan wrote: Hi sir, I m preparing for interview one of the recruiter asked me mvcc drawbacks as i told due to mvcc it use more space and need to perform maintenance activity. Another one is the same data causes an update conflict because two different

Re: PostgresQL 12 - could not connect to server: FATAL: the database system is in recovery mode

2020-07-13 Thread Srinivasa T N
On Mon, Jul 13, 2020, 7:16 PM FOUTE K. Jaurès wrote: > Hello, > > How can i solve this error > More info required Regards, Seenu. > > -- > Jaurès FOUTE >

PostgresQL 12 - could not connect to server: FATAL: the database system is in recovery mode

2020-07-13 Thread FOUTE K . Jaurès
Hello, How can i solve this error ? -- Jaurès FOUTE

Re: Doubt in mvcc

2020-07-13 Thread Francisco Olarte
Rama: 1st of all, please do not top post, specially if you want to discuss examples, I'm not goint to hunt up and down for the relevant sections. On Mon, Jul 13, 2020 at 10:52 AM Rama Krishnan wrote: > Still, I have a doubt as per your example both are trying to update the same > tuple so it

Logical replication from 11.x to 12.x and "unique key violations"

2020-07-13 Thread Thomas Kellerer
Hello, I have a strange error when using logical replication between a 11.2 (I know!) source database and a 12.3 target. If I create the publication with all needed tables (about 50) at once, I get "duplicate key value violates unique constraint xxx_pkey" errors during the initial replication

Re: Doubt in mvcc

2020-07-13 Thread Ravi Krishna
On 7/13/2020 4:52 AM, Rama Krishnan wrote: For example, two transactions are going to increase the amount on the same account by $100 . The first transaction reads the current value ($1000) and then the second transaction reads the same value. The first transaction increases the amount

Interaction between ON CONFLICT index inference and prepared statement generic plans

2020-07-13 Thread Bojan Petrovic
Hello, I noticed a behavior that was surprising to me, so I wanted to know if such behavior is expected. I created a partial unique index on table "t", and a prepared statement in which a subexpression of the index's WHERE clause figures as a parameter. # CREATE TABLE t(i int); # CREATE

Re: Doubt in mvcc

2020-07-13 Thread Rama Krishnan
Hi Francisco, Still, I have a doubt as per your example both are trying to update the same tuple so it may produce two different copies right? I read some blocks they mentioned drawback above two things It may lead to lost update also For example, two transactions are going to increase the

Re: Doubt in mvcc

2020-07-13 Thread Francisco Olarte
Rama: On Mon, Jul 13, 2020 at 9:52 AM Rama Krishnan wrote: > I m preparing for interview one of the recruiter asked me mvcc drawbacks as i > told due to mvcc it use more space and need to perform maintenance activity. > Another one is the same data causes an update conflict because two

Doubt in mvcc

2020-07-13 Thread Rama Krishnan
Hi sir, I m preparing for interview one of the recruiter asked me mvcc drawbacks as i told due to mvcc it use more space and need to perform maintenance activity. Another one is the same data causes an update conflict because two different transactions can update the same version of the row. he