Re: pgdg packages removed for 9.3

2019-04-22 Thread Lewis Shobbrook
Thanks Adrian, The symlinks have been created for all pgdg versions other than 9.3 It seems to have been an over site perhaps. As stated in the announcement... "Today, you still get the link to the pgdg-centos11-11-2 rpm." Which is true in all instances other than 9.3 that I have checked so far. N

Re: cache lookup failed for function 1 on fmgr_info_cxt_security, fmgr.c:184

2019-04-22 Thread Soni
I did not re-initdb, just use the old pgdata. I also did not recreate current database. Some of the database has value 1 for lanvalidator, some has 2247. I'll check with the team how the lanvalidator got 1 for the value. I will report back here. Thanks, Soni. On 23/04/2019 10:51, Tom Lane wr

Re: pgdg packages removed for 9.3

2019-04-22 Thread Adrian Klaver
On 4/22/19 6:51 PM, Lewis Shobbrook wrote: pgdg packages for 9.2, 9.4+ can be located at https://yum.postgresql.org/9.x/redhat/rhel-6-x86_64/ where x is the minor version for all but 9.3. i.e. https://yum.postgresql.org/9.2/redhat/rhel-6-x86_64/pgdg-centos92-9.2-3.noarch.rpm exists but not ht

Re: cache lookup failed for function 1 on fmgr_info_cxt_security, fmgr.c:184

2019-04-22 Thread Tom Lane
Soni writes: > Here it is: > select * from pg_language; >  lanname  | lanowner | lanispl | lanpltrusted | lanplcallfoid | > laninline | lanvalidator | lanacl > --+--+-+--+---+---+--+ >  internal |   10 | f   | f

Re: cache lookup failed for function 1 on fmgr_info_cxt_security, fmgr.c:184

2019-04-22 Thread Soni
Fix it, change the lanvalidator value of 1 to the value of fmgr_c_validator. Thanks a lot Tom, that was fantastic. Not sure how the lanvalidator value changed to 1. Thanks, Soni On 23/04/2019 10:39, Soni wrote: Here it is: select * from pg_language;  lanname  | lanowner | lanispl | lanpltrus

Re: cache lookup failed for function 1 on fmgr_info_cxt_security, fmgr.c:184

2019-04-22 Thread Soni
Here it is: select * from pg_language;  lanname  | lanowner | lanispl | lanpltrusted | lanplcallfoid | laninline | lanvalidator | lanacl --+--+-+--+---+---+--+  internal |   10 | f   | f    |

Re: cache lookup failed for function 1 on fmgr_info_cxt_security, fmgr.c:184

2019-04-22 Thread Tom Lane
Soni writes: > Here's the backtrace. Please let me know if it helps. > #4  OidFunctionCall1Coll (functionId=functionId@entry=1, > collation=collation@entry=0, arg1=arg1@entry=75471) at fmgr.c:1325 hm, there's "function 1" ... > #5  0x00532054 in ProcedureCreate (procedureName= out>, pr

Re: cache lookup failed for function 1 on fmgr_info_cxt_security, fmgr.c:184

2019-04-22 Thread Soni
Yes for that three questions. -bash-4.2$ ls /usr/pgsql-10/share/extension/uuid-ossp.control /usr/pgsql-10/share/extension/uuid-ossp.control select * from pg_available_extensions where name = 'uuid-ossp';    name    | default_version | installed_version | comment ---

Re: cache lookup failed for function 1 on fmgr_info_cxt_security, fmgr.c:184

2019-04-22 Thread rob stone
On Tue, 2019-04-23 at 09:15 +0700, Soni wrote: > I install the contrib module from the postgres repo using yum > install. > creating extension run as postgres superuser. > > Thanks, > Soni > 1) Is there a uuid-ossp.control file sitting in the $SHAREDIR/extension path? 2) Does its name exist

Re: cache lookup failed for function 1 on fmgr_info_cxt_security, fmgr.c:184

2019-04-22 Thread Soni
We have no other extensions installed, just plpgsql. Here's the backtrace. Please let me know if it helps. #0  errfinish (dummy=dummy@entry=0) at elog.c:414 #1  0x00820068 in elog_finish (elevel=elevel@entry=20, fmt=fmt@entry=0x864278 "cache lookup failed for function %u") at elog.c:1376

Re: cache lookup failed for function 1 on fmgr_info_cxt_security, fmgr.c:184

2019-04-22 Thread Soni
I install the contrib module from the postgres repo using yum install. creating extension run as postgres superuser. Thanks, Soni On 22/04/2019 21:05, Adrian Klaver wrote: On 4/21/19 9:14 PM, Soni wrote: Hello All, CentOS Linux release 7.5.1804 (Core) Postgres 10.7. When "create extension "u

pgdg packages removed for 9.3

2019-04-22 Thread Lewis Shobbrook
pgdg packages for 9.2, 9.4+ can be located at https://yum.postgresql.org/9.x/redhat/rhel-6-x86_64/ where x is the minor version for all but 9.3. i.e. https://yum.postgresql.org/9.2/redhat/rhel-6-x86_64/pgdg-centos92-9.2-3.noarch.rpm exists but not https://yum.postgresql.org/9.3/redhat/rhel-6-x86_64

Re: Why does log_error_verbosity not apply to server logs?

2019-04-22 Thread Tom Lane
Jeremy Finzel writes: > On Mon, Apr 22, 2019 at 3:47 PM Tom Lane wrote: >> Sure sounds to me like what you are setting is something client-side, >> not the server's log verbosity. It works for me: > I am running it differently - explicitly raising a LOG level message, not > an ERROR. The line

Re: Why does log_error_verbosity not apply to server logs?

2019-04-22 Thread Adrian Klaver
On 4/22/19 1:54 PM, Jeremy Finzel wrote: On Mon, Apr 22, 2019 at 3:47 PM Tom Lane > wrote: Jeremy Finzel mailto:finz...@gmail.com>> writes: > I have a DO block which is raising a log message with number of rows > deleted.  It also shows CONTEXT message

Re: Why does log_error_verbosity not apply to server logs?

2019-04-22 Thread Jeremy Finzel
On Mon, Apr 22, 2019 at 3:47 PM Tom Lane wrote: > Jeremy Finzel writes: > > I have a DO block which is raising a log message with number of rows > > deleted. It also shows CONTEXT messages every time, which I don't want. > > But setting in the client log_error_verbosity = terse does not work to

Re: Why does log_error_verbosity not apply to server logs?

2019-04-22 Thread Adrian Klaver
On 4/22/19 1:30 PM, Jeremy Finzel wrote: I have a DO block which is raising a log message with number of rows deleted.  It also shows CONTEXT messages every time, which I don't want.  But setting in the client log_error_verbosity = terse does not work to get rid of the messages.  I can't get it

Re: Why does log_error_verbosity not apply to server logs?

2019-04-22 Thread Tom Lane
Jeremy Finzel writes: > I have a DO block which is raising a log message with number of rows > deleted. It also shows CONTEXT messages every time, which I don't want. > But setting in the client log_error_verbosity = terse does not work to get > rid of the messages. I can't get it to work even s

Why does log_error_verbosity not apply to server logs?

2019-04-22 Thread Jeremy Finzel
I have a DO block which is raising a log message with number of rows deleted. It also shows CONTEXT messages every time, which I don't want. But setting in the client log_error_verbosity = terse does not work to get rid of the messages. I can't get it to work even setting it on a per-user level.

Re: Resetting identity columns

2019-04-22 Thread Thomas Kellerer
Ray O'Donnell schrieb am 22.04.2019 um 17:30: I'm probably doing something silly I'm migrating data from one database table to another, where the old table used a SERIAL primary key and the new one uses GENERATED BY DEFAULT AS IDENTITY. Having loaded the data into the new table, I need to res

Re: Resetting identity columns

2019-04-22 Thread Adrian Klaver
On 4/22/19 10:08 AM, Ray O'Donnell wrote: On 22/04/2019 17:02, Adrian Klaver wrote: do language plpgsql $$ declare m_max_id bigint; begin select max(id) + 1 from identity_test into m_max_id; EXECUTE 'alter table identity_test alter column id restart with ' || m_max_id; end; $$; Thanks a mil

Re: Resetting identity columns

2019-04-22 Thread Tom Lane
"Ray O'Donnell" writes: > In general, then, is it not possible to use an expression thus? - > [...] ALTER COLUMN [...] RESTART WITH No. In general, PG's utility commands (everything except SELECT/ INSERT/UPDATE/DELETE) don't do expression evaluation. Partly this is laziness or lack of ro

Re: Resetting identity columns

2019-04-22 Thread Ray O'Donnell
On 22/04/2019 17:02, Adrian Klaver wrote: do language plpgsql $$ declare m_max_id bigint; begin select max(id) + 1 from identity_test into m_max_id; EXECUTE 'alter table identity_test alter column id restart with ' || m_max_id; end; $$; Thanks a million Adrian - EXECUTE did the job, and I fi

Re: Resetting identity columns

2019-04-22 Thread Adrian Klaver
On 4/22/19 8:30 AM, Ray O'Donnell wrote: Hi all, I'm probably doing something silly I'm migrating data from one database table to another, where the old table used a SERIAL primary key and the new one uses GENERATED BY DEFAULT AS IDENTITY. Having loaded the data into the new table, I need

Re: Is it possible to store the output of EXPLAIN into a table

2019-04-22 Thread Tom Lane
Souvik Bhattacherjee writes: > I was just wondering if it is possible to store the output of EXPLAIN into > a table. EXPLAIN won't do that directly, but you could make a plpgsql function along the lines of for t in execute explain ... return next t; (too lazy to check the exact d

Re: Is it possible to store the output of EXPLAIN into a table

2019-04-22 Thread Thomas Kellerer
Souvik Bhattacherjee schrieb am 22.04.2019 um 17:27: Hi, I was just wondering if it is possible to store the output of EXPLAIN into a table. create temp table mytab as (select * from (explain select * from table1 where attr = 5) t); Unfortunately, the query above does not work. You can't

Re: Is it possible to store the output of EXPLAIN into a table

2019-04-22 Thread Thomas Kellerer
Souvik Bhattacherjee schrieb am 22.04.2019 um 17:27: Hi, I was just wondering if it is possible to store the output of EXPLAIN into a table. create temp table mytab as (select * from (explain select * from table1 where attr = 5) t); Unfortunately, the query above does not work. You can't

Re: Is it possible to store the output of EXPLAIN into a table

2019-04-22 Thread Bruce Momjian
On Mon, Apr 22, 2019 at 11:27:18AM -0400, Souvik Bhattacherjee wrote: > Hi, > > I was just wondering if it is possible to store the output of EXPLAIN into a > table. > > > create temp table mytab as (select * from (explain select * from table1 where > attr = 5) t); > > > Unfortunately, the que

Re: Resetting identity columns

2019-04-22 Thread Adrian Klaver
On 4/22/19 8:45 AM, Adrian Klaver wrote: On 4/22/19 8:30 AM, Ray O'Donnell wrote: Hi all, I'm probably doing something silly I'm migrating data from one database table to another, where the old table used a SERIAL primary key and the new one uses GENERATED BY DEFAULT AS IDENTITY. Having

Re: Resetting identity columns

2019-04-22 Thread Adrian Klaver
On 4/22/19 8:30 AM, Ray O'Donnell wrote: Hi all, I'm probably doing something silly I'm migrating data from one database table to another, where the old table used a SERIAL primary key and the new one uses GENERATED BY DEFAULT AS IDENTITY. Having loaded the data into the new table, I need

Resetting identity columns

2019-04-22 Thread Ray O'Donnell
Hi all, I'm probably doing something silly I'm migrating data from one database table to another, where the old table used a SERIAL primary key and the new one uses GENERATED BY DEFAULT AS IDENTITY. Having loaded the data into the new table, I need to reset the underlying sequence so that

RE: Streaming Replication

2019-04-22 Thread Scot Kreienkamp
Double check all the info is correct on the primary_conninfo line: primary_conninfo = 'host=primary host port=5432 user=replication password=replication' And check your logs. It probably says something like cannot connect to host primary. From: Daulat Ram [mailto:daulat@exponential.com] S

Is it possible to store the output of EXPLAIN into a table

2019-04-22 Thread Souvik Bhattacherjee
Hi, I was just wondering if it is possible to store the output of EXPLAIN into a table. create temp table mytab as (select * from (explain select * from table1 where attr = 5) t); Unfortunately, the query above does not work. Thanks, -Souvik

Streaming Replication

2019-04-22 Thread Daulat Ram
Hello Team, I am setting a streaming replication by using two different host there is no output of select * from pg_stat_replication; I have set the parameters on both side. Host names are : (10.29.15.244) (10.29.15.25) postgres=# select * from pg_stat_replication; pid | usesysid | usename |

Re: cache lookup failed for function 1 on fmgr_info_cxt_security, fmgr.c:184

2019-04-22 Thread Adrian Klaver
On 4/21/19 9:14 PM, Soni wrote: Hello All, CentOS Linux release 7.5.1804 (Core) Postgres 10.7. When "create extension "uuid-ossp"", I got : 2019-04-22 02:41:53.323 UTC [10305] XX000ERROR:  XX000: cache lookup failed for function 1 2019-04-22 02:41:53.323 UTC [10305] XX000LOCATION: fmgr_info_c

Re: cache lookup failed for function 1 on fmgr_info_cxt_security, fmgr.c:184

2019-04-22 Thread Tom Lane
Soni writes: > When "create extension "uuid-ossp"", I got : > 2019-04-22 02:41:53.323 UTC [10305] XX000ERROR:  XX000: cache lookup > failed for function 1 > 2019-04-22 02:41:53.323 UTC [10305] XX000LOCATION: > fmgr_info_cxt_security, fmgr.c:184 > 2019-04-22 02:41:53.323 UTC [10305] XX000STATEMEN

Re: orafce error

2019-04-22 Thread Pavel Stehule
po 22. 4. 2019 v 13:21 odesílatel Prakash Ramakrishnan < prakash.ramakrishnan...@nielsen.com> napsal: > > Hi Team, > > While am creating the orafce extension we are getting below error. > > ==> ll > total 728 > -rw-r--r--. 1 postgres postgres 7863 Mar 27 18:54 aggregate.c > -rw-r--r--. 1 postgre

orafce error

2019-04-22 Thread Prakash Ramakrishnan
Hi Team, While am creating the orafce extension we are getting below error. ==> ll total 728 -rw-r--r--. 1 postgres postgres 7863 Mar 27 18:54 aggregate.c -rw-r--r--. 1 postgres postgres 21826 Mar 27 18:54 alert.c -rw-r--r--. 1 postgres postgres 9234 Mar 27 18:54 assert.c -rw-r--r--. 1 postg

Re: Where to store Blobs?

2019-04-22 Thread Jamesie Pic
Thanks for your feedback. In my case, Bob the manager said this would "make backups easier" xD The general pro that I see is "transactional". While I can understand that, it's irrelevant in our case: users upload files through AJAX, that happens **before** they submit the form. That means, the fil