Re: [HACKERS] Rename a database that has connections

2011-11-21 Thread Mark Kirkwood
On 22/11/11 17:24, Mark Kirkwood wrote: On 22/11/11 16:41, Tom Lane wrote: Mark Kirkwood writes: I've been helping out several customers recently who all seem to be wrestling with the same issue: wanting to update/refresh non-production databases from the latest corresponding prod version. Typ

Re: [HACKERS] Rename a database that has connections

2011-11-21 Thread Mark Kirkwood
On 22/11/11 17:24, Mark Kirkwood wrote: I have not been able to find any other problems caused by this... renaming a db (many times) with hundreds of pgbench connections does not give rise to any issues. One point I did miss - the ps listing still uses the old dbname. pg_stat_activity is

Re: [HACKERS] Rename a database that has connections

2011-11-21 Thread Mark Kirkwood
On 22/11/11 16:41, Tom Lane wrote: Mark Kirkwood writes: I've been helping out several customers recently who all seem to be wrestling with the same issue: wanting to update/refresh non-production databases from the latest corresponding prod version. Typically they have (fairly complex) scripts

Re: [HACKERS] Rename a database that has connections

2011-11-21 Thread Bruce Momjian
Mark Kirkwood wrote: > On 22/11/11 16:38, Bruce Momjian wrote: > > Mark Kirkwood wrote: > >> I've been helping out several customers recently who all seem to be > >> wrestling with the same issue: wanting to update/refresh non-production > >> databases from the latest corresponding prod version. Ty

Re: [HACKERS] Rename a database that has connections

2011-11-21 Thread Mark Kirkwood
On 22/11/11 16:38, Bruce Momjian wrote: Mark Kirkwood wrote: I've been helping out several customers recently who all seem to be wrestling with the same issue: wanting to update/refresh non-production databases from the latest corresponding prod version. Typically they have (fairly complex) scri

Re: [HACKERS] Rename a database that has connections

2011-11-21 Thread Tom Lane
Mark Kirkwood writes: > I've been helping out several customers recently who all seem to be > wrestling with the same issue: wanting to update/refresh non-production > databases from the latest corresponding prod version. Typically they > have (fairly complex) scripts that at some point attempt

Re: [HACKERS] Rename a database that has connections

2011-11-21 Thread Bruce Momjian
Mark Kirkwood wrote: > I've been helping out several customers recently who all seem to be > wrestling with the same issue: wanting to update/refresh non-production > databases from the latest corresponding prod version. Typically they > have (fairly complex) scripts that at some point attempt t

[HACKERS] Rename a database that has connections

2011-11-21 Thread Mark Kirkwood
I've been helping out several customers recently who all seem to be wrestling with the same issue: wanting to update/refresh non-production databases from the latest corresponding prod version. Typically they have (fairly complex) scripts that at some point attempt to restore a dump into new da