Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Splitting a database table into multiple segments for performance or manageability.
1
vote
Postgres Partitioning: Edge case issue on date column partitioning
The check constraints of your partitions are strange. They don't exclude the possibility of an order from DEC2015 being inserted into the JAN2016 table. This might not be an issue about inserting, b …
5
votes
Accepted
Dealing with partitioned tables in Postgresql
Let's quickly check the COPY documentation:
COPY { table_name [ ( column_name [, ...] ) ] | ( query ) }
TO { 'filename' ...}
...
Your friend will be the query part. It means that you can …
2
votes
Partitioning not working need primary key?
Or, more simply (if you want a day-by-day partitioning), I'd write just
RANGE COLUMNS (receiptDate)
...
LESS THAN ('2012-10-20')
See a very simple working example at SQLFiddle. …
2
votes
postgres fetch record from partitions without the check constraints
The usual way of partitioning is that the parent is empty, and every row is redirected to one of the children. …
53
votes
Accepted
Get all partition names for a table
Use the first query from the answer you linked and add a simple WHERE clause to get the partitions of a single table:
SELECT
nmsp_parent.nspname AS parent_schema,
parent.relname AS paren …
1
vote
insert is not working as expected while doing partitioning
Well, with the checks you use for your child tables, it is obvious why such an UPDATE runs into problems. Adding one to id_ changes it from even to odd or back - the new row does not match the check …
1
vote
Partitioning table with billion row
Unfortunately, you can't define a foreign key against a partitioned table, only the partitions themselves - but, of course, the referencing table can have only on FK on the column in question...
So y …
7
votes
(How) does table inheritance interfere with locking in postgres?
Apparently, you want to see constraint exclusion at doing its work. As in similar setups the parent table has no constraint (and, just to mention it, usually no rows), it will be always visited by qu …
1
vote
Accepted
What is the purpose of table partitioning
If they still appear, there are other means than partitioning that one should try first (meaning different indexing strategies, usually). … A meaningful partitioning scheme for such data is very hard to come up with: 350+ partitions are just that much a pain in the ass as 350+ schemas. …
1
vote
Postgresql INSERT triggers "0 row affected" workaround
You can try to catch the number of inserted rows using GET DIAGNOSTICS and then raise a notice/warning/whatever you prefer. Here is a small illustration:
DO $$
DECLARE cnt integer;
BEGIN
…