Re: [HACKERS] Hot standby, dropping a tablespace

2009-01-26 Thread Simon Riggs
On Sun, 2009-01-25 at 19:56 +0200, Heikki Linnakangas wrote: Simon Riggs wrote: 2. Kill all connections by given user. Hmm, not used for anything, actually. Should remove the roleId argument from GetConflictingVirtualXIDs. No, because we still need to add code to kill-connected-users

Re: [HACKERS] Hot standby, dropping a tablespace

2009-01-26 Thread Simon Riggs
On Sun, 2009-01-25 at 12:13 +, Grzegorz Jaskiewicz wrote: On 2009-01-25, at 09:04, Simon Riggs wrote: On Sat, 2009-01-24 at 21:58 +0200, Heikki Linnakangas wrote: When replaying a DROP TABLE SPACE, you first try to remove the directory, and if that fails, you assume that it's

Re: [HACKERS] Hot standby, dropping a tablespace

2009-01-26 Thread Andres Freund
Hi, Simon Riggs wrote: On Sun, 2009-01-25 at 19:56 +0200, Heikki Linnakangas wrote: Simon Riggs wrote: 2. Kill all connections by given user. Hmm, not used for anything, actually. Should remove the roleId argument from GetConflictingVirtualXIDs. No, because we still need to add code to

Re: [HACKERS] Hot standby, dropping a tablespace

2009-01-25 Thread Simon Riggs
On Sat, 2009-01-24 at 21:58 +0200, Heikki Linnakangas wrote: When replaying a DROP TABLE SPACE, you first try to remove the directory, and if that fails, you assume that it's because it's in use as a temp tablespace in a read-only transaction. That sounds like you think there another

Re: [HACKERS] Hot standby, dropping a tablespace

2009-01-25 Thread Heikki Linnakangas
Simon Riggs wrote: On Sat, 2009-01-24 at 21:58 +0200, Heikki Linnakangas wrote: When replaying a DROP TABLE SPACE, you first try to remove the directory, and if that fails, you assume that it's because it's in use as a temp tablespace in a read-only transaction. That sounds like you think

Re: [HACKERS] Hot standby, dropping a tablespace

2009-01-25 Thread Grzegorz Jaskiewicz
On 2009-01-25, at 09:04, Simon Riggs wrote: On Sat, 2009-01-24 at 21:58 +0200, Heikki Linnakangas wrote: When replaying a DROP TABLE SPACE, you first try to remove the directory, and if that fails, you assume that it's because it's in use as a temp tablespace in a read-only transaction.

Re: [HACKERS] Hot standby, dropping a tablespace

2009-01-25 Thread Simon Riggs
On Sun, 2009-01-25 at 11:28 +0200, Heikki Linnakangas wrote: You then call ResolveRecoveryConflictWithVirtualXIDs to kill such transactions, and try removing the directory again. But ResolveRecoveryConflictWithVirtualXIDs doesn't wait for the target transaction to die anymore (or

Re: [HACKERS] Hot standby, dropping a tablespace

2009-01-25 Thread Heikki Linnakangas
Simon Riggs wrote: 2. Kill all connections by given user. Hmm, not used for anything, actually. Should remove the roleId argument from GetConflictingVirtualXIDs. No, because we still need to add code to kill-connected-users if we drop role. Oh, I see, that's still a todo item. But we don't

[HACKERS] Hot standby, dropping a tablespace

2009-01-24 Thread Heikki Linnakangas
When replaying a DROP TABLE SPACE, you first try to remove the directory, and if that fails, you assume that it's because it's in use as a temp tablespace in a read-only transaction. You then call ResolveRecoveryConflictWithVirtualXIDs to kill such transactions, and try removing the directory