Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log: "Error collecting replication statistics" #34

Closed
joekohlsdorf opened this issue Jul 15, 2019 · 3 comments
Closed

Log: "Error collecting replication statistics" #34

joekohlsdorf opened this issue Jul 15, 2019 · 3 comments

Comments

@joekohlsdorf
Copy link

Server version: 11.4 on RDS
Collector version: v0.21.0

The collector logs the following message:

Error collecting replication statistics: sql: Scan error on column index 11, name "write_lsn": unsupported Scan, storing driver.Value type <nil> into type *string

The only thing which might be a bit extraordinary might be that this server has active logical replication slots.
I'm happy to provide more information if necessary.

@lfittl
Copy link
Member

lfittl commented Jul 24, 2019

Hi @joekohlsdorf - thanks for your patience on this!

This is likely a permission issue, but we should probably still ignore that error. Could you try if adding the following as an rds_superuser resolves it:

CREATE OR REPLACE FUNCTION pganalyze.get_stat_replication() RETURNS SETOF pg_stat_replication AS
$$
  /* pganalyze-collector */ SELECT * FROM pg_catalog.pg_stat_replication;
$$ LANGUAGE sql VOLATILE SECURITY DEFINER;

If it does not, could you send a sample of the output of SELECT * FROM pg_stat_replication? If you don't want to share it here feel free to open a support request instead via support@pganalyze.com

Thanks!

@joekohlsdorf
Copy link
Author

I have verified that I already have this function defined and I can query it manually.

The output from SELECT pganalyze.get_stat_replication(); is:

(13311,16388,rdsrepladmin,walreceiver,10.1.1.178,,47446,"2019-07-23 00:51:21.073245-04",,streaming,19F8/AC467C00,19F8/AC467C00,19F8/AC467C00,19F8/AC467C00,00:00:00.002261,00:00:00.003447,00:00:00.00345,0,async)
(3561,16386,admin,"",172.30.50.249,,38515,"2019-07-23 21:18:25.434786-04",,streaming,19F8/AC467C00,,19F8/AC43CDB8,,,,,0,async)

This seems to be a similar case as #21
Only that in my case this is a logical replication slot so a lot more values are NULL.

@lfittl lfittl closed this as completed in 5640e88 Jul 26, 2019
@lfittl
Copy link
Member

lfittl commented Jul 26, 2019

@joekohlsdorf Thanks, thats very helpful!

Fixed now in master, and will be in the next release (likely coming out next week).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants