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

Partition making problem #656

Closed
Mohammad-Safaie-1999 opened this issue Apr 21, 2024 · 3 comments
Closed

Partition making problem #656

Mohammad-Safaie-1999 opened this issue Apr 21, 2024 · 3 comments

Comments

@Mohammad-Safaie-1999
Copy link

Hi is there any thing else i have to do ??
if i want pg_partman continue making partitions i have to run run_maintenance manually . although i worked on bgw but still does not automatically make partitions . what should i do ??

CREATE SCHEMA partman ;
CREATE EXTENSION pg_partman SCHEMA partman ;

CREATE TABLE partman.users
(
user_id SERIAL ,
user_name VARCHAR (30) ,
user_reg_date TIMESTAMP ,
CONSTRAINT pk_id_reg PRIMARY KEY (user_id , user_reg_Date)
)
PARTITION BY RANGE (user_reg_date);

SELECT partman.create_parent
(
p_parent_table => 'partman.users',
p_control => 'user_reg_date',
p_type => 'native',
p_interval=> '2 minutes',
p_premake => 2
);

UPDATE partman.part_config
SET infinite_time_partitions = 'true' ;

ALTER SYSTEM
SET
shared_preload_libraries = 'pg_partman_bgw';

SET pg_partman_bgw.database = 'Optimization' ;
SET pg_partman_bgw.interval = 60 ;

@Mohammad-Safaie-1999
Copy link
Author

BTW i am using 4.4.0 version

@keithf4
Copy link
Collaborator

keithf4 commented Apr 22, 2024

Is there any data in the partition set? By default, pg_partman does not make new partitions if there is no new data

@keithf4 keithf4 self-assigned this Apr 22, 2024
@keithf4
Copy link
Collaborator

keithf4 commented Jun 10, 2024

Closing this issue for now. If you're still having this issue, please feel free to reopen

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

No branches or pull requests

2 participants