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

Can't "include unchanged toast" be used now? #132

Closed
hanpeng1234 opened this issue Oct 22, 2019 · 5 comments
Closed

Can't "include unchanged toast" be used now? #132

hanpeng1234 opened this issue Oct 22, 2019 · 5 comments

Comments

@hanpeng1234
Copy link

Can't "include unchanged toast" be used now? If I want to get all the data in the table (including long data), what should I do

@eulerto
Copy link
Owner

eulerto commented Oct 23, 2019

Issue #74 explains that it is not safe so that parameter was deprecated.

Even if you alter table replica identity full, the new row does not contain unchanged TOAST column. However, the old row contains all columns. If you want, you can add the value from old row to new row, if it is not available in new row (maybe I can add this option to wal2json, I'm not sure).

@hanpeng1234
Copy link
Author

ok thank you .I'm going to do that.

@dko-slapdash
Copy link

maybe I can add this option to wal2json, I'm not sure

@eulerto This IMHO makes sense to do (or make at least an option which does this). This would save some traffic from PG to the client since wal2json would do the merging, and we'd be able to not expose old row and not pass it over network.

@marko-asplund
Copy link

Does the current wal2json versions provide any alternatives for include-unchanged-toast?

... (maybe I can add this option to wal2json, I'm not sure).

Were any changes done related to this @eulerto ? 🤔

@marko-asplund
Copy link

Even if you alter table replica identity full, the new row does not contain unchanged TOAST column. However, the old row contains all columns. If you want, you can add the value from old row to new row, if it is not available in new row

So, with alter table replica identity full setting the before field will always include values for all (both TOAST and non-TOAST columns as they were in the row before the database commit?

If a column's new value is NULL and old is non NULL, how does one distinguish between the case when an UPDATE statement actually set a TOAST column value to NULL and the value just being omitted due to the column being a TOAST column? 🤔

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

4 participants