Re: [GENERAL] Postgres logs showing error after replication

2017-09-05 Thread Vijay Chaudhery
Ok is it possible to release the lock? or it is just a warning messages only? thanks -Original Message- From: Tatsuo Ishii [mailto:is...@sraoss.co.jp] Sent: 06 September 2017 10:31 AM To: Vijay Chaudhery Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Postgres

Re: [GENERAL] Postgres logs showing error after replication

2017-09-05 Thread Tatsuo Ishii
> Ok thank you, > > I have promoted slave server as master in postgres streaming replication , > howerver application is working fine after promotion , but getting some error > messages in the postgres log (slave which promoted to master) > > what does it mean? > > >>ERROR: could not obtain

Re: [GENERAL] Postgres logs showing error after replication

2017-09-05 Thread Vijay Chaudhery
Ok thank you, I have promoted slave server as master in postgres streaming replication , howerver application is working fine after promotion , but getting some error messages in the postgres log (slave which promoted to master) what does it mean? >ERROR: could not obtain lock on row in

Re: [GENERAL] Postgres logs showing error after replication

2017-09-05 Thread Tatsuo Ishii
> I am not sure if the sending email is the right way to get the forum help. > Could you please let me know how to open forum query to ask postgres > questions. Sending email to this mailing list regarding your questions is the perfect way to get help. Other than this, there's an IRC channel

[GENERAL] Postgres logs showing error after replication

2017-09-05 Thread Vijay Chaudhery
Hi, I am not sure if the sending email is the right way to get the forum help. Could you please let me know how to open forum query to ask postgres questions. Thanks vijay ::DISCLAIMER::

Re: [GENERAL] BDR, wal segment has been removed, is it possible move forward?

2017-09-05 Thread milist ujang
Hi Craig On Wed, Sep 6, 2017 at 7:21 AM, Craig Ringer wrote: > > > BDR can, see bdr.skip_changes_upto . > > Unluckily my bdr is 0.9.3 > But PostgreSQL's logical decoding requires a contiguous WAL stream to > maintain a valid catalog_xmin and restart_lsn, so it'll still

Re: [GENERAL] BDR, wal segment has been removed, is it possible move forward?

2017-09-05 Thread Craig Ringer
On 6 September 2017 at 01:52, milist ujang wrote: > Hi all, > > due to space issue and high volume transaction, some wal segments removed > from pg_xlog on bdr environment. > What, you deleted them? > I had played streams and goldengate (oracle product) , that at

Re: [GENERAL] Postgresql init and cleanup module functions

2017-09-05 Thread Andres Freund
On 2017-09-05 20:15:57 +0300, Yan Pas wrote: > I'm writing C postgresql module with some psql-functions and global state. > Do module API provide any init and cleanup functions? If yes then it would > be fine to see them in "35.9. C-Language Functions" help page." The relevant doc page is at

[GENERAL] BDR, wal segment has been removed, is it possible move forward?

2017-09-05 Thread milist ujang
Hi all, due to space issue and high volume transaction, some wal segments removed from pg_xlog on bdr environment. warning log at node1 saying "requested WAL segment . has already been removed" following Connection reset by peer. log at node2 : Sending replication command: START_REPLICATION

Re: [GENERAL] Accessiing database from inside of postgresql C function

2017-09-05 Thread Tom Lane
Yan Pas writes: > I'm writing C postgresql module with postgresql functions and want to > access the tables from inside (SELECT mostly and maybe INSERT). Is it > possible? If yes what API can I use except classic TCP connection (not sure > if it's even legal)? Recommended

[GENERAL] Accessiing database from inside of postgresql C function

2017-09-05 Thread Yan Pas
High! I'm writing C postgresql module with postgresql functions and want to access the tables from inside (SELECT mostly and maybe INSERT). Is it possible? If yes what API can I use except classic TCP connection (not sure if it's even legal)? Kind Regards, Yan

[GENERAL] Postgresql init and cleanup module functions

2017-09-05 Thread Yan Pas
High! I'm writing C postgresql module with some psql-functions and global state. Do module API provide any init and cleanup functions? If yes then it would be fine to see them in "35.9. C-Language Functions" help page." Regards, Yan

Re: [GENERAL] Create Action for psql when NOTIFY Recieved

2017-09-05 Thread Nico Williams
On Tue, Sep 05, 2017 at 08:19:13AM -0700, Steve Atkins wrote: > > On Sep 4, 2017, at 10:25 PM, Nico Williams wrote: > > On Mon, Sep 4, 2017 at 4:21 PM Steve Atkins wrote: > > > https://github.com/wttw/pgsidekick [BTW, I must say I like pgsidekick, but

Re: [GENERAL] Create Action for psql when NOTIFY Recieved

2017-09-05 Thread Steve Atkins
> On Sep 4, 2017, at 10:25 PM, Nico Williams wrote: > > On Mon, Sep 4, 2017 at 4:21 PM Steve Atkins wrote: > > > > Me too. > > https://github.com/wttw/pgsidekick > > Select-based, sends periodic keep-alives to keep the connection open, outputs >

Re: [GENERAL] What's the best way in postgres to use ANY() with LIKE '%'?

2017-09-05 Thread Thomas Kellerer
Ryan Murphy schrieb am 05.09.2017 um 16:19: > Thanks, I saw that page earlier; what I'm looking for is kind of the > opposite - instead of comparing a single value to see if it matches > any of a list of patterns, I'm trying to take a list of values and > see if any of them match a given pattern.

Re: [GENERAL] What's the best way in postgres to use ANY() with LIKE '%'?

2017-09-05 Thread Ryan Murphy
Thanks, I saw that page earlier; what I'm looking for is kind of the opposite - instead of comparing a single value to see if it matches any of a list of patterns, I'm trying to take a list of values and see if any of them match a given pattern. Best, Ryan On Tue, Sep 5, 2017 at 8:01 AM Hellmuth

Re: [GENERAL] What's the best way in postgres to use ANY() with LIKE '%'?

2017-09-05 Thread Hellmuth Vargas
Hi can see: https://stackoverflow.com/questions/4928054/postgresql-wildcard-like-for-any-of-a-list-of-words 2017-09-04 22:42 GMT-05:00 Ryan Murphy : > > I'm pretty sure it doesn't work syntactically. Don't recall the details > offhand. > > Ok, thanks! > --

Re: [GENERAL] Not possible to compare regrole in a view query?

2017-09-05 Thread Glen Huang
Thank you! It works. I’d very much like to know why this solution works. Could you please elaborate a bit more? I can’t quite understand what you mean by "can’t store the constant”. Since a view can’t store data, do you mean it can’t have a query that contains a constant? But isn’t 'public' a

Re: [GENERAL] Not possible to compare regrole in a view query?

2017-09-05 Thread Tom Lane
Glen Huang writes: > I have this simple view definition: > CREATE TEMP VIEW user_schema AS > SELECT nspname AS name FROM pg_namespace > WHERE nspname = 'public' OR nspowner = ‘rolename'::regrole; > But it fails to create the view by complaining: constant of the type >

Re: [GENERAL] CREATE TABLE LIKE including all not including storage parameters?

2017-09-05 Thread Achilleas Mantzios
On 05/09/2017 13:26, Michael Paquier wrote: On Tue, Sep 5, 2017 at 6:45 PM, Achilleas Mantzios wrote: Am I doing something wrong here? I didn't sat that :) but you are right, STORAGE settings for copied col defs != tables's storage parameters. The key here is

Re: [GENERAL] CREATE TABLE LIKE including all not including storage parameters?

2017-09-05 Thread Michael Paquier
On Tue, Sep 5, 2017 at 6:45 PM, Achilleas Mantzios wrote: > Am I doing something wrong here? >From the documentation: https://www.postgresql.org/docs/devel/static/sql-createtable.html STORAGE settings for the copied column definitions will be copied only if

Re: [GENERAL] CREATE TABLE LIKE including all not including storage parameters?

2017-09-05 Thread Achilleas Mantzios
On 05/09/2017 11:56, Milen Blagojevic wrote: Hi all, I am using CREATE TABLE LIKE for creating partitions : Lets say this is my main table: \d+ test_tabl Table "public.test_tabl" Column|Type | Modifiers | Storage | Stats

[GENERAL] CREATE TABLE LIKE including all not including storage parameters?

2017-09-05 Thread Milen Blagojevic
Hi all, I am using CREATE TABLE LIKE for creating partitions : Lets say this is my main table: \d+ test_tabl Table "public.test_tabl" Column|Type | Modifiers | Storage | Stats target | Description

[GENERAL] Not possible to compare regrole in a view query?

2017-09-05 Thread Glen Huang
I have this simple view definition: CREATE TEMP VIEW user_schema AS SELECT nspname AS name FROM pg_namespace WHERE nspname = 'public' OR nspowner = ‘rolename'::regrole; But it fails to create the view by complaining: constant of the type "regrole" cannot be used here If I run the query