Questions tagged [postgresql-10]

for PostgreSQL questions specific to version 10

On 5 October 2017, PostgreSQL 10.0 was released. Major enhancements in PostgreSQL 10 include:

  • Logical replication using publish/subscribe
  • Declarative table partitioning
  • Improved query parallelism
  • Significant general performance improvements
  • Stronger password authentication based on SCRAM-SHA-256
  • Improved monitoring and control

Note that as of version 10, PostgreSQL has moved from 3 component version ids to 2 components, so 10.1 is a minor release.

The official documentation for this version is available at: http://www.postgresql.org/docs/10/static/index.html

632 questions
0
votes
1 answer

How to upgrade postgres 9.5 with non default data directory and checksum enabled to 10.1?

I am trying to upgrade postgres 9.5.4 to 10.1 on Ubuntu 14. The data directory for 9.5.4 is /var/lib/postgresql/data/postgresql0 The steps that I have followed Install postgres 10.1 ubuntu@van-platform:~/build-target/launcher$sudo add-apt-repository…
tuk
  • 5,941
  • 14
  • 79
  • 162
0
votes
1 answer

dockerfile postgresl create role

PostgreSQL 10 I'm trying to create a role in a docker container on launch I've tried creating the role like so: gosu postgres pg_ctl start -D /var/lib/postgresql/data if [ "${PGUSER}" != 'postgres' ]; then gosu postgres psql --command="CREATE…
Simply Seth
  • 3,246
  • 17
  • 51
  • 77
-1
votes
1 answer

JSON values from objects inside an Array

So i have this json column in my postgres (v.10) database. It can look like this: [{"_destroy": false, "gruppe_id": "verwalter"}, {"_destroy": "", "gruppe_id": "budget_nur_anzeigen"}] I just want to get values from the gruppe_id elements…
user2210516
  • 613
  • 3
  • 15
  • 32
-1
votes
1 answer

Postgres index not using correct plan

My postgresql version is 10.6. I have created an index but that is not used for all where clause condition check. Below are more details : Create index concurrently ticket_created_at_portal_id_created_by_id_assigned_group_id_idx on…
Monika Yadav
  • 381
  • 2
  • 12
-1
votes
1 answer

Postgres value has character which i am not able to identify

Currently i have a table which i am migrating to a higher version of postgres DB. And during migration we got constraint violation. We migrated without constraint in the target db it worked. My query the below id caused the error pulled it from the…
Learner
  • 237
  • 4
  • 15
-1
votes
1 answer

Why is this SQL statement so fast?

The table in question has 3.8M records. The data column is indexed on a different field: "idx2_table_on_data_id" btree ((data ->> 'id'::text)). I assumed the sequential scan would be very slow but it is completing in just over 1 second.…
verdude
  • 57
  • 5
-1
votes
1 answer

Django Best Practice to store cloud storage file url (s3/Alibaba OSS) inside relational database like postgres

I am using S3 and Alibaba OSS in my django project as the storage classes. Have used url field in the table to refer to the object in the storage. But the url is not permanent. Like for s3, we have pre-signed url, currently it expires in 1 hour. How…
S.K
  • 480
  • 1
  • 4
  • 19
-1
votes
2 answers

How to commit the transaction that are in idle state in PostgreSQL?

Is there a way to commit a transaction that is in an idle state in Postgres? If we use idle_in_transaction_session_timeout it kills and rollbacks the transaction, but is there any way to commit and complete the session, I can't see any blocked by…
-1
votes
1 answer

syntax error at or near "JOIN" for postgresql

I am trying to join two tables, and for some reason I keeping getting: ERROR: syntax error at or near "JOIN" My code is: SELECT c.visit, d.cake FROM customer c, INNER JOIN desert d ON c.visit = d.visit LIMIT 10;
tkxgoogle
  • 407
  • 4
  • 11
-1
votes
1 answer

PostgreSQL text search with an index within a Jsonb array

Given the following dataset: -- Create random table CREATE TABLE sample ( id serial primary key, content jsonb ); -- Insert sample rows INSERT INTO sample (content) VALUES ('{"text": ["Lorem ipsum dolor sit amet","consectetur…
Gab
  • 3,404
  • 1
  • 11
  • 22
-1
votes
2 answers

Seemingly Random Delay in queries

This is a follow up to this issue I posted a while ago. I have the following code: SET work_mem = '16MB'; SELECT s.start_date, s.end_date, s.resources, s.activity_index, r.resource_id, sa.usedresourceset FROM …
ChrisMM
  • 8,448
  • 13
  • 29
  • 48
-1
votes
1 answer

PostgreSQL: set-returning functions are not allowed in DEFAULT expressions

Does anyone know if it's possible to use a generate_series function as a default value for a function? current_date works fine but would also like to specify a value range by default but get the set-returning function are not allow in default…
Kip
  • 97
  • 6
-1
votes
1 answer

Issues using INSERT INTO ON CONFLICT using WITH queries

I'm changing queries from an Oracle Database to PostgreSQL, and in this query I am getting this error: ERROR: syntax error at or near "ON" the query is: WITH d as ( SELECT ? AS summary, ? AS eventTime), ai as (select * from alarm) ON…
-1
votes
1 answer

Use SQL Server as Subscriber PostgreSQL as publisher

I have a rather large PostgreSQl database. This server is set up as a publisher. Now I want to set up MSSQL server as a subscriber to this publisher, is that possible? PostgreSQL = 10.4 MSSQL = 2017
-1
votes
1 answer

standby crashes on receiving INSERT/DELETE query instead of throwing error message

I am trying to set up streaming replication in postgresql-10.0. i faced this issue. Standbys are not supposed to receive any Transactional queries, if it does, postgres will throw out the following error and should not crash, cannot execute…
1 2 3
42
43