summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2020-07-21 11:40:47 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2020-07-21 11:40:47 -0400
commitae3d40b0cdc6bff33ad3caf5e8766b85ebe24168 (patch)
tree6ebb4642f27cda17340a06e587acc89c4a01ca36 /doc/src
parent39d6aec1927cc87942feb4b021360605f0a4ce8a (diff)
Avoid direct C access to possibly-null pg_subscription_rel.srsublsn.
This coding technique is unsafe, since we'd be accessing off the end of the tuple if the field is null. SIGSEGV is pretty improbable, but perhaps not impossible. Also, returning garbage for the LSN doesn't seem like a great idea, even if callers aren't looking at it today. Also update docs to point out explicitly that pg_subscription.subslotname and pg_subscription_rel.srsublsn can be null. Perhaps we should mark these two fields BKI_FORCE_NULL, so that they'd be correctly labeled in databases that are initdb'd in the future. But we can't force that for existing databases, and on balance it's not too clear that having a mix of different catalog contents in the field would be wise. Apply to v10 (where this code came in) through v12. Already fixed in v13 and HEAD. Discussion: https://postgr.es/m/732838.1595278439@sss.pgh.pa.us
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/catalogs.sgml9
1 files changed, 6 insertions, 3 deletions
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index 9f2273b5833..f314f93051d 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -6578,8 +6578,9 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</>:<replaceable>&lt;salt&gt;<
<entry><structfield>subslotname</structfield></entry>
<entry><type>name</type></entry>
<entry></entry>
- <entry>Name of the replication slot in the upstream database. Also used
- for local replication origin name.</entry>
+ <entry>Name of the replication slot in the upstream database (also used
+ for the local replication origin name);
+ null represents <literal>NONE</literal></entry>
</row>
<row>
@@ -6661,7 +6662,9 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</>:<replaceable>&lt;salt&gt;<
<entry><type>pg_lsn</type></entry>
<entry></entry>
<entry>
- End LSN for <literal>s</> and <literal>r</> states.
+ Remote LSN of the state change used for synchronization coordination
+ when in <literal>s</literal> or <literal>r</literal> states,
+ otherwise null
</entry>
</row>
</tbody>