Questions tagged [postgres-14]
8 questions
6
votes
2 answers
Postgres index not used when select includes timestamp::text conversion
I have the following table (in PostgreSQL 14.6):
create table waste_trajectory
(
id uuid default uuid_generate_v4() not null primary key,
observation_id uuid not null,
tank_id varchar(30),
stored_on …
6006604
- 173
- 7
2
votes
0 answers
AWS RDS PostgreSQL -
We have an AWS RDS PostgreSQL (v14.10) instance running on a db.t3.micro instance. Randomly throughout the day (some days more than others), our .NET Core application starts failing with the following exceptions:
An exception occurred while…
gwin003
- 121
- 2
0
votes
0 answers
Postgres DB size greater than sum of all tablespaces
According to SELECT pg_database_size('mydb') my database is about 15TBytes. According to SELECT spcname FROM pg_tablespace I have a total of 5 tablespaces (pg_global, pg_default and 3 others I created).
If I use SELECT pg_tablespace_size ('????') on…
ConanTheGerbil
- 1,303
- 5
- 31
- 50
0
votes
1 answer
Can network errors with client cause Postgres server to log long query
We have a query that intermittently runs very poorly for no apparent reason.
We have Postgres 14.13 configured with pg.log_min_duration_statement set to 30000.
We have a query that runs as part of our core hosting service that is basically
SELECT *…
ChrisJ
- 621
- 1
- 8
- 22
0
votes
0 answers
Would a VACUUM FULL save space before a SET TABLESPACE?
In a postgres database, a VACUUM FULL on a table will reclaim any free space by completely re-writing the table.
Also, moving a table from one tablespace to another (using ALTER TABLE... SET TABLESPACE) will re-write the table (assuming the other…
ConanTheGerbil
- 1,303
- 5
- 31
- 50
0
votes
1 answer
how to move a postgres tablespace on windows?
Now do I move a tablespace on a windows installation of postgres?
This thread shows how to do it on unix, not windows.
The tablespace was originally created with this command...
CREATE TABLESPACE tabspace2 OWNER theowner LOCATION…
ConanTheGerbil
- 1,303
- 5
- 31
- 50
0
votes
1 answer
Postgres logical replication and table rename
We have a table in main DB that is getting logically replicated to another DB called SOR. We need to rename this table, and add a bunch of tables to the publication on the main DB. I tried this procedure
disable the subscriber on SOR DB
rename the…
hxcb
- 3
- 2
0
votes
0 answers
How much space required to merge two tables?
I have some large sets of tables that I partition by date.
Every day I run a query similar to this to merge the two tables
WITH moved_rows AS
(
DELETE FROM tableA_20230531 RETURNING *
)
INSERT INTO tableA_202305
SELECT * FROM moved_rows
The table…
ConanTheGerbil
- 1,303
- 5
- 31
- 50