Skip to content

Error with transactional pgv_insert/pgv_remove #27

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

Closed
Fenoman opened this issue Aug 25, 2020 · 1 comment
Closed

Error with transactional pgv_insert/pgv_remove #27

Fenoman opened this issue Aug 25, 2020 · 1 comment
Assignees

Comments

@Fenoman
Copy link

Fenoman commented Aug 25, 2020

Here is a short example that shows the problem:

BEGIN TRANSACTION;

SELECT
    pgv_insert('test', 'x', ROW (1::int), TRUE);

--... do some actions ...

-- remove package (!!!)
SELECT
    pgv_remove('test');

--... do some other actions ...

-- Error: there is a record in the variable "x" with same key
-- But we deleted the package!!!
SELECT
    pgv_insert('test', 'x', ROW (1::int), TRUE);

COMMIT;
@ziva777 ziva777 self-assigned this Oct 9, 2020
ziva777 pushed a commit that referenced this issue Oct 14, 2020
ololobus pushed a commit that referenced this issue Oct 14, 2020
ziva777 pushed a commit that referenced this issue Oct 23, 2020
 Fix warning: leaked hash_seq_search scan for hash table.
ziva777 pushed a commit that referenced this issue Oct 23, 2020
ziva777 pushed a commit that referenced this issue Oct 28, 2020
ololobus added a commit that referenced this issue Oct 30, 2020
* Issue #27: Error with transactional pgv_insert/pgv_remove

* Issue #27: Error with transactional pgv_insert/pgv_remove - review

* Issue #27: Add fix and improve tests.

* Issue #27: Fix for backend termination on transaction commit.

* Issue #27: Add fix for leaked hash_seq_search.

 Fix warning: leaked hash_seq_search scan for hash table.

* Issue #27: Add tests and comment.

* Issue #27: Add fix for leaked hash_seq_search for pgv_stats.

* Issue #27: Add fix for VALGRING failed test.

* Issue #27: Add fix for Travis Ci failed tests.

* Issue #27: Fix tests for pgv_stats on 9.5

* Fix some comments

Co-authored-by: Maxim Orlov <[email protected]>
Co-authored-by: Alexey Kondratov <[email protected]>
ziva777 pushed a commit that referenced this issue Nov 3, 2020
ziva777 pushed a commit that referenced this issue Nov 3, 2020
ziva777 pushed a commit that referenced this issue Nov 5, 2020
+ use uniform algorithm for status lists
+ rename struct tagHtabToStat to tagVariableStatEntry
+ use context instead of bunch of args in list workaround routines
ziva777 pushed a commit that referenced this issue Nov 5, 2020
At the moment pg_variables can't handle cursors in a "proper" way.
It's possible to remove pg_variables while have active cursor open,
which seem to be erratic and couse sanitizer to be unpappy about it.
ziva777 pushed a commit that referenced this issue Nov 10, 2020
+ Compatibility check for Postgres Professional Enterprise.
+ Fix for cursors: switch off hash leak message.
+ Switch off cursor test, because cursors not supported completely.
ziva777 pushed a commit that referenced this issue Nov 11, 2020
Sanitizer did failed on query like "SELECT pgv_select(...) LIMIT 1"
ziva777 pushed a commit that referenced this issue Nov 12, 2020
Use pg_compatibility_check_no_error function to precheck compatibility in order to free memory.
ololobus added a commit that referenced this issue Nov 13, 2020
* Issue #27: Error with transactional pgv_insert/pgv_remove

* Issue #27: Error with transactional pgv_insert/pgv_remove - review

* Issue #27: Add fix and improve tests.

* Issue #27: Fix for backend termination on transaction commit.

* Issue #27: Add fix for leaked hash_seq_search.

 Fix warning: leaked hash_seq_search scan for hash table.

* Issue #27: Add tests and comment.

* Issue #27: Add fix for leaked hash_seq_search for pgv_stats.

* Issue #27: Add fix for VALGRING failed test.

* Issue #27: Add fix for Travis Ci failed tests.

* Issue #27: Fix tests for pgv_stats on 9.5

* Fix some comments

* Issue #27: Fix list remove generic algo.

* Issue #27: Fix savepoint in transaction issue.

* Issue #27: Fix savepoint in transaction issue, add sql.

* Issue #27: Fix savepoint in transaction issue, add expected result for 9 and 10.

* Issue #27: Fix savepoint in transaction issue, add expected result for 9.5.

* Issue #27: refactoring.

+ use uniform algorithm for status lists
+ rename struct tagHtabToStat to tagVariableStatEntry
+ use context instead of bunch of args in list workaround routines

* Issue #27: Make sanitizer happy.

At the moment pg_variables can't handle cursors in a "proper" way.
It's possible to remove pg_variables while have active cursor open,
which seem to be erratic and couse sanitizer to be unpappy about it.

* Issue #27: Improve compatibility check.

+ Compatibility check for Postgres Professional Enterprise.
+ Fix for cursors: switch off hash leak message.
+ Switch off cursor test, because cursors not supported completely.

* Issue #27: Make sanitizer happy.

Sanitizer did failed on query like "SELECT pgv_select(...) LIMIT 1"

* Issue #27: Fix fail under sanitizer with connoll.

* Issue #27: Improve compatibility check.

Use pg_compatibility_check_no_error function to precheck compatibility in order to free memory.

Co-authored-by: Maxim Orlov <[email protected]>
@Fenoman
Copy link
Author

Fenoman commented Dec 11, 2020

Спасибо огромное! Теперь все работает как надо.

@Fenoman Fenoman closed this as completed Dec 11, 2020
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