Need to backpatch 2985e16 to 9.3 and further (HS regression test out)

Started by Amit Langoteover 11 years ago7 messages
#1Amit Langote
amitlangote09@gmail.com
1 attachment(s)

Hi,

Following (commit 2985e16) has not been backpatched, I guess.

 ANALYZE hs1;
-ERROR:  cannot execute VACUUM during recovery
+ERROR:  cannot execute ANALYZE during recovery

Attached is a patch for this.

--
Amit

Attachments:

hs-regress-expected-out-typo-fix-backpatch.patchapplication/octet-stream; name=hs-regress-expected-out-typo-fix-backpatch.patchDownload
diff --git a/src/test/regress/expected/hs_standby_disallowed.out b/src/test/regress/expected/hs_standby_disallowed.out
index e7f4835..bc11741 100644
--- a/src/test/regress/expected/hs_standby_disallowed.out
+++ b/src/test/regress/expected/hs_standby_disallowed.out
@@ -124,7 +124,7 @@ unlisten *;
 ERROR:  cannot execute UNLISTEN during recovery
 -- disallowed commands
 ANALYZE hs1;
-ERROR:  cannot execute VACUUM during recovery
+ERROR:  cannot execute ANALYZE during recovery
 VACUUM hs2;
 ERROR:  cannot execute VACUUM during recovery
 CLUSTER hs2 using hs1_pkey;
#2Fujii Masao
masao.fujii@gmail.com
In reply to: Amit Langote (#1)
Re: Need to backpatch 2985e16 to 9.3 and further (HS regression test out)

On Wed, Jun 4, 2014 at 3:26 PM, Amit Langote <amitlangote09@gmail.com> wrote:

Hi,

Following (commit 2985e16) has not been backpatched, I guess.

ANALYZE hs1;
-ERROR:  cannot execute VACUUM during recovery
+ERROR:  cannot execute ANALYZE during recovery

Attached is a patch for this.

Why did you cut off the following part? ISTM that also needs to be back-patched.
So we should just do "git cherry-pick 2985e16" on 9.3.

-begin transaction isolation level serializable;
+begin transaction isolation level repeatable read;

Regards,

--
Fujii Masao

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Amit Langote
amitlangote09@gmail.com
In reply to: Fujii Masao (#2)
1 attachment(s)
Re: Need to backpatch 2985e16 to 9.3 and further (HS regression test out)

On Wed, Jun 4, 2014 at 11:10 PM, Fujii Masao <masao.fujii@gmail.com> wrote:

On Wed, Jun 4, 2014 at 3:26 PM, Amit Langote <amitlangote09@gmail.com> wrote:

Hi,

Following (commit 2985e16) has not been backpatched, I guess.

ANALYZE hs1;
-ERROR:  cannot execute VACUUM during recovery
+ERROR:  cannot execute ANALYZE during recovery

Attached is a patch for this.

Why did you cut off the following part? ISTM that also needs to be back-patched.
So we should just do "git cherry-pick 2985e16" on 9.3.

-begin transaction isolation level serializable;
+begin transaction isolation level repeatable read;

You are right, I did not pay attention to that at all.
Please find attached = 2985e16 ;-)

--
Amit

Attachments:

hs-regression-test-backpatch-fix.patchapplication/octet-stream; name=hs-regression-test-backpatch-fix.patchDownload
diff --git a/src/test/regress/expected/hs_standby_allowed.out b/src/test/regress/expected/hs_standby_allowed.out
index 1abe5f6..c26c982 100644
--- a/src/test/regress/expected/hs_standby_allowed.out
+++ b/src/test/regress/expected/hs_standby_allowed.out
@@ -49,7 +49,7 @@ select count(*)  as should_be_1 from hs1;
 (1 row)
 
 end;
-begin transaction isolation level serializable;
+begin transaction isolation level repeatable read;
 select count(*) as should_be_1 from hs1;
  should_be_1 
 -------------
diff --git a/src/test/regress/expected/hs_standby_disallowed.out b/src/test/regress/expected/hs_standby_disallowed.out
index e7f4835..bc11741 100644
--- a/src/test/regress/expected/hs_standby_disallowed.out
+++ b/src/test/regress/expected/hs_standby_disallowed.out
@@ -124,7 +124,7 @@ unlisten *;
 ERROR:  cannot execute UNLISTEN during recovery
 -- disallowed commands
 ANALYZE hs1;
-ERROR:  cannot execute VACUUM during recovery
+ERROR:  cannot execute ANALYZE during recovery
 VACUUM hs2;
 ERROR:  cannot execute VACUUM during recovery
 CLUSTER hs2 using hs1_pkey;
diff --git a/src/test/regress/sql/hs_standby_allowed.sql b/src/test/regress/sql/hs_standby_allowed.sql
index 58e2c01..7fc2214 100644
--- a/src/test/regress/sql/hs_standby_allowed.sql
+++ b/src/test/regress/sql/hs_standby_allowed.sql
@@ -28,7 +28,7 @@ begin transaction read only;
 select count(*)  as should_be_1 from hs1;
 end;
 
-begin transaction isolation level serializable;
+begin transaction isolation level repeatable read;
 select count(*) as should_be_1 from hs1;
 select count(*) as should_be_1 from hs1;
 select count(*) as should_be_1 from hs1;
#4Fujii Masao
masao.fujii@gmail.com
In reply to: Amit Langote (#3)
Re: Need to backpatch 2985e16 to 9.3 and further (HS regression test out)

On Thu, Jun 5, 2014 at 3:11 PM, Amit Langote <amitlangote09@gmail.com> wrote:

On Wed, Jun 4, 2014 at 11:10 PM, Fujii Masao <masao.fujii@gmail.com> wrote:

On Wed, Jun 4, 2014 at 3:26 PM, Amit Langote <amitlangote09@gmail.com> wrote:

Hi,

Following (commit 2985e16) has not been backpatched, I guess.

ANALYZE hs1;
-ERROR:  cannot execute VACUUM during recovery
+ERROR:  cannot execute ANALYZE during recovery

Attached is a patch for this.

Why did you cut off the following part? ISTM that also needs to be back-patched.
So we should just do "git cherry-pick 2985e16" on 9.3.

-begin transaction isolation level serializable;
+begin transaction isolation level repeatable read;

You are right, I did not pay attention to that at all.
Please find attached = 2985e16 ;-)

Do we need to back-patch this to older versions (i,e. 9.2, 9.1, ..)?

Regards,

--
Fujii Masao

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#5Amit Langote
amitlangote09@gmail.com
In reply to: Fujii Masao (#4)
Re: Need to backpatch 2985e16 to 9.3 and further (HS regression test out)

On Thu, Jun 5, 2014 at 4:09 PM, Fujii Masao <masao.fujii@gmail.com> wrote:

On Thu, Jun 5, 2014 at 3:11 PM, Amit Langote <amitlangote09@gmail.com> wrote:

On Wed, Jun 4, 2014 at 11:10 PM, Fujii Masao <masao.fujii@gmail.com> wrote:

On Wed, Jun 4, 2014 at 3:26 PM, Amit Langote <amitlangote09@gmail.com> wrote:

Hi,

Following (commit 2985e16) has not been backpatched, I guess.

ANALYZE hs1;
-ERROR:  cannot execute VACUUM during recovery
+ERROR:  cannot execute ANALYZE during recovery

Attached is a patch for this.

Why did you cut off the following part? ISTM that also needs to be back-patched.
So we should just do "git cherry-pick 2985e16" on 9.3.

-begin transaction isolation level serializable;
+begin transaction isolation level repeatable read;

You are right, I did not pay attention to that at all.
Please find attached = 2985e16 ;-)

Do we need to back-patch this to older versions (i,e. 9.2, 9.1, ..)?

Yes, this should be backpatched to 9.2, 9.1, 9.0, too.

Perhaps, 9.1 needs another fix here. Does the following look suspicious?

*** expected/hs_standby_functions.out 2014-06-05 06:26:30.000000000 +0900
---  results/hs_standby_functions.out  2014-06-05 16:49:02.200931657 +0900
***************
*** 32,38 ****
  from pg_locks where virtualxid = '1/1';
    locktype  | virtualxid | virtualtransaction |     mode      | granted
  ------------+------------+--------------------+---------------+---------
!  virtualxid | 1/1        | 1/0                | ExclusiveLock | t
  (1 row)
  -- suicide is painless
--- 32,38 ----
  from pg_locks where virtualxid = '1/1';
    locktype  | virtualxid | virtualtransaction |     mode      | granted
  ------------+------------+--------------------+---------------+---------
!  virtualxid | 1/1        | 1/1                | ExclusiveLock | t
  (1 row)

-- suicide is painless

--
Amit

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#6Andres Freund
andres@2ndquadrant.com
In reply to: Amit Langote (#5)
Re: Need to backpatch 2985e16 to 9.3 and further (HS regression test out)

On 2014-06-05 16:56:08 +0900, Amit Langote wrote:

On Thu, Jun 5, 2014 at 4:09 PM, Fujii Masao <masao.fujii@gmail.com> wrote:

Do we need to back-patch this to older versions (i,e. 9.2, 9.1, ..)?

Yes, this should be backpatched to 9.2, 9.1, 9.0, too.

I don't think it really needs to go to 9.0 - that didn't have
serializable. And before that it was fine to use serializable on a HS
standby.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#7Amit Langote
amitlangote09@gmail.com
In reply to: Andres Freund (#6)
Re: Need to backpatch 2985e16 to 9.3 and further (HS regression test out)

On Thu, Jun 5, 2014 at 5:37 PM, Andres Freund <andres@2ndquadrant.com> wrote:

On 2014-06-05 16:56:08 +0900, Amit Langote wrote:

On Thu, Jun 5, 2014 at 4:09 PM, Fujii Masao <masao.fujii@gmail.com> wrote:

Do we need to back-patch this to older versions (i,e. 9.2, 9.1, ..)?

Yes, this should be backpatched to 9.2, 9.1, 9.0, too.

I don't think it really needs to go to 9.0 - that didn't have
serializable. And before that it was fine to use serializable on a HS
standby.

Yeah, you are right, s 9.0 hot standby server does allow to -

[amit@localhost git]$ psql postgres -p 15432
Timing is on.
psql (9.0.17)
postgres=# begin transaction isolation level serializable;
BEGIN

whereas -

[amit@localhost git]$ psql postgres -p 15432
Timing is on.
psql (9.1.13)
Type "help" for help.

postgres=# begin transaction isolation level serializable;
ERROR: cannot use serializable mode in a hot standby
HINT: You can use REPEATABLE READ instead.

Perhaps just the s/VACUUM/ANALYZE part for 9.0 then

--
Amit

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers