At Wed, 1 Aug 2018 02:47:32 +0900, Michael Paquier <mich...@paquier.xyz> wrote in <20180731174732.gd2...@paquier.xyz> > On Tue, Jul 31, 2018 at 10:59:14AM -0400, Alvaro Herrera wrote: > > How about pasting it like this? > > > > alvherre=# select * from pg_replication_slots \gx > > ─[ RECORD 1 ]───────┬──────────── > > slot_name │ node_a_slot > > plugin │ > > slot_type │ physical > > datoid │ > > database │ > > temporary │ f > > active │ f > > active_pid │ > > xmin │ > > catalog_xmin │ > > restart_lsn │ > > confirmed_flush_lsn │ > > Each time this catalog is changed, this would become incorrect. My > suggestion would be to change the query to that and call it a day: > SELECT slot_name, slot_type, active FROM pg_replication_slots;
Yeah, I'm also concerned about the unstability. I didn't came up with a list of columns that makes sense at that time but I rethought on that. > slot_name │ required > plugin │ <not requried for physical slots> > slot_type │ required > datoid │ <not requried> > database │ <not requried> > temporary │ <not requried> > active │ required? > active_pid │ <not requried> > xmin │ <not requried> > catalog_xmin │ <not requried> > restart_lsn │ better to be shown? > confirmed_flush_lsn │ <not requried for physical slots> The query and the result with four columns fit the current width. regards. -- Kyotaro Horiguchi NTT Open Source Software Center
>From 2b5788b3f1ecf4ebd31cf36eecdd4619cf3f394e Mon Sep 17 00:00:00 2001 From: Kyotaro Horiguchi <horiguchi.kyot...@lab.ntt.co.jp> Date: Wed, 1 Aug 2018 12:41:03 +0900 Subject: [PATCH] Documentation fix of "Log-Shipping Standy Servers" for PG95. The example output of pg_replication_slot is wrong. Correct and make the output stable by explicitly specifying a part of the all columns in pg_replication_slots. --- doc/src/sgml/high-availability.sgml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml index 35daf0103a..ae831192d0 100644 --- a/doc/src/sgml/high-availability.sgml +++ b/doc/src/sgml/high-availability.sgml @@ -931,10 +931,10 @@ postgres=# SELECT * FROM pg_create_physical_replication_slot('node_a_slot'); -------------+--------------- node_a_slot | -postgres=# SELECT * FROM pg_replication_slots; - slot_name | slot_type | datoid | database | active | xmin | restart_lsn --------------+-----------+--------+----------+--------+------+------------- - node_a_slot | physical | | | f | | +postgres=# SELECT slot_name, slot_type, active, restart_lsn FROM pg_replication_slots; + slot_name | slot_type | active | restart_lsn +-------------+-----------+--------+------------- + node_a_slot | physical | f | (1 row) </programlisting> To configure the standby to use this slot, <varname>primary_slot_name</> -- 2.16.3
>From 4367cdea3d6ac19ef9c6ec1545fbc2329dda47bb Mon Sep 17 00:00:00 2001 From: Kyotaro Horiguchi <horiguchi.kyot...@lab.ntt.co.jp> Date: Wed, 1 Aug 2018 11:50:03 +0900 Subject: [PATCH] Documentation fix of "Log-Shipping Standy Servers" for master. The example output of pg_replication_slot is wrong. Correct and make the output stable by explicitly specifying a part of the all columns in pg_replication_slots. --- doc/src/sgml/high-availability.sgml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml index 934eb9052d..39cada1278 100644 --- a/doc/src/sgml/high-availability.sgml +++ b/doc/src/sgml/high-availability.sgml @@ -966,10 +966,10 @@ postgres=# SELECT * FROM pg_create_physical_replication_slot('node_a_slot'); -------------+----- node_a_slot | -postgres=# SELECT * FROM pg_replication_slots; - slot_name | slot_type | datoid | database | active | xmin | restart_lsn | confirmed_flush_lsn --------------+-----------+--------+----------+--------+------+-------------+--------------------- - node_a_slot | physical | | | f | | | +postgres=# SELECT slot_name, slot_type, active, restart_lsn FROM pg_replication_slots; + slot_name | slot_type | active | restart_lsn +-------------+-----------+--------+------------- + node_a_slot | physical | f | (1 row) </programlisting> To configure the standby to use this slot, <varname>primary_slot_name</varname> -- 2.16.3