pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix document bug regarding read only transactions.
12+ messages / 3 participants
[nested] [flat]

* pgsql: Fix document bug regarding read only transactions.
@ 2017-06-15 01:10 Tatsuo Ishii <ishii@postgresql.org>
  2017-06-15 01:21 ` Re: pgsql: Fix document bug regarding read only transactions. Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 12+ messages in thread

From: Tatsuo Ishii @ 2017-06-15 01:10 UTC (permalink / raw)
  To: pgsql-committers

Fix document bug regarding read only transactions.

It was explained that read only transactions (not in standby) allow to
update sequences. This had been wrong since the commit:
05d8a561ff85db1545f5768fe8d8dc9d99ad2ef7

Discussion: https://www.postgresql.org/message-id/20170614.110826.425627939780392324.t-ishii%40sraoss.co.jp

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6108348c09df33773bed6e0ac762fe47bdcbb9e6

Modified Files
--------------
doc/src/sgml/high-availability.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


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


^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: pgsql: Fix document bug regarding read only transactions.
  2017-06-15 01:10 pgsql: Fix document bug regarding read only transactions. Tatsuo Ishii <ishii@postgresql.org>
@ 2017-06-15 01:21 ` Tom Lane <tgl@sss.pgh.pa.us>
  2017-06-15 01:41   ` Re: pgsql: Fix document bug regarding read only transactions. Tatsuo Ishii <ishii@sraoss.co.jp>
  0 siblings, 1 reply; 12+ messages in thread

From: Tom Lane @ 2017-06-15 01:21 UTC (permalink / raw)
  To: Tatsuo Ishii <ishii@postgresql.org>; +Cc: pgsql-committers

Tatsuo Ishii <ishii@postgresql.org> writes:
> Fix document bug regarding read only transactions.
> It was explained that read only transactions (not in standby) allow to
> update sequences. This had been wrong since the commit:
> 05d8a561ff85db1545f5768fe8d8dc9d99ad2ef7

This new text is not any more accurate than the old, it's just wrong
in the other direction.  The actual behavior is still what's stated
in the commit message for that commit: read-only transactions on the
master are allowed to do nextval() on temp sequences but not permanent
ones.

regression=# create temp sequence s1;
CREATE SEQUENCE
regression=# create sequence s2;
CREATE SEQUENCE
regression=# begin transaction read only;
BEGIN
regression=# select nextval('s1');
 nextval 
---------
       1
(1 row)

regression=# select nextval('s2');
ERROR:  cannot execute nextval() in a read-only transaction


I think the correct fix would have been to change "update sequences"
to "update temporary sequences", not to remove it.

			regards, tom lane


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



^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: pgsql: Fix document bug regarding read only transactions.
  2017-06-15 01:10 pgsql: Fix document bug regarding read only transactions. Tatsuo Ishii <ishii@postgresql.org>
  2017-06-15 01:21 ` Re: pgsql: Fix document bug regarding read only transactions. Tom Lane <tgl@sss.pgh.pa.us>
@ 2017-06-15 01:41   ` Tatsuo Ishii <ishii@sraoss.co.jp>
  2017-06-15 01:44     ` Re: pgsql: Fix document bug regarding read only transactions. Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 12+ messages in thread

From: Tatsuo Ishii @ 2017-06-15 01:41 UTC (permalink / raw)
  To: tgl@sss.pgh.pa.us; +Cc: ishii@postgresql.org; pgsql-committers

> I think the correct fix would have been to change "update sequences"
> to "update temporary sequences", not to remove it.

Not sure. The paragraph tries to explain the difference between read
only transactions and standby.

---------------------------------------------------------------
In normal operation, “read-only” transactions are allowed to update
sequences and to use LISTEN, UNLISTEN, and NOTIFY, so Hot Standby
sessions operate under slightly tighter restrictions than ordinary
read-only sessions. It is possible that some of these restrictions
might be loosened in a future release.
---------------------------------------------------------------

Regarding sequences, the paragraph supposes the use case on standby in
that a normal sequence was created on primary then it gets updated on
standby (that was used be possible). For temporary sequences, this
scenario is totally meaningless since temporary sequences are not
replicated, nor cannot be created on standby either. So I think
referring to temporary sequences here is pointless.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


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



^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: pgsql: Fix document bug regarding read only transactions.
  2017-06-15 01:10 pgsql: Fix document bug regarding read only transactions. Tatsuo Ishii <ishii@postgresql.org>
  2017-06-15 01:21 ` Re: pgsql: Fix document bug regarding read only transactions. Tom Lane <tgl@sss.pgh.pa.us>
  2017-06-15 01:41   ` Re: pgsql: Fix document bug regarding read only transactions. Tatsuo Ishii <ishii@sraoss.co.jp>
@ 2017-06-15 01:44     ` Tom Lane <tgl@sss.pgh.pa.us>
  2017-06-15 02:00       ` Re: pgsql: Fix document bug regarding read only transactions. Tatsuo Ishii <ishii@sraoss.co.jp>
  0 siblings, 1 reply; 12+ messages in thread

From: Tom Lane @ 2017-06-15 01:44 UTC (permalink / raw)
  To: Tatsuo Ishii <ishii@sraoss.co.jp>; +Cc: ishii@postgresql.org; pgsql-committers

Tatsuo Ishii <ishii@sraoss.co.jp> writes:
>> I think the correct fix would have been to change "update sequences"
>> to "update temporary sequences", not to remove it.

> Not sure. The paragraph tries to explain the difference between read
> only transactions and standby.

Right, but what I think it is comparing is a read-only transaction
on the master and a transaction on the standby.  The former can do
nextval() on temp sequences, the latter can't.

			regards, tom lane


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



^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: pgsql: Fix document bug regarding read only transactions.
  2017-06-15 01:10 pgsql: Fix document bug regarding read only transactions. Tatsuo Ishii <ishii@postgresql.org>
  2017-06-15 01:21 ` Re: pgsql: Fix document bug regarding read only transactions. Tom Lane <tgl@sss.pgh.pa.us>
  2017-06-15 01:41   ` Re: pgsql: Fix document bug regarding read only transactions. Tatsuo Ishii <ishii@sraoss.co.jp>
  2017-06-15 01:44     ` Re: pgsql: Fix document bug regarding read only transactions. Tom Lane <tgl@sss.pgh.pa.us>
@ 2017-06-15 02:00       ` Tatsuo Ishii <ishii@sraoss.co.jp>
  2017-06-15 14:13         ` Re: pgsql: Fix document bug regarding read only transactions. Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 12+ messages in thread

From: Tatsuo Ishii @ 2017-06-15 02:00 UTC (permalink / raw)
  To: tgl@sss.pgh.pa.us; +Cc: pgsql-committers

> Right, but what I think it is comparing is a read-only transaction
> on the master and a transaction on the standby.  The former can do
> nextval() on temp sequences, the latter can't.

But we cannot create temp sequences on stanbys in the first place.
Still do you think there's value to refer to nextval() on temp
sequences here?

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


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



^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: pgsql: Fix document bug regarding read only transactions.
  2017-06-15 01:10 pgsql: Fix document bug regarding read only transactions. Tatsuo Ishii <ishii@postgresql.org>
  2017-06-15 01:21 ` Re: pgsql: Fix document bug regarding read only transactions. Tom Lane <tgl@sss.pgh.pa.us>
  2017-06-15 01:41   ` Re: pgsql: Fix document bug regarding read only transactions. Tatsuo Ishii <ishii@sraoss.co.jp>
  2017-06-15 01:44     ` Re: pgsql: Fix document bug regarding read only transactions. Tom Lane <tgl@sss.pgh.pa.us>
  2017-06-15 02:00       ` Re: pgsql: Fix document bug regarding read only transactions. Tatsuo Ishii <ishii@sraoss.co.jp>
@ 2017-06-15 14:13         ` Tom Lane <tgl@sss.pgh.pa.us>
  2017-06-15 22:54           ` Re: pgsql: Fix document bug regarding read only transactions. Tatsuo Ishii <ishii@sraoss.co.jp>
  0 siblings, 1 reply; 12+ messages in thread

From: Tom Lane @ 2017-06-15 14:13 UTC (permalink / raw)
  To: Tatsuo Ishii <ishii@sraoss.co.jp>; +Cc: pgsql-committers

Tatsuo Ishii <ishii@sraoss.co.jp> writes:
>> Right, but what I think it is comparing is a read-only transaction
>> on the master and a transaction on the standby.  The former can do
>> nextval() on temp sequences, the latter can't.

> But we cannot create temp sequences on stanbys in the first place.
> Still do you think there's value to refer to nextval() on temp
> sequences here?

You're right that the statement is irrelevant in the context of what
a standby can or can't do, but what I'm worried about is that someone
will read it and believe that it represents the whole truth about
what read-only master transactions can do.  The previous wording was
also irrelevant to the context of a standby, and yet this whole thread
exists because somebody complained that it's an inaccurate description
of the restrictions on such a master transaction.  Well, it's still
inaccurate.

			regards, tom lane


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



^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: pgsql: Fix document bug regarding read only transactions.
  2017-06-15 01:10 pgsql: Fix document bug regarding read only transactions. Tatsuo Ishii <ishii@postgresql.org>
  2017-06-15 01:21 ` Re: pgsql: Fix document bug regarding read only transactions. Tom Lane <tgl@sss.pgh.pa.us>
  2017-06-15 01:41   ` Re: pgsql: Fix document bug regarding read only transactions. Tatsuo Ishii <ishii@sraoss.co.jp>
  2017-06-15 01:44     ` Re: pgsql: Fix document bug regarding read only transactions. Tom Lane <tgl@sss.pgh.pa.us>
  2017-06-15 02:00       ` Re: pgsql: Fix document bug regarding read only transactions. Tatsuo Ishii <ishii@sraoss.co.jp>
  2017-06-15 14:13         ` Re: pgsql: Fix document bug regarding read only transactions. Tom Lane <tgl@sss.pgh.pa.us>
@ 2017-06-15 22:54           ` Tatsuo Ishii <ishii@sraoss.co.jp>
  0 siblings, 0 replies; 12+ messages in thread

From: Tatsuo Ishii @ 2017-06-15 22:54 UTC (permalink / raw)
  To: tgl@sss.pgh.pa.us; +Cc: pgsql-committers

> You're right that the statement is irrelevant in the context of what
> a standby can or can't do, but what I'm worried about is that someone
> will read it and believe that it represents the whole truth about
> what read-only master transactions can do.  The previous wording was
> also irrelevant to the context of a standby, and yet this whole thread
> exists because somebody complained that it's an inaccurate description
> of the restrictions on such a master transaction.  Well, it's still
> inaccurate.

Then I think we should add more commands including ANALYZE, VACUUM and
strong LOCKS here. There's no specific reason to pick up only
nextval(), LISTEN and NOTIFY.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


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



^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* pgsql: Fix document bug regarding read only transactions.
@ 2017-06-15 01:10 Tatsuo Ishii <ishii@postgresql.org>
  0 siblings, 0 replies; 12+ messages in thread

From: Tatsuo Ishii @ 2017-06-15 01:10 UTC (permalink / raw)
  To: pgsql-committers

Fix document bug regarding read only transactions.

It was explained that read only transactions (not in standby) allow to
update sequences. This had been wrong since the commit:
05d8a561ff85db1545f5768fe8d8dc9d99ad2ef7

Discussion: https://www.postgresql.org/message-id/20170614.110826.425627939780392324.t-ishii%40sraoss.co.jp

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e3f87aae9316d42ece1912d1cae34ec0ba8142c8

Modified Files
--------------
doc/src/sgml/high-availability.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


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


^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* pgsql: Fix document bug regarding read only transactions.
@ 2017-06-15 01:10 Tatsuo Ishii <ishii@postgresql.org>
  0 siblings, 0 replies; 12+ messages in thread

From: Tatsuo Ishii @ 2017-06-15 01:10 UTC (permalink / raw)
  To: pgsql-committers

Fix document bug regarding read only transactions.

It was explained that read only transactions (not in standby) allow to
update sequences. This had been wrong since the commit:
05d8a561ff85db1545f5768fe8d8dc9d99ad2ef7

Discussion: https://www.postgresql.org/message-id/20170614.110826.425627939780392324.t-ishii%40sraoss.co.jp

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7efc08dec9c737e92388fe2665f2bc1d4e3c1970

Modified Files
--------------
doc/src/sgml/high-availability.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


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


^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* pgsql: Fix document bug regarding read only transactions.
@ 2017-06-15 01:10 Tatsuo Ishii <ishii@postgresql.org>
  0 siblings, 0 replies; 12+ messages in thread

From: Tatsuo Ishii @ 2017-06-15 01:10 UTC (permalink / raw)
  To: pgsql-committers

Fix document bug regarding read only transactions.

It was explained that read only transactions (not in standby) allow to
update sequences. This had been wrong since the commit:
05d8a561ff85db1545f5768fe8d8dc9d99ad2ef7

Discussion: https://www.postgresql.org/message-id/20170614.110826.425627939780392324.t-ishii%40sraoss.co.jp

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6d3a0fc33750b1eee0c63220075b058a8e0d675e

Modified Files
--------------
doc/src/sgml/high-availability.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


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


^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* pgsql: Fix document bug regarding read only transactions.
@ 2017-06-15 01:10 Tatsuo Ishii <ishii@postgresql.org>
  0 siblings, 0 replies; 12+ messages in thread

From: Tatsuo Ishii @ 2017-06-15 01:10 UTC (permalink / raw)
  To: pgsql-committers

Fix document bug regarding read only transactions.

It was explained that read only transactions (not in standby) allow to
update sequences. This had been wrong since the commit:
05d8a561ff85db1545f5768fe8d8dc9d99ad2ef7

Discussion: https://www.postgresql.org/message-id/20170614.110826.425627939780392324.t-ishii%40sraoss.co.jp

Branch
------
REL9_3_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5eaee9b4c4af3c3cc7f52f921e03512699dcd887

Modified Files
--------------
doc/src/sgml/high-availability.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


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


^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* pgsql: Fix document bug regarding read only transactions.
@ 2017-06-15 01:10 Tatsuo Ishii <ishii@postgresql.org>
  0 siblings, 0 replies; 12+ messages in thread

From: Tatsuo Ishii @ 2017-06-15 01:10 UTC (permalink / raw)
  To: pgsql-committers

Fix document bug regarding read only transactions.

It was explained that read only transactions (not in standby) allow to
update sequences. This had been wrong since the commit:
05d8a561ff85db1545f5768fe8d8dc9d99ad2ef7

Discussion: https://www.postgresql.org/message-id/20170614.110826.425627939780392324.t-ishii%40sraoss.co.jp

Branch
------
REL9_2_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1fe10463d9bd38d20b5c3c9356fc07ae9c3b6828

Modified Files
--------------
doc/src/sgml/high-availability.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


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


^ permalink  raw  reply  [nested|flat] 12+ messages in thread


end of thread, other threads:[~2017-06-15 22:54 UTC | newest]

Thread overview: 12+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-06-15 01:10 pgsql: Fix document bug regarding read only transactions. Tatsuo Ishii <ishii@postgresql.org>
2017-06-15 01:21 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-06-15 01:41   ` Tatsuo Ishii <ishii@sraoss.co.jp>
2017-06-15 01:44     ` Tom Lane <tgl@sss.pgh.pa.us>
2017-06-15 02:00       ` Tatsuo Ishii <ishii@sraoss.co.jp>
2017-06-15 14:13         ` Tom Lane <tgl@sss.pgh.pa.us>
2017-06-15 22:54           ` Tatsuo Ishii <ishii@sraoss.co.jp>
2017-06-15 01:10 pgsql: Fix document bug regarding read only transactions. Tatsuo Ishii <ishii@postgresql.org>
2017-06-15 01:10 pgsql: Fix document bug regarding read only transactions. Tatsuo Ishii <ishii@postgresql.org>
2017-06-15 01:10 pgsql: Fix document bug regarding read only transactions. Tatsuo Ishii <ishii@postgresql.org>
2017-06-15 01:10 pgsql: Fix document bug regarding read only transactions. Tatsuo Ishii <ishii@postgresql.org>
2017-06-15 01:10 pgsql: Fix document bug regarding read only transactions. Tatsuo Ishii <ishii@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox