Questions tagged [postgresql-9.3]

PostgreSQL version 9.3

Filter by
Sorted by
Tagged with
0
votes
1answer
28 views

Unable to create view with temp table

Hi I am working on one project and want to create a view. I am using temp table in my query. can any one let me know how we can create such view ? Following is my query, I tried using WITH..AS , but ...
2
votes
1answer
21 views

Postgres table size is not growing after adding row

I couldn't see any growth in table size when I added a row in the relevant table. I see the same memory space even after adding 5 rows. Could anyone please help me and explain what I'm doing wrong?
0
votes
1answer
21 views

Query fails sometimes on casting error

I have a query that can run on the same data set, and sometimes it fails and sometimes it succeeds The query is generated by hive metadata service, and I can't modify it. This is a simplified version ...
1
vote
1answer
176 views

Could not fork new process for connection: Could not allocate memory

I need help to understand the cause of this error and how to fix it. I have a server running PostgreSQL 9.3. The cluster has around 1.000 databases. I use pgBouncer for pooling connections, and I set ...
0
votes
0answers
19 views

Multidimensional histogram analysis for similarity

Okay, I have a weird case. I need to compare rows of a database for "similarity". By, this I don't mean text based. I mean I need to partition statistics into buckets (each bucket group is a different ...
0
votes
0answers
152 views

Unable to connect postgresql server from pgAdmin4, showing error - 'ServerManager' object has no attribute 'user_info'

I am trying to connect a remote postgresql database server(RHEL7.5) through pgAdmin4 from my windows10 pc, but it is showing an error 'ServerManager' object has no attribute 'user_info'. I have ...
1
vote
1answer
38 views

How to estimate the size of a PostgreSQL DB to be dumped through pg_dump

Similar to this question about MySQL -- I need to find out the size of a dump file prior dumping but for a PostgreSQL Database. I could not find any reference to this in the documentation
0
votes
1answer
27 views

Extract week number from character varying column where dates are in float values as well as in datetimestamp as well

I have a table in which the closure_date which is represented as a character varying column. Some of the dates are saved as "43684.5708564815" and also as "2019-05-24 18:51:17". Now I need to extract ...
0
votes
2answers
167 views

How to do a restore of a large postgresql database?

I'm working on restoring a backup from on-premise postgresql to another postgresql database hosted in AWS (rds-aurora postgresql, serverless). The data size is 170gb of compressed data. I earlier ...
0
votes
0answers
37 views

Single-tenant to multi-tenant: restore old database to schema in new database

I have a Django app which uses Postgres as a database w/ the django-tenants package providing multitenant functionality. This is a migration from what was originally a single tenant database with just ...
-1
votes
1answer
28 views

PostgreSQL Password Authentication Error…but cannot find account

I'm getting the following error within the PostgreSQL log file. When an external service is calling the DB for map routing, the following error appears. However, within “Login/Group Roles”,...
1
vote
2answers
36 views

How can I have an aggregate function in the WHERE clause?

Using PostgreSQL 9.3.24 Issue Just simple operation, but I don't know how to do that best simplest way. How can I display results only when sum of available_counts for same product_id is 0 and ...
0
votes
3answers
80 views

Query takes too much time to execute

I add the Query Plan of my query. And this takes too much time to execute and give data. https://explain.depesz.com/s/4JtZ I want to reduce the execution time of this query. So require to optimize ...
2
votes
1answer
225 views

What to use instead of WITH ORDINALITY in PostgreSQL 9.3

Issue I have a query. Working with Postgres 11.5. copy ( select "HOBIS", "NAME", "URL", "IMG URL", "PRICE ORIGINAL" from ( select distinct on ("HOBIS") ...
0
votes
2answers
61 views

Populate columns of table with other table that doesn't have relationship

Hello I have 2 tables in PostgreSQL: the 1st one "Products" id price factor1 factor2 the columns factor1 and factor2 they both are empty and I want to populate them with the data of another table ...
-2
votes
3answers
31 views

Finding ids where all the IDs are smaller than some date

Considering a simple table with id-datetime field. I want to remove all records, where datetime is smaller than some constant, but keep ids which have at least one record with bigger date. My first ...
1
vote
2answers
1k views

Pgbouncer getting auth failing when trying to connect using psql

I'm trying to configure the latest pgbouncer to work with postgres 9. I can connect to my db using psql with the right password but when I use psql -p 6432 I can't connect with the error message of ...
0
votes
0answers
1k views

Unit postgresql.service failed to load: No such file or directory

When i try to connect to my postgres database, i get the error below: could not connect to server: Connection timed out (0x0000274C/10060) Is the server running on host "10.2.1.96" and accepting ...
-1
votes
1answer
2k views

pg_restore error while initializing. (Closed)

I am getting the error of: pg_restore: [archiver (db)] Error while INITIALIZING: pg_restore: [archiver (db)] could not execute query: ERROR: unrecognized configuration parameter "...
0
votes
1answer
98 views

PostgreSQL: relation would be inherited from more than once

Assume I have a schema which initially have several yearly sliced data like: schema: land_price - land_price_1990 - land_price_1991 ... - land_price_2010 Now I would like to create a parent ...
0
votes
1answer
59 views

How is a table locked regarding UPDATE-SELECT queries in PostgreSQL?

Is it possible to combine these UPDATE queries? UPDATE myTable1 SET fld1 = myTable2.value FROM myTable2 WHERE myTable1.id = myTable2.id AND myTable2.style = 45; UPDATE myTable1 SET fld2 = myTable2....
0
votes
1answer
16 views

Postgres record locking issue - could asynchronous UPDATES be a solution?

Is it possible (and sensible) to issue asynchronous UPDATEs to a postgres table? Here’s the issue. I have two process, both of which access the same table. Process “A” loads vast quantities of ...
0
votes
2answers
36 views

Speeding up Postgresql manual index reset?

I'm merging databases with each other. One problem I have is that both of the database tables have the same primary keys (starting from 1, but otherwise they are different records). To solve this, I ...
0
votes
1answer
523 views

found xmin X from before relfrozenxid Y during vacuum

The vacuum of two pg_catalog tables runs into the following error and stops there. found xmin X from before relfrozenxid Y during vacuum I could find a lot of discussions about this problem but ...
2
votes
1answer
208 views

pg_commit_ts growing in postgres instance

I have a customer who is trying to set up bidirectional replication with logical replication publication/subcription model across two instances with the help of last_update_wins and reported that with ...
1
vote
1answer
1k views

Dynamic pivoting in PostgreSQL

I have a scenario where I have to pivot a list of rows to columns dynamically .For a particular order_number there might be several products. I want all those products to be in a separate column, ...
1
vote
1answer
187 views

Can I do vacuumlo,vacuumdb and reindex in live production system without any downtime in postgres database

We are using a Postgres database (9.3) as our production database. It is generating huge lo objects. Due to this, the size is growing very fast. So we need to do database cleaning frequently. To ...
2
votes
0answers
44 views

the cost decreased but the time was practically the same, why?

Table definition: CREATE TABLE schema.mylogoperation ( id_mylogoperation serial, data DATE, myschema VARCHAR(255), column_var_2 VARCHAR(255), user VARCHAR(255), action TEXT, ...
0
votes
0answers
215 views

Quering Postgresql digest function inside procedure works on pgadmin but not works by calling via Laravel

recently I have created stored procedure in Postgres Sql which deals about with hashing passwords. When used via PgAdmin tool it works like a charm as stated below. I have also installed extension ...
0
votes
1answer
83 views

Huge DB (> 600M records/table) times out on query or hits memory limits?

Dearest DBA friends of Stackexchange, I am trying to write data from multiple sourcetables into a new table containing compound information that i wish to use as source for a later project. The ...
0
votes
0answers
2k views

How to run multiple sql statements in Postgres using the tool PGADMIN?

I have 170 Alter Drop Constraint statement, 120 Truncate table, 120 Insert table and 170 Alter Add Constraint. All of these should be run in one in one script as batch script and I'm using PGADMIN IV ...
1
vote
1answer
912 views

install postgresql in unattended error

I try to install PostgreSQL within myapp.exe (which used advanced installer to build) in unattended mode, I set parameters as below: --mode unattended --superpassword xxxxxxx --prefix c:\programs ...
3
votes
2answers
557 views

Performance of large transactions and concurrency?

If I have a multi-million row table and I run a transaction that updates 50k rows, what are the performance implications of this? Assuming it's indexed correctly, it shouldn't take long, but what ...
0
votes
1answer
124 views

Move a Postgres 9.3 database to a new server and update to 9.6 with minimum downtime

I have a PostgreSQL 9.3 database, which I have to move to a new server and update to 9.6 with minimum downtime. I thought I could : on the old Postgres, activate archive_command to copy WAL to a NFS ...
0
votes
1answer
346 views

Problem migrating PostGIS

I need to migrate Postgres 9.3 + PostGIS 2.1 to Postgres 10. I'm using CentOS 7.X Using pg_upgrade it should be quite straightforward, but the problem is PostGIS. Postgres 9.3 has PostGIS 2.1 ...
1
vote
0answers
616 views

There seems to be a postmaster servicing the old cluster. | Upgrade from postgres 9.3

I am working on upgrading postgres from version 9.3 to 10. I have encountered a lot of issues along the way since the install is way more custom done than it should be (People here LOVE complex and ...
0
votes
1answer
2k views

Postgres taking 3h to DELETE CASCADE

I have a Postgresql 9.3 with a "mother" table containing items, and a number of "child" tables containing parts of different kinds (e.g. item "AAA" is composed of 1000 parts "P1", 800 parts "P2", 40 ...
2
votes
1answer
52 views

How to use “WHERE” and also “WHERE NOT EXISTS” in the same query and table?

I am trying to add both WHERE and WHERE NOT EXISTS in same query. Below mentioned query1 is working fine, but it returns all the t1 data which does not belong to company1. So I tried query2, but no ...
7
votes
1answer
91 views

Postgres: query planner not respecting table inheritance constraint when querying for null

I'm having an issue with slow queries that is caused by the planner checking every inherited table instead of only the one with the constraint. I have a table with 0 rows called "search_result". This ...
0
votes
1answer
598 views

How to query inside jsonb column

I have a column type of jsonb named changes THis is the structure of my column. [["change","is_enabled",[false,true]]] I want to query within the column. I want to find all the rows that "...
1
vote
1answer
552 views

How to find the nearest lat and lang in postgresql

I am trying find the nearest lang and lat from the specified lat and lang i tried the below mentioned query, in my query i have mentioned the place muscat's lat and lang ,so i want to display the ...
0
votes
1answer
42 views

Failover in Streaming Replication

I have one doubt on master to slave replication in streaming replication in postgresql. I confgured ONE Master and One Slave with streaming replication in my system If Master fails slave act as a ...
0
votes
1answer
5k views

If else statement on join query

i am working with a Postgresql database having two tables: professionals[professional_id,user_id,account_id] users[user_id email] accounts[account_id email] professionals [professional_id,...
0
votes
2answers
934 views

Tracking database and table size growth

Is there way we can get the table size and DB size growth from last one month day-wise? We are able to give the current size of DB and table size.
2
votes
1answer
2k views

Not a able to kill the DB session in Postgres RDS

We are trying to killing one of DB session but not able to do it. Tried with following command getting "TRUE" after issuing command. Still we can see the session is active. select ...
1
vote
1answer
6k views

Count records with same id but different column value

I have the following table: +------+------+ |userID|Name | +------+------+ |1 |sport | +------+------+ |2 |it | +------+------+ |3 |game | +------+------+ |1 |sport | +------+----...
6
votes
1answer
1k views

Custom location for postgis extension .control file [closed]

I am trying to install the postgis extension on my database, which resides on a web hosting service. The problem is that the control files seem to have to be found in /package/host/localhost/postgresq-...
1
vote
1answer
19 views

How to fetch the records which is belongs to only one group in postgresql

I want to fetch the student_id which is only belongs to one collage expected op 6 and 7 stud_id's so how can i do this? _id | stud_id | collage_id | university_id | active -----+---------+-------...
1
vote
1answer
637 views

How to optimize a fetch into a crosstab

I have a schema like: [ad_id] . [name] . [valueofname] 1 . name . "brian" 1 . age . "23" 2 . job . "IT" 2 . name . "Jack" The row name contains ...
0
votes
3answers
42 views

Optimize query to filter active IDs for a given day from big table

I have a PostgreSQL table called users with 4 columns: user_id integer, -- we can have a lot of the same user_id name text, -- name of the user value text NOT NULL, -- ...

1
2 3 4 5
12