Re: [HACKERS] [ADMIN] Replication slots and isolation levels

2015-11-03 Thread Vladimir Borodin
> 3 нояб. 2015 г., в 11:38, Andres Freund написал(а): > > On 2015-11-02 15:37:57 -0500, Robert Haas wrote: >> On Fri, Oct 30, 2015 at 9:49 AM, Vladimir Borodin wrote: >>> I’ve tried two ways - bare SELECT in autocommit mode and BEGIN; SELECT; >>> ROLLBACK. I first described the problem in threa

Re: [HACKERS] [ADMIN] Replication slots and isolation levels

2015-11-03 Thread Andres Freund
On 2015-11-02 15:37:57 -0500, Robert Haas wrote: > On Fri, Oct 30, 2015 at 9:49 AM, Vladimir Borodin wrote: > > I’ve tried two ways - bare SELECT in autocommit mode and BEGIN; SELECT; > > ROLLBACK. I first described the problem in thread on pgsql-admin@ [0], there > > is copy-paste from psql there

Re: [HACKERS] [ADMIN] Replication slots and isolation levels

2015-11-02 Thread Vladimir Borodin
> 2 нояб. 2015 г., в 23:37, Robert Haas написал(а): > > On Fri, Oct 30, 2015 at 9:49 AM, Vladimir Borodin wrote: >> I’ve tried two ways - bare SELECT in autocommit mode and BEGIN; SELECT; >> ROLLBACK. I first described the problem in thread on pgsql-admin@ [0], there >> is copy-paste from psql

Re: [HACKERS] [ADMIN] Replication slots and isolation levels

2015-11-02 Thread Robert Haas
On Fri, Oct 30, 2015 at 9:49 AM, Vladimir Borodin wrote: > I’ve tried two ways - bare SELECT in autocommit mode and BEGIN; SELECT; > ROLLBACK. I first described the problem in thread on pgsql-admin@ [0], there > is copy-paste from psql there, but during conversation initial description > was lost.

Re: [HACKERS] [ADMIN] Replication slots and isolation levels

2015-10-30 Thread Vladimir Borodin
> 30 окт. 2015 г., в 16:04, Robert Haas написал(а): > > On Fri, Oct 30, 2015 at 12:40 PM, Vladimir Borodin wrote: >> I still don’t fully understand why is it so (the problem occurs while >> running only one SELECT-statement in READ COMMITED so only one snapshot is >> taken), but if is expected

Re: [HACKERS] [ADMIN] Replication slots and isolation levels

2015-10-30 Thread Robert Haas
On Fri, Oct 30, 2015 at 12:40 PM, Vladimir Borodin wrote: > I still don’t fully understand why is it so (the problem occurs while > running only one SELECT-statement in READ COMMITED so only one snapshot is > taken), but if is expected behavior shouldn’t the documentation mention that > using READ

Re: [HACKERS] [ADMIN] Replication slots and isolation levels

2015-10-30 Thread Andres Freund
On 2015-10-30 13:42:19 +0100, Michael Paquier wrote: > On Fri, Oct 30, 2015 at 12:40 PM, Vladimir Borodin wrote: > > On Thu, Oct 29, 2015 at 3:29 PM, Oleksii Kliukin wrote: > >> Could it be a consequence of how REPEATABLE READ transactions handle > >> snapshots? With REPEATABLE READ the snapshot is

Re: [HACKERS] [ADMIN] Replication slots and isolation levels

2015-10-30 Thread Michael Paquier
On Fri, Oct 30, 2015 at 12:40 PM, Vladimir Borodin wrote: > On Thu, Oct 29, 2015 at 3:29 PM, Oleksii Kliukin wrote: >> Could it be a consequence of how REPEATABLE READ transactions handle >> snapshots? With REPEATABLE READ the snapshot is acquired only once at the >> beginning of a transaction; a R

Re: [HACKERS] [ADMIN] Replication slots and isolation levels

2015-10-30 Thread Vladimir Borodin
> 30 окт. 2015 г., в 14:30, Robert Haas написал(а): > > On Thu, Oct 29, 2015 at 3:29 PM, Oleksii Kliukin wrote: >> Could it be a consequence of how REPEATABLE READ transactions handle >> snapshots? With REPEATABLE READ the snapshot is acquired only once at the >> beginning of a transaction; a R

Re: [HACKERS] [ADMIN] Replication slots and isolation levels

2015-10-30 Thread Robert Haas
On Thu, Oct 29, 2015 at 3:29 PM, Oleksii Kliukin wrote: > Could it be a consequence of how REPEATABLE READ transactions handle > snapshots? With REPEATABLE READ the snapshot is acquired only once at the > beginning of a transaction; a READ COMMITTED transaction re-evaluates its > snapshot with eac

Re: [HACKERS] [ADMIN] Replication slots and isolation levels

2015-10-29 Thread Oleksii Kliukin
> On 29 Oct 2015, at 14:39, Vladimir Borodin wrote: > > f I understand right, with hot_standby_feedback = on standby tells the master > xmin of the earliest transaction on standby. And autovacuum worker on master > takes it into account when doing vacuum cleanup (because it can see it from >

Re: [HACKERS] [ADMIN] Replication slots and isolation levels

2015-10-29 Thread Vladimir Borodin
> 29 окт. 2015 г., в 15:29, Michael Paquier > написал(а): > > On Thu, Oct 29, 2015 at 12:35 PM, Vladimir Borodin wrote: >> 29 окт. 2015 г., в 14:03, Michael Paquier написал(а): >>> Standby will receive the record but not replay it until the >>> transaction doing REPEATABLE READ transactions tha

Re: [HACKERS] [ADMIN] Replication slots and isolation levels

2015-10-29 Thread Michael Paquier
On Thu, Oct 29, 2015 at 12:35 PM, Vladimir Borodin wrote: > 29 окт. 2015 г., в 14:03, Michael Paquier написал(а): >> Standby will receive the record but not replay it until the >> transaction doing REPEATABLE READ transactions that needs those rows >> commits on the standby. The WAL flush position

Re: [HACKERS] [ADMIN] Replication slots and isolation levels

2015-10-29 Thread Vladimir Borodin
> 29 окт. 2015 г., в 14:03, Michael Paquier > написал(а): > > On Thu, Oct 29, 2015 at 11:33 AM, Vladimir Borodin wrote: >> 29 окт. 2015 г., в 13:12, Michael Paquier написал(а): >>> In the case of repeatable read the standby will wait before applying >>> the VACUUM WAL record cleaning up a relat

Re: [HACKERS] [ADMIN] Replication slots and isolation levels

2015-10-29 Thread Michael Paquier
On Thu, Oct 29, 2015 at 11:33 AM, Vladimir Borodin wrote: > 29 окт. 2015 г., в 13:12, Michael Paquier написал(а): >> In the case of repeatable read the standby will wait before applying >> the VACUUM WAL record cleaning up a relation page. Hence you won't get >> conflicts in this case. > > Standby

Re: [HACKERS] [ADMIN] Replication slots and isolation levels

2015-10-29 Thread Vladimir Borodin
> 29 окт. 2015 г., в 13:12, Michael Paquier > написал(а): > > On Thu, Oct 29, 2015 at 9:42 AM, Vladimir Borodin wrote: >> I’m wondering why do I get conflicts with recovery on hot standby using >> replication slots and read commited isolation level? And if I start >> repeatable read transaction

Re: [HACKERS] [ADMIN] Replication slots and isolation levels

2015-10-29 Thread Michael Paquier
On Thu, Oct 29, 2015 at 9:42 AM, Vladimir Borodin wrote: > I’m wondering why do I get conflicts with recovery on hot standby using > replication slots and read commited isolation level? And if I start > repeatable read transaction I don’t get any errors. Below is some > diagnostics. In the case of

Re: [HACKERS] [ADMIN] Replication slots and isolation levels

2015-10-29 Thread Vladimir Borodin
> 27 окт. 2015 г., в 19:45, Vladimir Borodin написал(а): > > Hi all. > > I’m wondering why do I get conflicts with recovery on hot standby using > replication slots and read commited isolation level? And if I start > repeatable read transaction I don’t get any errors. Below is some diagnostic