pg_logical_slot_get_changes needs clarification

From: finzelj(at)gmail(dot)com
To: pgsql-docs(at)postgresql(dot)org
Subject: pg_logical_slot_get_changes needs clarification
Date: 2016-12-05 18:14:30
Message-ID: 20161205181430.4377.21615@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.4/static/functions-admin.html
Description:

It is not obvious from reading the description for function
pg_logical_slot_get_changes that it is a "destructive" function, and this
bit me. I was not clearly aware that this function consumes the replication
stream such that it's no longer available if I use it to look at the logical
stream, i.e., I MUST use the peek function for that purpose.

This is more clear in the full examples of logical decoding. Also, it says
in the "peek" function that
the peek function does not consume changes like the get function - but that
should be stated clearly in the get function description.

The name of the function itself is part of the problem: "get" does not
normally indicate "destroy" as well....

Thanks!
BecauseThere should b

Browse pgsql-docs by date

  From Date Subject
Next Message 62mkv 2016-12-06 08:21:39 WANTED: more details on "pg_databases" and/or "deleting template1 database"
Previous Message Fujii Masao 2016-12-05 11:49:17 Re: simple wording fix