Re: Mongo FDW For Postgres

2021-11-08 Thread Dhivya E
Hi Team,
 Can i get proper documentation for Mongodb FDW extension installation
For Postgres ? Will it support AWS RDS and Aurora? Please advise.

-- 

Regards,


Dhivya E

Data Engineer

Heptagon Technologies Pvt Ltd

Website: https://heptagon.in 

Email: dhivy...@heptagon.in

-- 
Disclaimer: This e-mail along with attachments (if any), transmitted may 
contain privileged, confidential or proprietary information and is for the 
sole use of the intended recipient(s). If you are not the intended 
recipient, please notify the sender, and then please delete and destroy all 
copies of the original message including the attachment. Any unauthorized 
review, use, disclosure, dissemination, forwarding, printing or copying of 
this email or any action taken on this e-mail is strictly prohibited and 
may be unlawful. Subject to applicable law, Sender may intercept, monitor, 
review and retain e-communications (EC) traveling through its 
networks/systems and may produce any such EC to regulators, law 
enforcement, in litigation and as required by law. Heptagon Technologies 
Pvt Ltd has installed active antivirus software but does not accept 
liability or responsibility for the security or reliability of transmission 
or for any virus transmitted. By retaining the  e-mail or the attachments 
(if any), the recipients of this e-mail consent to the foregoing. 


Re: Mongo FDW For Postgres

2021-11-08 Thread Laurenz Albe
On Mon, 2021-11-08 at 17:11 +0530, Dhivya E wrote:
> Can i get proper documentation for Mongodb FDW extension installation For 
> Postgres ? Will it support AWS RDS and Aurora? Please advise.

The Wiki lists three foreign data wrappers for MongoDB:
https://wiki.postgresql.org/wiki/Foreign_data_wrappers#NoSQL_Database_Wrappers

You'd have to look at those and ask the Maintainers (and Amazon, if they 
support them).

Yours,
Laurenz Albe

-- 
Cybertec | https://www.cybertec-postgresql.com





Re: Design database schemas around a common subset of objects

2021-11-08 Thread Adrian Klaver

On 11/7/21 16:14, Erik Wienhold wrote:

Hi Adrian,


On 07/11/2021 18:38 Adrian Klaver  wrote:

My questions for this are:



I'm thinking about something like merges in Git.  Database schemas for
project-a and project-b are like separate repositories and changes in core
are merged as necessary.  This along with project-specific changes ("o" in
the diagram below) should result in a sequence of migrations applied to the
respective databases.

project-a   oo--o--ooo-o---o--oo>
 ___/  _/ _/
/ /  /
core  o--oo-o---o-o--o-->
\ \__   \
 \   \   \
project-bo--ooo--o-o-o--ooo->

These merges (always from core to the projects) form a directed acyclic
graph from which the migration sequence can be generated using a topological
ordering.


4) Are you using or have you looked at Sqitch(https://sqitch.org/)?


Already looking into it after stumbling across it during research on the
mailing lists ;)


I think of Sqitch as version control(of database) inside the version 
control(VCS e.g. Git). Pretty sure it will cover your use case. Since 
you mentioned mailing list I will point you at the Sqitch one 
(https://groups.google.com/g/sqitch-users).


Erik




--
Adrian Klaver
adrian.kla...@aklaver.com




Re: Question: Is it possible to get the new xlog position after query execution?

2021-11-08 Thread Christophe Pettus



> On Nov 7, 2021, at 19:42, Oleg Serov  wrote:
> How would you accomplish this otherwise?

Synchronous commit.  It sounds like you are attempting to build the same kind 
of guarantees that synchronous commit provides, only in the application by 
polling LSNs.  It might be best just to use synchronous commit, so that you 
know that once the transaction is committed, the secondary has it.



libpq: How to cancel a COPY ... TO statement?

2021-11-08 Thread Daniel Frey
Hi,

after sending a COPY ... TO statement with PQsendQuery(), how can I cancel it 
properly?

I tried using PQcancel(), but it seems to have no effect. Calling 
PQgetCopyData() or PQgetResult() afterwards does not go into a failure state. 
And I don't want to call PQgetCopyData() until it returns -1, as this might be 
a lot of data being read from the server that I don't need.

BR, Daniel





Re: libpq: How to cancel a COPY ... TO statement?

2021-11-08 Thread Tom Lane
Daniel Frey  writes:
> after sending a COPY ... TO statement with PQsendQuery(), how can I cancel it 
> properly?

> I tried using PQcancel(),

That's the correct way.

> but it seems to have no effect. Calling PQgetCopyData() or PQgetResult() 
> afterwards does not go into a failure state. And I don't want to call 
> PQgetCopyData() until it returns -1, as this might be a lot of data being 
> read from the server that I don't need.

You can't expect instantaneous response to a cancel.  For one thing, the
server might have already stuffed a good deal of data down the pipe.
You should keep pulling (and discarding) data until you get the end
or error response.

regards, tom lane




Re: Question: Is it possible to get the new xlog position after query execution?

2021-11-08 Thread Christophe Pettus



> On Nov 8, 2021, at 10:03, Oleg Serov  wrote:
> That does not seem to be feasible for our application. Using synchronous 
> commit affects performance and really makes replication not really useful... 
> What we want to achieve is to have a consistent DB state across all 
> connections for master and replica per user. If other users see something 
> outdated, is OK.  

Synchronous commit can be turned on and off per-user:

ALTER ROLE  SET synchronous_commit = 'on';

That way, the users that require it have it, but other users do not.



Re: Question: Is it possible to get the new xlog position after query execution?

2021-11-08 Thread Christophe Pettus



> On Nov 8, 2021, at 11:47, Oleg Serov  wrote:
> I'm sorry, when I mean users, I mean application end-user (e.g. 
> j...@doe.com), not the postgres role.   

You can also set it as a session-level variable.  :-)

SET synchronous_commit = 'on';

You could flip it on for the application-level users that require it, only when 
it is required.



Zero Downtime Upgrade

2021-11-08 Thread Akheel Ahmed
Hi Group

What tools exist besides bucardo, londiste and rubyrep for logical replication 
to do a zero/near zero downtime upgrade?

Thanks in advance


Re: Zero Downtime Upgrade

2021-11-08 Thread Brent Wood
 You might try ogr2ogr - it can do postgres to postgres as easily as Postgres 
to something else and I think can do databases, schemas or individual tables in 
a single command

Though your original stays up, I'd recommend not writing to it while being 
copied...


Brent Wood


On Tuesday, November 9, 2021, 01:51:46 PM GMT+13, Akheel Ahmed 
 wrote:  
 
 Hi Group

What tools exist besides bucardo, londiste and rubyrep for logical replication 
to do a zero/near zero downtime upgrade?

Thanks in advance