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

Page number can be greater than number of pages in table content view #67

Closed
vingiarrusso opened this Issue Sep 9, 2015 · 6 comments

Comments

Projects
None yet
2 participants
@vingiarrusso

vingiarrusso commented Sep 9, 2015

When using localhost connection host for postico, ssh'ing to a different db connection with the same tables but different content and refreshing postico can lead to this bug.

ie- DB 1 and 2 have same schema, but DB 2 doesn't have all the data DB 1 has. This is the case in the attached screenshot. Refreshing after connecting to DB 2 from DB 1 while on page 3 keeps me on page 3, though there are not enough rows for page 3 to be available otherwise.

screen shot 2015-09-09 at 2 48 20 pm

@jakob

This comment has been minimized.

Show comment
Hide comment
@jakob

jakob Sep 10, 2015

Owner

Do I understand this correctly?

  • you open an SSH tunnel to DB1
  • you connect to localhost which is forwarded to DB1
  • without disconnecting, you close the SSH tunnel
  • then you open an SSH tunnel to DB2
  • you click refresh in Postico

Is there a reason why you don't just use the built-in SSH tunnel support from Postico, and create two different favorites?

Owner

jakob commented Sep 10, 2015

Do I understand this correctly?

  • you open an SSH tunnel to DB1
  • you connect to localhost which is forwarded to DB1
  • without disconnecting, you close the SSH tunnel
  • then you open an SSH tunnel to DB2
  • you click refresh in Postico

Is there a reason why you don't just use the built-in SSH tunnel support from Postico, and create two different favorites?

@vingiarrusso

This comment has been minimized.

Show comment
Hide comment
@vingiarrusso

vingiarrusso Sep 10, 2015

Not sure I'm communicating this correctly or maybe I'm not using postico correctly (possibly both), but the key fact here is that I'm using local port forwarding in my terminal ssh command to postgres server. This is my usual terminal command..
ssh -i <key.pem> -L port:localhost:port user@ip

So far, I haven't been able to recreate this with postico, maybe you could shed some light on that? I've tried the SSH tunnel support, which works fine for just tunneling in to check stuff out, but doesn't allow me to develop locally in the same way as the above command.

Of course, this is irrelevant to the bug at hand (Page 3 of 1 shouldn't happen anyway), but if I'm missing something here I'd love your expertise!

vingiarrusso commented Sep 10, 2015

Not sure I'm communicating this correctly or maybe I'm not using postico correctly (possibly both), but the key fact here is that I'm using local port forwarding in my terminal ssh command to postgres server. This is my usual terminal command..
ssh -i <key.pem> -L port:localhost:port user@ip

So far, I haven't been able to recreate this with postico, maybe you could shed some light on that? I've tried the SSH tunnel support, which works fine for just tunneling in to check stuff out, but doesn't allow me to develop locally in the same way as the above command.

Of course, this is irrelevant to the bug at hand (Page 3 of 1 shouldn't happen anyway), but if I'm missing something here I'd love your expertise!

@jakob

This comment has been minimized.

Show comment
Hide comment
@jakob

jakob Sep 11, 2015

Owner

Okay, I understand now. You want to use the SSH tunnel for other applications besides Postico. In that case Postico wouldn't be very convenient, since it always chooses a random unused port for the local side of the SSH tunnel.

Yes, the problem with page 3 of 1 is unrelated; Postico should automatically jump to an earlier page when the number of rows in the table changes and the current page no longer exists.

Owner

jakob commented Sep 11, 2015

Okay, I understand now. You want to use the SSH tunnel for other applications besides Postico. In that case Postico wouldn't be very convenient, since it always chooses a random unused port for the local side of the SSH tunnel.

Yes, the problem with page 3 of 1 is unrelated; Postico should automatically jump to an earlier page when the number of rows in the table changes and the current page no longer exists.

@vingiarrusso

This comment has been minimized.

Show comment
Hide comment
@vingiarrusso

vingiarrusso Sep 11, 2015

Appreciate your insight. I'm a big fan of Postico, it's made my life a whole lot easier, thanks Jakob!

vingiarrusso commented Sep 11, 2015

Appreciate your insight. I'm a big fan of Postico, it's made my life a whole lot easier, thanks Jakob!

@jakob jakob added the bug label Sep 28, 2015

@jakob jakob added started done and removed started labels Feb 14, 2017

@jakob

This comment has been minimized.

Show comment
Hide comment
@jakob

jakob Feb 14, 2017

Owner

It's taken me a while since you reported this issue, but I've fixed it in a recent build. When there are no rows on a page, Postico now displays an error message (and jumps to the last page if appropriate)

You can try a prerelease build here:
https://eggerapps-downloads.s3-eu-west-1.amazonaws.com/postico-1593.zip

Owner

jakob commented Feb 14, 2017

It's taken me a while since you reported this issue, but I've fixed it in a recent build. When there are no rows on a page, Postico now displays an error message (and jumps to the last page if appropriate)

You can try a prerelease build here:
https://eggerapps-downloads.s3-eu-west-1.amazonaws.com/postico-1593.zip

@jakob

This comment has been minimized.

Show comment
Hide comment
@jakob

jakob Feb 15, 2017

Owner

There was an off-by-one error in build 1593. I fixed it in 1594:
https://eggerapps-downloads.s3-eu-west-1.amazonaws.com/postico-1594.zip

Owner

jakob commented Feb 15, 2017

There was an off-by-one error in build 1593. I fixed it in 1594:
https://eggerapps-downloads.s3-eu-west-1.amazonaws.com/postico-1594.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment