-
Notifications
You must be signed in to change notification settings - Fork 67
ERROR: wrong constraint format for HASH partition #137
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
Comments
I'm sorry, but we need more details to be able to help you. You should have used our issue template. Which version of pg_pathman you're using? |
Feel free to add more information here, and I'll reopen this issue. |
Hi! I have just the same issue:
When I do
I did everything right in the same way on another (test) database with similar scheme and env, and it works there! I get this error in production only, although checks on partitions are identical. Here's my environment:
Thanks. |
Here's exactly what I did: SELECT create_hash_partitions('visitors', 'account_id', 100, FALSE);
\d+ visitors -- to make sure that there are 100 child partitions
SELECT partition_table_concurrently('visitors', 10000, 1.0);
ERROR: wrong constraint format for HASH partition visitors_0
HINT: pg_pathman will be disabled to allow you to resolve this issue |
I guess the issue is confirmed. |
@secoint, I couldn't reproduce your example. A heisenbug, perhaps? Could you try one more time, close session after ERROR message is raised, reconnect and perform a select from this table? |
@funbringer I've tried several times already, within different days. The problem is that I can reproduce the issue only in production, and I can't do it again and again on production db. UPDATE: the other table in the same database has been hash-partitioned successfully! So the problem seems to be not in the database/extension/env, but in table itself, right? The table is huge (86 GB). Any thoughts how to handle this? |
That's ok, we shouldn't mess with huge tables, what I meant is that you could do a few experiments with a new tiny table (~10 partitions, maybe a few rows) :)
That's a big question. Maybe there's something wrong with |
I think that simple reconnect could solve this problem. I'll investigate and post the results here. |
Thanks, @funbringer, I'll try to find a way to reproduce the issue consistently. I will also try to repeat the procedure and reset the session as you suggested, but I can do it during the low load period (saturday night, maybe). |
Hi @funbringer,
I tried to reconnect after receiving an error, but this didn't change anything. After reconnecting and trying to start |
Could you show the SELECT conbin FROM pg_constraint WHERE conname = 'NAME_OF_CONSTRAINT'; |
I can't unfortunaterly because this was production table and I rolled everything back ASAP. Still can't reproduce it on any other (test) table. P.S. May be I'll make another attempt in upcoming days and copy |
Hi @funbringer , Now I got the
|
Hi @secoint, @erhuabushuo I've pushed a fix to |
Wow, thanks! Looking forward to a new release with this fix! |
1.4.11 is now available. |
Problem description
Explain your problem here (it's always better to provide reproduction steps) ...
I created hash partition, when I migrate the data to partition table, I got:
ERROR: wrong constraint format for HASH partition
HINT: pg_pathman will be disabled to allow you to resolve this issue
Environment
The text was updated successfully, but these errors were encountered: