tidb icon indicating copy to clipboard operation
tidb copied to clipboard

Postgresql Support

Open posix4e opened this issue 8 years ago • 16 comments

This is not a bug it's a feature! I am requesting postgreql suport via FDW. BTW I generated the capability to do PG FDW via Rust! https://github.com/posix4e/rpgffi. We probably don't wanna do this as a part of tidb though. Some projects which use this code

  • https://github.com/instructure/jsoncdc
  • https://github.com/durch/google-bigtable-postgres-fdw

posix4e avatar May 03 '18 17:05 posix4e

@posix4e Thanks for your suggestion! PG protocol is on our roadmap. But it is a long-term goal. Your repo seems interesting. I will take a look.

shenli avatar May 04 '18 02:05 shenli

I’d suggest an intermediate goal of a foriegn data wrapper. As my bigtable example demonstrated you can implement a simple version easily.

posix4e avatar May 04 '18 02:05 posix4e

Could possibly need tidb as cache layer first.

Materialized view development in postgres is hard due to aggregation, sorting (million rows).

Child view depends on parent view so any change would require parent to be drop and recreated...

Although, people can use table to replace view, sometime AWS Aurora under large stress, could fail over. Then need a manual reboot (might be smarter way, but it was read as aws core internal error).

Its read replica during master DDL, will lock up...so session number went up to max..

Would you guys think of these user cases ?

Thanks 💯

ilovejs avatar Jul 02 '18 09:07 ilovejs

I think not starting with a simple Fdw is hard. On Mon, Jul 2, 2018 at 2:53 AM M Zhuang [email protected] wrote:

Could possibly need tidb as cache layer first. Materialized view development in postgres is hard due to aggregation, sorting. Child view depends on parent view so any change would require to be changed.. Althrough, people can use table to replace view. But sometime AWS Aurora under large stress, database won't be back online anymore.

Its read replica during master DDL, will lock up...so session number went up to max..

Would you guys think of these user case ?

Thanks 💯

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pingcap/tidb/issues/6459#issuecomment-401741913, or mute the thread https://github.com/notifications/unsubscribe-auth/AAxN27TTyDAQ0YS848BBOojQxQOYXXDcks5uCe2rgaJpZM4Txcqj .

posix4e avatar Jul 02 '18 14:07 posix4e

@shenli

@posix4e Thanks for your suggestion! PG protocol is on our roadmap. But it is a long-term goal. Your repo seems interesting. I will take a look.

Road map link looks like it’s out of date, can you give me a new link? I'm also care about postgresql support.

Thanks!

codelipenghui avatar Feb 12 '19 00:02 codelipenghui

@codelipenghui Here is the link of the roadmap, PostgreSQL protocol compatibility is not in our short term schedule.

eurekaka avatar Feb 12 '19 02:02 eurekaka

@eurekaka thanks.

codelipenghui avatar Feb 12 '19 09:02 codelipenghui

What made you chose mysql over postgres support?

ForsakenHarmony avatar Feb 12 '19 15:02 ForsakenHarmony

@shenli please help explain a little bit about the protocol choice, thanks.

eurekaka avatar Feb 13 '19 02:02 eurekaka

@ForsakenHarmony in the MySQL-world it is very common to shard databases. We targeted MySQL support first because we have something to offer their users.

morgo avatar Feb 15 '19 00:02 morgo

Any progress with this?

kawpii avatar Mar 04 '20 18:03 kawpii

Short to medium term focus on MySQL compatibility, no plans yet.

scsldb avatar Aug 28 '20 06:08 scsldb

cool feature. can't wait to do it.

xiaods avatar Jun 08 '21 10:06 xiaods

Dear friends,

Hope this project is the nice thing you are looking for.

https://github.com/DigitalChinaOpenSource/TiDB-for-PostgreSQL

alexshen-oda avatar Jun 09 '21 10:06 alexshen-oda

Maybe you can look at following projects, communications and contributions are welcomed. https://github.com/DigitalChinaOpenSource/TiDB-for-PostgreSQL https://github.com/DigitalChinaOpenSource/DCParser

xqianer avatar Jun 14 '21 06:06 xqianer

Dear friends,

Hope this project is the nice thing you are looking for.

https://github.com/DigitalChinaOpenSource/TiDB-for-PostgreSQL

Cool! Now I can get wire compatibility for the following with a single TiDB data-store.:stuck_out_tongue_closed_eyes: :rofl:

  • MySQL natively from TiDB.
  • MangoDB via https://github.com/MangoDB-io/MangoDB
  • PostgreSQL via https://github.com/DigitalChinaOpenSource/TiDB-for-PostgreSQL

xavier83 avatar Nov 05 '21 17:11 xavier83