Re: postgresql-10.3 on unbuntu-17.10 - how??

2018-03-20 Thread Stuart McGraw
On 03/20/2018 09:46 AM, Adrian Klaver wrote: On 03/20/2018 08:23 AM, Stuart McGraw wrote: I recently installed Ubuntu-17.10 and then discovered that Postgresql from the Pgdg repos is only supported on Ubuntu LTS releases (eg 16.04).  However info on the internet said pg-10 could be installed

Re: postgresql-10.3 on unbuntu-17.10 - how??

2018-03-20 Thread Stuart McGraw
On 03/20/2018 06:42 PM, Stuart McGraw wrote: On 03/20/2018 05:34 PM, Adrian Klaver wrote: On 03/20/2018 02:25 PM, Stuart McGraw wrote: On 03/20/2018 02:19 PM, Christoph Berg wrote: [...]    # apt-get dist-upgrade    The following packages will be REMOVED: pgadmin3    The following

Re: postgresql-10.3 on unbuntu-17.10 - how??

2018-03-20 Thread Stuart McGraw
On 03/20/2018 05:34 PM, Adrian Klaver wrote: On 03/20/2018 02:25 PM, Stuart McGraw wrote: On 03/20/2018 02:19 PM, Christoph Berg wrote:  > Re: Adrian Klaver 2018-03-20 <4c40e7c5-efa7-00d7-b891-acc9c1ec7...@aklaver.com>  >>> However I need to upgrade to 10.3 and the normal "apt update;  >>> apt

Re: postgresql-10.3 on unbuntu-17.10 - how??

2018-03-20 Thread Adrian Klaver
On 03/20/2018 02:25 PM, Stuart McGraw wrote: On 03/20/2018 02:19 PM, Christoph Berg wrote: > Re: Adrian Klaver 2018-03-20 <4c40e7c5-efa7-00d7-b891-acc9c1ec7...@aklaver.com> >>> However I need to upgrade to 10.3 and the normal "apt update; >>> apt upgrade" does not offer 10.3.  Also, doing a

Re: postgresql-10.3 on unbuntu-17.10 - how??

2018-03-20 Thread Stuart McGraw
On 03/20/2018 02:19 PM, Christoph Berg wrote: > Re: Adrian Klaver 2018-03-20 <4c40e7c5-efa7-00d7-b891-acc9c1ec7...@aklaver.com> >>> However I need to upgrade to 10.3 and the normal "apt update; >>> apt upgrade" does not offer 10.3. Also, doing a fresh install >>> still installs 10.1. >> >>

Re: postgresql-10.3 on unbuntu-17.10 - how??

2018-03-20 Thread Christoph Berg
Re: Adrian Klaver 2018-03-20 <4c40e7c5-efa7-00d7-b891-acc9c1ec7...@aklaver.com> > > However I need to upgrade to 10.3 and the normal "apt update; > > apt upgrade" does not offer 10.3.  Also, doing a fresh install > > still installs 10.1. > > https://wiki.postgresql.org/wiki/Apt > "2018-01-17:

Re: FDW Foreign Table Access: strange LOG message

2018-03-20 Thread Tom Lane
Adrian Klaver writes: > On 03/20/2018 11:52 AM, Albrecht Dreß wrote: >> I use Postgres 10.3 on a Debian Stretch system with foreign tables, and >> noticed strange LOG messages when accessing them. >> [time stamp/pid] user@my_db LOG:  could not receive data from client:

Re: FATAL: semctl(15073290, 4, SETVAL, 0) failed: Invalid argument

2018-03-20 Thread Adrian Klaver
On 03/20/2018 11:57 AM, JotaComm wrote: ​Hello, Today I found this message in my Postgres log: FATAL:  semctl(15073290, 4, SETVAL, 0) failed: Invalid argument user=,db=,app=,host= LOG:  server process (PID 30741) exited with exit code 1 user=,db=,app=,host= LOG:  terminating any other active

Re: You might be able to move the set-returning function into a LATERAL FROM item.

2018-03-20 Thread Alexander Farber
Thank you - On Tue, Mar 20, 2018 at 3:27 PM, Tom Lane wrote: > > I think you could push the conditionality into a plpgsql function, > something like (untested) > > create function jsonb_elements_if_array(j jsonb) returns setof jsonb as $$ > begin > if jsonb_typeof(j) =

Re: FDW Foreign Table Access: strange LOG message

2018-03-20 Thread Adrian Klaver
On 03/20/2018 11:52 AM, Albrecht Dreß wrote: Hi all, I use Postgres 10.3 on a Debian Stretch system with foreign tables, and noticed strange LOG messages when accessing them. The data base setup is basically

FATAL: semctl(15073290, 4, SETVAL, 0) failed: Invalid argument

2018-03-20 Thread JotaComm
​Hello, Today I found this message in my Postgres log: FATAL: semctl(15073290, 4, SETVAL, 0) failed: Invalid argument user=,db=,app=,host= LOG: server process (PID 30741) exited with exit code 1 user=,db=,app=,host= LOG: terminating any other active server processes WARNING: terminating

FDW Foreign Table Access: strange LOG message

2018-03-20 Thread Albrecht Dreß
Hi all, I use Postgres 10.3 on a Debian Stretch system with foreign tables, and noticed strange LOG messages when accessing them. The data base setup is basically ---8<-- CREATE EXTENSION IF NOT EXISTS

Re: found xmin from before relfrozenxid on pg_catalog.pg_authid

2018-03-20 Thread Jeremy Finzel
On Mon, Mar 19, 2018 at 3:55 PM, Jeremy Finzel wrote: > > > On Mon, Mar 19, 2018 at 3:53 PM, Peter Geoghegan wrote: > >> On Mon, Mar 19, 2018 at 1:01 PM, Jeremy Finzel wrote: >> > SELECT heap_page_items(get_raw_page('pg_authid', 7)); >> >>

Re: SELECT .. FOR UPDATE: find out who locked a row

2018-03-20 Thread Enrico Thierbach
-- me at github: https://github.com/radiospiel me at linked.in: https://www.linkedin.com/in/radiospiel ​You probably considered this but the queuing mechanism I use doesn't hold locks on records during processing. Workers claim tasks by locking them, setting a claimed flag of some sort,

Re: Restore - disable triggers - when they fired?

2018-03-20 Thread Adrian Klaver
On 03/20/2018 07:56 AM, Durumdara wrote: Dear Adrian! 2018-03-20 15:47 GMT+01:00 Adrian Klaver >: When it would be useful? https://www.postgresql.org/docs/10/static/app-pgrestore.html

postgresql-10.3 on unbuntu-17.10 - how??

2018-03-20 Thread Stuart McGraw
I recently installed Ubuntu-17.10 and then discovered that Postgresql from the Pgdg repos is only supported on Ubuntu LTS releases (eg 16.04). However info on the internet said pg-10 could be installed from Pgdg zesty repo, which with some package version conflicts, I was able to do so and have

Re: Restore - disable triggers - when they fired?

2018-03-20 Thread Adrian Klaver
On 03/20/2018 07:31 AM, Durumdara wrote: Dear Members! I saw in PGAdmin 3/4 that pg_restore have an option "disable triggers". Because we need to move some databases in the near future I have to know about the meaning of this option. I wrote a table with an BEFORE UPDATE trigger: create

Restore - disable triggers - when they fired?

2018-03-20 Thread Durumdara
Dear Members! I saw in PGAdmin 3/4 that pg_restore have an option "disable triggers". Because we need to move some databases in the near future I have to know about the meaning of this option. I wrote a table with an BEFORE UPDATE trigger: create table tr_test ( id integer not null primary

Re: You might be able to move the set-returning function into a LATERAL FROM item.

2018-03-20 Thread Tom Lane
Alexander Farber writes: > I am trying to fetch a history/protocol of a game with: > SELECT > CASE WHEN JSONB_TYPEOF(tiles) = 'array' THEN > JSONB_ARRAY_ELEMENTS(tiles) ELSE NULL END AS x I think you could push the conditionality

Re: Foreign Key locking / deadlock issue.

2018-03-20 Thread Adrian Klaver
On 03/20/2018 06:55 AM, HORDER Phil wrote: Please reply to list also. Ccing list. Still not certain what the PK is or what key value refers to? Well this is just sample SQL to demonstrate the problem. If each process executes lines of code alternately, a deadlock occurs. The commit would

Re: PostgreSQL 9.6 Temporary files

2018-03-20 Thread Adrian Klaver
On 03/20/2018 03:16 AM, Jimmy Augustine wrote: Thanks all for your response, $du -h $MY_DATA/base/$BASE_OID/ returns 162GB but when I execute this query: |SELECT stats.relname AS table, pg_size_pretty(pg_relation_size(statsio.relid)) AS table_size,

Re: error 53200 out of memory

2018-03-20 Thread Adrian Klaver
On 03/20/2018 12:08 AM, francis cherat wrote: Hello, there is no message in /var/log/messages How about the Postgres logs? Regards -- Adrian Klaver adrian.kla...@aklaver.com

Re: Foreign Key locking / deadlock issue.

2018-03-20 Thread Adrian Klaver
On 03/20/2018 04:46 AM, HORDER Phil wrote: Hi, I’m trying to understand why I’m getting a deadlock issue, and how to work around it. At base, I think the problem is: 1.Updates to a parent table are creating row level write locks, 2.updates to a child table set the foreign key value to the

Re: COPY error when \. char

2018-03-20 Thread Adrian Klaver
On 03/20/2018 04:32 AM, Nicolas Paris wrote: Hello I get an error when loading this kind of csv: test.csv: "hello ""world""" "\." "this works " "this \. does not" table: create table test (field text); sql: \copy test (field) from 'test.csv' CSV quote '"' ESCAPE '"'; ERROR:

Foreign Key locking / deadlock issue.

2018-03-20 Thread HORDER Phil
Hi, I'm trying to understand why I'm getting a deadlock issue, and how to work around it. At base, I think the problem is: 1. Updates to a parent table are creating row level write locks, 2. updates to a child table set the foreign key value to the parent table, which are then

COPY error when \. char

2018-03-20 Thread Nicolas Paris
Hello I get an error when loading this kind of csv: > test.csv: "hello ""world"" " "\." "this works " "this \. does not" > table: create table test (field text); > sql: \copy test (field) from 'test.csv' CSV quote '"' ESCAPE '"'; ERROR: unterminated CSV quoted field CONTEXTE : COPY test,

Re: You might be able to move the set-returning function into a LATERAL FROM item.

2018-03-20 Thread Laurenz Albe
Alexander Farber wrote: > for a word game in PostgreSQL 10.3 I have a table with jsonb column "tiles". > > The column holds either a JSON array of objects (word tiles played) or a > string (of swapped letters). > > I am trying to fetch a history/protocol of a game with: > > > CREATE OR

Re: PostgreSQL 9.6 Temporary files

2018-03-20 Thread Jimmy Augustine
Thanks all for your response, $du -h $MY_DATA/base/$BASE_OID/ returns 162GB but when I execute this query: SELECT stats.relname AS table, pg_size_pretty(pg_relation_size(statsio.relid)) AS table_size, pg_size_pretty(pg_total_relation_size(statsio.relid)

You might be able to move the set-returning function into a LATERAL FROM item.

2018-03-20 Thread Alexander Farber
Good morning, for a word game in PostgreSQL 10.3 I have a table with jsonb column "tiles". The column holds either a JSON array of objects (word tiles played) or a string (of swapped letters). I am trying to fetch a history/protocol of a game with: CREATE OR REPLACE FUNCTION words_get_moves(

RE: error 53200 out of memory

2018-03-20 Thread francis cherat
Hello, there is no message in /var/log/messages Regards De : francis cherat Envoyé : vendredi 16 mars 2018 20:27 À : Adrian Klaver; pgsql-gene...@postgresql.org Objet : RE: error 53200 out of memory I don't think so, but i am not in my