Re: partial data migration

2019-03-06 Thread Ron
On 3/7/19 1:54 AM, Julie Nishimura wrote: Hello psql friends, We need to migrate only 6 months worth of data from one instance to another. What would be the easiest way to do it? In Oracle, I would set up dblink. What about postgresql? postgres_fdw -- Angular momentum makes the world go 'rou

partial data migration

2019-03-06 Thread Julie Nishimura
Hello psql friends, We need to migrate only 6 months worth of data from one instance to another. What would be the easiest way to do it? In Oracle, I would set up dblink. What about postgresql? Thank you!

Re: Question about pg_upgrade from 9.2 to X.X

2019-03-06 Thread Perumal Raj
Awesome, thanks Sergei and Justin, Finally, I am able to upgrade the DB from 9.2 to 9.6 successfully after dropping Schema (reorg) without library issue. Also , I have installed -Contrib. package for Version:10 and upgraded to version 10.7 too. On both the cases , I have used --link option and

Re: Performance comparison between Pgsql 10.5 and Pgsql 11.2

2019-03-06 Thread Thomas Munro
On Thu, Mar 7, 2019 at 12:12 AM Nicola Contu wrote: > This is instead the strace of another server running the same version > compiled but that is even slower. Huh. That's a lot of lseek(). Some of these will be for random reads/writes and will go way in v12, and some will be for probing the

Re: Performance comparison between Pgsql 10.5 and Pgsql 11.2

2019-03-06 Thread Thomas Munro
On Wed, Mar 6, 2019 at 11:14 PM Nicola Contu wrote: > Here is the strace as requested for pg11 How does it compare to v10 running the same test? -- Thomas Munro https://enterprisedb.com

Re: LDAP authenticated session terminated by signal 11: Segmentation fault, PostgresSQL server terminates other active server processes

2019-03-06 Thread Noah Misch
On Thu, Mar 07, 2019 at 10:45:56AM +1300, Thomas Munro wrote: > On Wed, Feb 27, 2019 at 11:28 AM Tom Lane wrote: > > Thomas Munro writes: > > > I don't see pthread_is_threaded_np() on any non-Apple systems in my > > > lab. > > > > Yeah, I thought that might be a Mac thing. I wonder if POSIX has

Re: Non-pausing table scan on 9.6 replica?

2019-03-06 Thread Sameer Kumar
On Thu, Mar 7, 2019 at 5:16 AM Mark Fletcher wrote: > Andreas, Sameer, > > Thank you for replying. I did not understand the purpose of > hot_standby_feedback, and your explanations helped. I turned it on, and the > pausing stopped. > Great! But do bear in mind that this is also not without its o

Re: python install location

2019-03-06 Thread Adrian Klaver
On 3/6/19 4:12 PM, Alan Nilsson wrote: How does postgres determine which install of python to use in conjunction with plpythonu? We have a CentOS6 machine with python 2.6 and 2.7 installed on it. The 2.6 version is in the canonical location and the version which gets used when using the plpy

python install location

2019-03-06 Thread Alan Nilsson
How does postgres determine which install of python to use in conjunction with plpythonu? We have a CentOS6 machine with python 2.6 and 2.7 installed on it. The 2.6 version is in the canonical location and the version which gets used when using the plpython extension. Is there a way, in postg

Re: LDAP authenticated session terminated by signal 11: Segmentation fault, PostgresSQL server terminates other active server processes

2019-03-06 Thread Thomas Munro
Adding Noah to thread. On Wed, Feb 27, 2019 at 11:28 AM Tom Lane wrote: > Thomas Munro writes: > > I don't see pthread_is_threaded_np() on any non-Apple systems in my > > lab. > > Yeah, I thought that might be a Mac thing. I wonder if POSIX has any > usable equivalent. I don't see anything lik

Re: Non-pausing table scan on 9.6 replica?

2019-03-06 Thread Mark Fletcher
Andreas, Sameer, Thank you for replying. I did not understand the purpose of hot_standby_feedback, and your explanations helped. I turned it on, and the pausing stopped. Thanks, Mark

Re: write on standby

2019-03-06 Thread Adrian Klaver
On 3/5/19 9:16 PM, Andreas Kretschmer wrote: Am 06.03.19 um 00:34 schrieb Julie Nishimura: Hello there, Is it possible for a test app to connect to the standby dB of an active-Standby dB pair? that's possible, but ... While both continue to be connected and replicating? What if it’s need

Re: query has no destination for result data

2019-03-06 Thread Rob Sargent
> On Mar 6, 2019, at 10:29 AM, Adrian Klaver wrote: > > On 3/6/19 8:19 AM, Rob Sargent wrote: >>> On Mar 6, 2019, at 7:41 AM, Adrian Klaver >> > wrote: >>> On 3/6/19 7:37 AM, Pavel Stehule wrote: or \sf+ functioname >>> >>> Cool, I learn

Re: Monitor the ddl and dml activities in logs

2019-03-06 Thread Adrian Klaver
On 3/6/19 5:58 AM, Nanda Kumar wrote: Hello Team, I would like to know where I can monitor the ddl and dml operations happens in the production environment . FYI - We are using Postgres 9.6 RDS database . https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.Concepts.Postgre

Re: Monitor the ddl and dml activities in logs

2019-03-06 Thread Ben Chobot
> On Mar 6, 2019, at 5:58 AM, Nanda Kumar > wrote: > > Hello Team, > > I would like to know where I can monitor the ddl and dml operations happens > in the production environment . The documentation is your friend, particularly https://www.postgresql.org/docs/9.6/runtime-config-logging.htm

Monitor the ddl and dml activities in logs

2019-03-06 Thread Nanda Kumar
Hello Team, I would like to know where I can monitor the ddl and dml operations happens in the production environment . FYI - We are using Postgres 9.6 RDS database . Regards Nanda Kumar.M SmartStream Technologies Eastland Citadel | 5th Floor | 102 Hosur Road | Banglore 560 095 | India nanda.ku

Re: query has no destination for result data

2019-03-06 Thread Adrian Klaver
On 3/6/19 8:19 AM, Rob Sargent wrote: On Mar 6, 2019, at 7:41 AM, Adrian Klaver > wrote: On 3/6/19 7:37 AM, Pavel Stehule wrote: or \sf+ functioname Cool, I learned something new. Regards Pavel using \ef function 65 puts the cursor on the first lin

EXCLUDE USING hash(i WITH =)

2019-03-06 Thread Erwin Brandstetter
The manual currently advises: https://www.postgresql.org/docs/current/sql-createtable.html#SQL-CREATETABLE-EXCLUDE EXCLUDE [ USING *index_method* ] ( *exclude_element* WITH *operator* [, ... > ] ) *index_parameters* [ WHERE ( *predicate* ) ][...]Although it's > allowed, there is little point in us

Re: query has no destination for result data

2019-03-06 Thread Rob Sargent
> On Mar 6, 2019, at 7:41 AM, Adrian Klaver wrote: > > On 3/6/19 7:37 AM, Pavel Stehule wrote: > >> or >> \sf+ functioname > > Cool, I learned something new. > >> Regards >> Pavel > > using \ef function 65 puts the cursor on the first line of the loop. So a debugging statement got in the

Re: query has no destination for result data

2019-03-06 Thread Adrian Klaver
On 3/6/19 7:37 AM, Pavel Stehule wrote: or \sf+ functioname Cool, I learned something new. Regards Pavel -- Adrian Klaver adrian.kla...@aklaver.com

Re: query has no destination for result data

2019-03-06 Thread Pavel Stehule
I believe language plpgsql is not considered part of the function body > so it is not included in the line count: > > https://www.postgresql.org/docs/10/plpgsql-structure.html > > When tracking a line number down I usually do: > > \ef some_function line_number > > which counts the line in the funct

Re: query has no destination for result data

2019-03-06 Thread Adrian Klaver
On 3/6/19 7:12 AM, Rob Sargent wrote: On Mar 6, 2019, at 6:32 AM, Ron wrote: On 3/6/19 1:45 AM, Rob Sargent wrote: [snip] This construct had been working until recent changes but I cannot relate the message to any deformity in the current schema or code. Any pointers appreciated. What we

Re: query has no destination for result data

2019-03-06 Thread Adrian Klaver
On 3/5/19 11:45 PM, Rob Sargent wrote: I’m using 10.7. Does an empty result set generate this error by any chance. One of my plpgsql functions is now throwing this error: select * from genome_threshold_mono('11-O3C.pbs','1-O3C_chr',1.96, 100); The above is the function you started

Re: query has no destination for result data

2019-03-06 Thread Rob Sargent
> On Mar 6, 2019, at 6:32 AM, Ron wrote: > > On 3/6/19 1:45 AM, Rob Sargent wrote: > [snip] >> This construct had been working until recent changes but I cannot relate the >> message to any deformity in the current schema or code. >> Any pointers appreciated. > > What were the recent changes

Re: query has no destination for result data

2019-03-06 Thread Rob Sargent
> On Mar 6, 2019, at 6:29 AM, Tom Lane wrote: > > Rob Sargent writes: >> One of my plpgsql functions is now throwing this error: > >> ERROR: query has no destination for result data >> HINT: If you want to discard the results of a SELECT, use PERFORM instead. >> CONTEXT: PL/pgSQL function

Re: query has no destination for result data

2019-03-06 Thread Ron
On 3/6/19 1:45 AM, Rob Sargent wrote: [snip] This construct had been working until recent changes but I cannot relate the message to any deformity in the current schema or code. Any pointers appreciated. What were the recent changes? -- Angular momentum makes the world go 'round.

Re: query has no destination for result data

2019-03-06 Thread Tom Lane
Rob Sargent writes: > One of my plpgsql functions is now throwing this error: > ERROR: query has no destination for result data > HINT: If you want to discard the results of a SELECT, use PERFORM instead. > CONTEXT: PL/pgSQL function optimal_pvalue_mono(text,text,integer,double > precision,in

Re: Performance comparison between Pgsql 10.5 and Pgsql 11.2

2019-03-06 Thread Nicola Contu
This is instead the strace of another server running the same version compiled but that is even slower. Il giorno mer 6 mar 2019 alle ore 11:14 Nicola Contu ha scritto: > Here is the strace as requested for pg11 > > Thanks > > Il giorno mar 5 mar 2019 alle ore 17:47 Thomas Munro < > thomas.mu

Re: Performance comparison between Pgsql 10.5 and Pgsql 11.2

2019-03-06 Thread Nicola Contu
Here is the strace as requested for pg11 Thanks Il giorno mar 5 mar 2019 alle ore 17:47 Thomas Munro ha scritto: > On Wed, Mar 6, 2019 at 4:22 AM Nicola Contu > wrote: > > > > Not sure what you are requesting exactly but here is the strace for the > start of the pg_ctl > > I meant that you cou

how to restrict dba to access sensitive data

2019-03-06 Thread Patrizio Bassi
Hi All, i took a look into docs but could not find if pgsql has anything similar to Oracle Database Vault ( for instance cfr. https://www.oracle.com/technetwork/database/options/database-vault/overview/ds-security-dv-12cr2-3493647.pdf ) to restrict high privileged accounts from accessing tables wi