Re: [HACKERS] Slow temporary tables when using sync rep

2012-04-17 Thread Heikki Linnakangas
On 17.04.2012 02:54, Michael Nolan wrote: On Mon, Apr 16, 2012 at 6:27 PM, Thom Brownt...@linux.com wrote: Hi, I've noticed that when using synchronous replication (on 9.2devel at least), temporary tables become really slow: Since temporary tables are only present until the session ends

Re: [HACKERS] Slow temporary tables when using sync rep

2012-04-17 Thread Thom Brown
On 17 April 2012 11:30, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: What happens is that we write the commit record if the transaction accesses a temporary table, but we don't flush it. However, we still wait until it's replicated to the standby. The obvious fix is to not wait

Re: [HACKERS] Slow temporary tables when using sync rep

2012-04-17 Thread Heikki Linnakangas
On 17.04.2012 14:10, Thom Brown wrote: On 17 April 2012 11:30, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: What happens is that we write the commit record if the transaction accesses a temporary table, but we don't flush it. However, we still wait until it's replicated to the

Re: [HACKERS] Slow temporary tables when using sync rep

2012-04-17 Thread Thom Brown
On 17 April 2012 14:35, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 17.04.2012 14:10, Thom Brown wrote: On 17 April 2012 11:30, Heikki Linnakangas heikki.linnakan...@enterprisedb.com  wrote: What happens is that we write the commit record if the transaction accesses a

[HACKERS] Slow temporary tables when using sync rep

2012-04-16 Thread Thom Brown
Hi, I've noticed that when using synchronous replication (on 9.2devel at least), temporary tables become really slow: thom@test=# create temporary table temp_test (a text, b text); CREATE TABLE Time: 16.812 ms thom@test=# SET synchronous_commit = 'local'; SET Time: 2.739 ms thom@test=# insert

Re: [HACKERS] Slow temporary tables when using sync rep

2012-04-16 Thread Michael Nolan
On Mon, Apr 16, 2012 at 6:27 PM, Thom Brown t...@linux.com wrote: Hi, I've noticed that when using synchronous replication (on 9.2devel at least), temporary tables become really slow: Since temporary tables are only present until the session ends (or possibly only until a commit), why are