Remove one last occurrence of "replication slave" in comments

Started by Daniel Gustafssonover 6 years ago5 messages
#1Daniel Gustafsson
daniel@yesql.se
1 attachment(s)

A Twitter thread today regarding the use of master/slave [1]https://twitter.com/Xof/status/1141040942645776384 made me curious
and so I had a look. It seems that commit a1ef920e27ba6ab3602aaf6d6751d8628
replaced most instances but missed at least one which is fixed in the attached.

cheers ./daniel

[1]: https://twitter.com/Xof/status/1141040942645776384

Attachments:

slave_comment.patchapplication/octet-stream; name=slave_comment.patch; x-unix-mode=0644Download
From 0066018f5180cc117915479aa0b691c077cb4eae Mon Sep 17 00:00:00 2001
From: Daniel Gustafsson <daniel@yesql.se>
Date: Wed, 19 Jun 2019 14:25:06 +0200
Subject: [PATCH] Replace an occurrence of slave with standby

Commit a1ef920e27ba6ab3602aaf6d6751d8628fac1af8 replaced the use of
slave with standby, but overlooked this comment.
---
 contrib/pg_stat_statements/pg_stat_statements.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/pg_stat_statements/pg_stat_statements.c b/contrib/pg_stat_statements/pg_stat_statements.c
index 26610b34b6..490ade9e5f 100644
--- a/contrib/pg_stat_statements/pg_stat_statements.c
+++ b/contrib/pg_stat_statements/pg_stat_statements.c
@@ -625,7 +625,7 @@ pgss_shmem_startup(void)
 
 	/*
 	 * Remove the persisted stats file so it's not included in
-	 * backups/replication slaves, etc.  A new file will be written on next
+	 * backups/replication standbys, etc.  A new file will be written on next
 	 * shutdown.
 	 *
 	 * Note: it's okay if the PGSS_TEXT_FILE is included in a basebackup,
-- 
2.14.1.145.gb3622a4ee

#2Magnus Hagander
magnus@hagander.net
In reply to: Daniel Gustafsson (#1)
Re: Remove one last occurrence of "replication slave" in comments

On Wed, Jun 19, 2019 at 2:35 PM Daniel Gustafsson <daniel@yesql.se> wrote:

A Twitter thread today regarding the use of master/slave [1] made me
curious
and so I had a look. It seems that commit
a1ef920e27ba6ab3602aaf6d6751d8628
replaced most instances but missed at least one which is fixed in the
attached.

Applied, thanks.

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/&gt;
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/&gt;

#3Noname
ilmari@ilmari.org
In reply to: Daniel Gustafsson (#1)
1 attachment(s)
Re: Remove one last occurrence of "replication slave" in comments

Daniel Gustafsson <daniel@yesql.se> writes:

A Twitter thread today regarding the use of master/slave [1] made me curious
and so I had a look. It seems that commit a1ef920e27ba6ab3602aaf6d6751d8628
replaced most instances but missed at least one which is fixed in the attached.

cheers ./daniel

There were some more master/slave references in the plpgsql foreign key
tests, which the attached chages to base/leaf instead.

I didn't touch the last mention of "slave", in the pltcl code, because
it's calling the Tcl_CreateSlave() API function.

- ilmari
--
"The surreality of the universe tends towards a maximum" -- Skud's Law
"Never formulate a law or axiom that you're not prepared to live with
the consequences of." -- Skud's Meta-Law

Attachments:

0001-Remove-master-slave-usage-from-plpgsql-tests.patchtext/x-diffDownload
From 4b9f6cd9e019e61118e38caad452caf2ec23af35 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <ilmari@ilmari.org>
Date: Wed, 19 Jun 2019 17:59:19 +0100
Subject: [PATCH] Remove master/slave usage from plpgsql tests

---
 src/pl/plpgsql/src/expected/plpgsql_trap.out | 24 ++++++++++----------
 src/pl/plpgsql/src/sql/plpgsql_trap.sql      | 12 +++++-----
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/pl/plpgsql/src/expected/plpgsql_trap.out b/src/pl/plpgsql/src/expected/plpgsql_trap.out
index 881603f5c4..bb8f065bc0 100644
--- a/src/pl/plpgsql/src/expected/plpgsql_trap.out
+++ b/src/pl/plpgsql/src/expected/plpgsql_trap.out
@@ -186,17 +186,17 @@ NOTICE:  should see this only if -100 fits in smallint
 --
 -- test foreign key error trapping
 --
-create temp table master(f1 int primary key);
-create temp table slave(f1 int references master deferrable);
-insert into master values(1);
-insert into slave values(1);
-insert into slave values(2);	-- fails
-ERROR:  insert or update on table "slave" violates foreign key constraint "slave_f1_fkey"
-DETAIL:  Key (f1)=(2) is not present in table "master".
+create temp table base(f1 int primary key);
+create temp table leaf(f1 int references base deferrable);
+insert into base values(1);
+insert into leaf values(1);
+insert into leaf values(2);	-- fails
+ERROR:  insert or update on table "leaf" violates foreign key constraint "leaf_f1_fkey"
+DETAIL:  Key (f1)=(2) is not present in table "base".
 create function trap_foreign_key(int) returns int as $$
 begin
 	begin	-- start a subtransaction
-		insert into slave values($1);
+		insert into leaf values($1);
 	exception
 		when foreign_key_violation then
 			raise notice 'caught foreign_key_violation';
@@ -238,8 +238,8 @@ begin;
 
   savepoint x;
     set constraints all immediate; -- fails
-ERROR:  insert or update on table "slave" violates foreign key constraint "slave_f1_fkey"
-DETAIL:  Key (f1)=(2) is not present in table "master".
+ERROR:  insert or update on table "leaf" violates foreign key constraint "leaf_f1_fkey"
+DETAIL:  Key (f1)=(2) is not present in table "base".
   rollback to x;
   select trap_foreign_key_2();  -- detects FK violation
 NOTICE:  caught foreign_key_violation
@@ -249,7 +249,7 @@ NOTICE:  caught foreign_key_violation
 (1 row)
 
 commit;				-- still fails
-ERROR:  insert or update on table "slave" violates foreign key constraint "slave_f1_fkey"
-DETAIL:  Key (f1)=(2) is not present in table "master".
+ERROR:  insert or update on table "leaf" violates foreign key constraint "leaf_f1_fkey"
+DETAIL:  Key (f1)=(2) is not present in table "base".
 drop function trap_foreign_key(int);
 drop function trap_foreign_key_2();
diff --git a/src/pl/plpgsql/src/sql/plpgsql_trap.sql b/src/pl/plpgsql/src/sql/plpgsql_trap.sql
index 7e75f46934..b658cb1888 100644
--- a/src/pl/plpgsql/src/sql/plpgsql_trap.sql
+++ b/src/pl/plpgsql/src/sql/plpgsql_trap.sql
@@ -127,18 +127,18 @@ select test_variable_storage();
 -- test foreign key error trapping
 --
 
-create temp table master(f1 int primary key);
+create temp table base(f1 int primary key);
 
-create temp table slave(f1 int references master deferrable);
+create temp table leaf(f1 int references base deferrable);
 
-insert into master values(1);
-insert into slave values(1);
-insert into slave values(2);	-- fails
+insert into base values(1);
+insert into leaf values(1);
+insert into leaf values(2);	-- fails
 
 create function trap_foreign_key(int) returns int as $$
 begin
 	begin	-- start a subtransaction
-		insert into slave values($1);
+		insert into leaf values($1);
 	exception
 		when foreign_key_violation then
 			raise notice 'caught foreign_key_violation';
-- 
2.20.1

#4Peter Eisentraut
peter.eisentraut@2ndquadrant.com
In reply to: Noname (#3)
Re: Remove one last occurrence of "replication slave" in comments

On 2019-06-19 19:04, Dagfinn Ilmari Mannsåker wrote:

There were some more master/slave references in the plpgsql foreign key
tests, which the attached chages to base/leaf instead.

base/leaf doesn't sound like a good pair. I committed it with root/leaf
instead.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#5Noname
ilmari@ilmari.org
In reply to: Peter Eisentraut (#4)
Re: Remove one last occurrence of "replication slave" in comments

Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:

On 2019-06-19 19:04, Dagfinn Ilmari Mannsåker wrote:

There were some more master/slave references in the plpgsql foreign key
tests, which the attached chages to base/leaf instead.

base/leaf doesn't sound like a good pair. I committed it with root/leaf
instead.

Thanks! You're right, that is a better name pair.

- ilmari
--
"A disappointingly low fraction of the human race is,
at any given time, on fire." - Stig Sandbeck Mathisen